question about devices and block numbers
destinyxi at yahoo.ca
Thu Nov 14 14:17:02 PST 2002
--- Steven Stimpson <steven2 at gwi.net> wrote:
> hello and thank you for reading this. someone on this lsit suggested to read
> the devices file in the linux documentation to get a better understanding
> of devices. as told i am doing that but now I have some questions. ill
> present thier graph below
> 3 char Pseudo-TTY slaves
> 0 = /dev/ttyp0 First PTY slave
> 1 = /dev/ttyp1 Second PTY slave
> 255 = /dev/ttyef 256th PTY slave
> These are the old-style (BSD) PTY devices; Unix98
> devices are on major 136 and above.
> block First MFM, RLL and IDE hard disk/CD-ROM interface
> 0 = /dev/hda Master: whole disk (or CD-ROM)
> 64 = /dev/hdb Slave: whole disk (or CD-ROM)
> For partitions, add to the whole disk device number:
> 0 = /dev/hd? Whole disk
> 1 = /dev/hd?1 First partition
> 2 = /dev/hd?2 Second partition
> 63 = /dev/hd?63 63rd partition
> Notice how it says 3 in the upper left hand coorner. so does that mean if I
> wanted to mknod the 63rd partition they talk about i would do mknod b 3 63?
> Or does the three just refer to the fact that this is the third paragraph?
> thanks for any info for the newbies...
well, i'm unsure... but probably means that it's character device 3, but on
the other hand, the next paragraph doesn't have a major device number.
however, the command mknod b 3 63 wouldn't be correct... b = block device,
and tty type devices are characters... but the major & minor nodes are right.
if you're a little bit bash-scripty savy, you can look at the MAKEDEV (some
distros call it MKDEV, i personally put it in /sbin, and make all the pathnames
accepted by $1 and by default it uses /dev)
Post your free ad now! http://personals.yahoo.ca
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message
More information about the blfs-support