From: jrc@brainiac.mn.org (Jeffrey Comstock) Subject: Re: Minor device numbers. Date: 24 Jan 1992 22:03:44 GMT
In article <3883@umriscc.isc.umr.edu> bolsen@mcs213h.cs.umr.edu (Brian Olsen) writes:
>
>I've just installed mtools, but unfortunately at the moment I can only
>read high density floppies. From what I read in the 0.12 install
>documents, I believe I need to mknod my floppy devices differently.
>What are the minor device numbers for a 360k and a 720k drive?
>
>Any other advice would be appreciated.
>
>Thanks,
>Brian Olsen
The answer is R.T.F.M :-). This info is in docs/INSTALL-0.11 :
As with harddisk, floppies have device numbers, but this time major = 2
instead of 3. The minor number is not as easy: it's a composite that
tells which drive (A, B, C or D) and what type of drive (360kB, 1.2M,
1.44M etc). The formula is 'minor = type*4+nr', where nr is 0-3 for A-D,
and type is 2 for 1.2M disks, and 7 for 1.44M disks. There are other
types, but these should suffice for now.
Thus if you have a 1.2M A-drive, and want to call it "floppy0", you have
to tell linux so. This is done with the "mknod" command. mknod takes 4
paramters: the unix name of the device, a "b" or a "c" depending on
whether it's a Block of Character device, and the major and minor
numbers. Thus to make "floppy0" a 1.2M A-drive, you write:
mknod /dev/floppy0 b 2 8
b is for Block-device, the 2 is for floppy, and the 8 is 4*2+0, where
the 2 is 1.2M-drive and the 0 is drive A. Likewise to make a "floppy1"
device that is a 1.44M drive in B, you write:
mknod /dev/floppy1 b 2 29
where 29 = 4*7 + 1. There are a couple of standard names, for users
that are used to minix (major, minor in parentheses): /dev/PS0 is a
1.44M in A (2,28), /dev/PS1 a 1.44M in B (2,29), /dev/at0 is a 1.2M in A
(2,8), /dev/at1 is a 1.2M in B (2,9). Use mknod to make those that fit
your computer.
After you have made these special block devices, you can now read a
floppy under linux. The easiest way to import things into linux is by
writing a tar-file to a floppy with rawrite.exe, and then using:
-- Jeffrey R. Comstock CW -. .-. ----- -.. INET uunet!jhereg.osa.com!/dev/null (EMAIL CURRENTLY BROKEN)