Why can't I open these device nodes?
Clash Royale CLAN TAG#URR8PPP
[root@archlinux xtricman]# ls -l /dev/pts
total 0
crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
[root@archlinux xtricman]# ls -l /mnt
total 12
brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
drwx------ 2 root root 12288 Feb 24 19:12 lost+found
[root@archlinux xtricman]# exec 6<>/dev/pts/0
[root@archlinux xtricman]# exec 7<>/mnt/dev_node
bash: /mnt/dev_node: No such device or address
[root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
bash: /mnt/dev_node_c: Input/output error
/dev/pts
is the mount point of a devpts, /mnt
is the mount point of an ext4.
I want to know, since both the three device nodes(/dev/pts/0
,/mnt/dev_node
,/mnt/dev_node_c
) all have the same major and minor number, why can I only open the /dev/pts/0
but not the other two?
Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?
linux terminal devices special-characters
add a comment |
[root@archlinux xtricman]# ls -l /dev/pts
total 0
crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
[root@archlinux xtricman]# ls -l /mnt
total 12
brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
drwx------ 2 root root 12288 Feb 24 19:12 lost+found
[root@archlinux xtricman]# exec 6<>/dev/pts/0
[root@archlinux xtricman]# exec 7<>/mnt/dev_node
bash: /mnt/dev_node: No such device or address
[root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
bash: /mnt/dev_node_c: Input/output error
/dev/pts
is the mount point of a devpts, /mnt
is the mount point of an ext4.
I want to know, since both the three device nodes(/dev/pts/0
,/mnt/dev_node
,/mnt/dev_node_c
) all have the same major and minor number, why can I only open the /dev/pts/0
but not the other two?
Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?
linux terminal devices special-characters
add a comment |
[root@archlinux xtricman]# ls -l /dev/pts
total 0
crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
[root@archlinux xtricman]# ls -l /mnt
total 12
brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
drwx------ 2 root root 12288 Feb 24 19:12 lost+found
[root@archlinux xtricman]# exec 6<>/dev/pts/0
[root@archlinux xtricman]# exec 7<>/mnt/dev_node
bash: /mnt/dev_node: No such device or address
[root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
bash: /mnt/dev_node_c: Input/output error
/dev/pts
is the mount point of a devpts, /mnt
is the mount point of an ext4.
I want to know, since both the three device nodes(/dev/pts/0
,/mnt/dev_node
,/mnt/dev_node_c
) all have the same major and minor number, why can I only open the /dev/pts/0
but not the other two?
Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?
linux terminal devices special-characters
[root@archlinux xtricman]# ls -l /dev/pts
total 0
crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
[root@archlinux xtricman]# ls -l /mnt
total 12
brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
drwx------ 2 root root 12288 Feb 24 19:12 lost+found
[root@archlinux xtricman]# exec 6<>/dev/pts/0
[root@archlinux xtricman]# exec 7<>/mnt/dev_node
bash: /mnt/dev_node: No such device or address
[root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
bash: /mnt/dev_node_c: Input/output error
/dev/pts
is the mount point of a devpts, /mnt
is the mount point of an ext4.
I want to know, since both the three device nodes(/dev/pts/0
,/mnt/dev_node
,/mnt/dev_node_c
) all have the same major and minor number, why can I only open the /dev/pts/0
but not the other two?
Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?
linux terminal devices special-characters
linux terminal devices special-characters
asked Feb 24 at 11:34
炸鱼薯条德里克炸鱼薯条德里克
5981316
5981316
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Well, dev_node
is a block device (the b
at the start of the line in the ls
output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.
Documentation/admin-guide/devices.txt
in the Linux kernel source tells what it is:
136 block Mylex DAC960 PCI RAID controller; ninth controller
0 = /dev/rd/c8d0 First disk, whole disk
You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address
seems an appropriate response.
dev_node_c
though looks to be the same as your /dev/pts/0
. But the device nodes in /dev/pts
are automatically generated, there's a special virtual filesystem (devpts
) for it. It's shown in the output of mount
, as usual:
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
I tested that, and indeed copying a device node from there /dev/pts/15
to another filesystem doesn't work. Also, mounting another copy of devpts
seems to create a clean instance, the pseudo ttys in /dev/pts
aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts
filesystem, and so the nodes don't work at all outside of it.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502671%2fwhy-cant-i-open-these-device-nodes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Well, dev_node
is a block device (the b
at the start of the line in the ls
output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.
Documentation/admin-guide/devices.txt
in the Linux kernel source tells what it is:
136 block Mylex DAC960 PCI RAID controller; ninth controller
0 = /dev/rd/c8d0 First disk, whole disk
You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address
seems an appropriate response.
dev_node_c
though looks to be the same as your /dev/pts/0
. But the device nodes in /dev/pts
are automatically generated, there's a special virtual filesystem (devpts
) for it. It's shown in the output of mount
, as usual:
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
I tested that, and indeed copying a device node from there /dev/pts/15
to another filesystem doesn't work. Also, mounting another copy of devpts
seems to create a clean instance, the pseudo ttys in /dev/pts
aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts
filesystem, and so the nodes don't work at all outside of it.
add a comment |
Well, dev_node
is a block device (the b
at the start of the line in the ls
output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.
Documentation/admin-guide/devices.txt
in the Linux kernel source tells what it is:
136 block Mylex DAC960 PCI RAID controller; ninth controller
0 = /dev/rd/c8d0 First disk, whole disk
You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address
seems an appropriate response.
dev_node_c
though looks to be the same as your /dev/pts/0
. But the device nodes in /dev/pts
are automatically generated, there's a special virtual filesystem (devpts
) for it. It's shown in the output of mount
, as usual:
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
I tested that, and indeed copying a device node from there /dev/pts/15
to another filesystem doesn't work. Also, mounting another copy of devpts
seems to create a clean instance, the pseudo ttys in /dev/pts
aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts
filesystem, and so the nodes don't work at all outside of it.
add a comment |
Well, dev_node
is a block device (the b
at the start of the line in the ls
output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.
Documentation/admin-guide/devices.txt
in the Linux kernel source tells what it is:
136 block Mylex DAC960 PCI RAID controller; ninth controller
0 = /dev/rd/c8d0 First disk, whole disk
You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address
seems an appropriate response.
dev_node_c
though looks to be the same as your /dev/pts/0
. But the device nodes in /dev/pts
are automatically generated, there's a special virtual filesystem (devpts
) for it. It's shown in the output of mount
, as usual:
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
I tested that, and indeed copying a device node from there /dev/pts/15
to another filesystem doesn't work. Also, mounting another copy of devpts
seems to create a clean instance, the pseudo ttys in /dev/pts
aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts
filesystem, and so the nodes don't work at all outside of it.
Well, dev_node
is a block device (the b
at the start of the line in the ls
output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.
Documentation/admin-guide/devices.txt
in the Linux kernel source tells what it is:
136 block Mylex DAC960 PCI RAID controller; ninth controller
0 = /dev/rd/c8d0 First disk, whole disk
You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address
seems an appropriate response.
dev_node_c
though looks to be the same as your /dev/pts/0
. But the device nodes in /dev/pts
are automatically generated, there's a special virtual filesystem (devpts
) for it. It's shown in the output of mount
, as usual:
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
I tested that, and indeed copying a device node from there /dev/pts/15
to another filesystem doesn't work. Also, mounting another copy of devpts
seems to create a clean instance, the pseudo ttys in /dev/pts
aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts
filesystem, and so the nodes don't work at all outside of it.
answered Feb 24 at 14:09
ilkkachuilkkachu
62.2k10103179
62.2k10103179
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502671%2fwhy-cant-i-open-these-device-nodes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown