I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. Googling has gotten me nowhere (except a lot of Japanese pages--apparently this format is popular there).
For starters, there's no fd0u1680. And what are /dev/fd/[0,1,2,3] for? Does this have something to do with Udev? I tried and failed to understand how that works (or, really, what it is).
I have another box i can use in the mean time, but any pointers would be very much appreciated.
b
On Tue, 2006-09-26 at 19:39 -0400, fedoralist@subtropolix.org wrote:
And what are /dev/fd/[0,1,2,3] for?
/dev/fd0 first floppy drive /dev/fd1 second floppy drive and so on...
Tim wrote:
On Tue, 2006-09-26 at 19:39 -0400, fedoralist@subtropolix.org wrote:
And what are /dev/fd/[0,1,2,3] for?
/dev/fd0 first floppy drive /dev/fd1 second floppy drive and so on...
No, the 0,1,2,3 are inside the dir /dev/fd/ I have only /dev/fd0
[btiner@apollo ~]$ ls -l /dev/fd* lrwxrwxrwx 1 root root 13 Sep 27 06:33 /dev/fd -> /proc/self/fd brw-rw---- 1 btiner floppy 2, 0 Sep 27 06:34 /dev/fd0
[btiner@apollo ~]$ ls -l /dev/fd/ total 4 lrwx------ 1 btiner btiner 64 Sep 27 12:26 0 -> /dev/pts/1 lrwx------ 1 btiner btiner 64 Sep 27 12:26 1 -> /dev/pts/1 lrwx------ 1 btiner btiner 64 Sep 27 12:26 2 -> /dev/pts/1 lr-x------ 1 btiner btiner 64 Sep 27 12:26 3 -> /proc/3943/fd
How can i mount a 1680 formatted floppy? This Udev, from what i understand, handles it automatically. But that isn't what i'm seeing. Normally, i'd do:
mount -t vfat /dev/fd0u1680 /media/floppy1680
But i don't have a /dev/fd0u1680. This is different than my other box, which has core 3 (and mounts the floppy just fine).
fedoralist@subtropolix.org wrote:
And what are /dev/fd/[0,1,2,3] for?
Tim:
/dev/fd0 first floppy drive /dev/fd1 second floppy drive and so on...
fedoralist@subtropolix.org:
No, the 0,1,2,3 are inside the dir /dev/fd/
Ah, I didn't notice the slash, I thought you were doing some shorthand [with the square brackets] for different numbers after the letters fd. If you list the contents, they're links to /dev/pts (pseudo-ttys). You can google those terms, if you really want to know more about it.
I have only /dev/fd0
Same here. Possibly, I'd get more automatically created if I had more floppies in this box.
But i don't have a /dev/fd0u1680.
I do, on FC5. But don't on FC4. Have you tried playing with MAKEDEV? I don't have any floppies like that to play with, so it'd be pointless me trying to make that device.
fedoralist@subtropolix.org wrote:
I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. ...
I hate to ask, but did you try it? The fd0...fdn devices are supposed to auto-detect the actual capacity and density of the disk in the drive.
If that doesn't work, I think you'll have to configure the appropriate floppy devices for hal to create them.
Wow, I guess floppies are dead. I've been running FC5 for months and just now noticed that it never set up floppy access at all.
<Joe
Joe Smith wrote:
fedoralist@subtropolix.org wrote:
I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. ...
I hate to ask, but did you try it? The fd0...fdn devices are supposed to auto-detect the actual capacity and density of the disk in the drive.
Yup. After reading the udev stuff.
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ?<??@???.??? b??????u.??? ???h.??? ?????!?t.?aq u????u?.??? ???.??? ??cbt.^?f ?>lu.?hu &?tf??4u.?.? _w??p??.??_ ??.??? dlinux s.ys? pamsu7f?.>du ?t??< v.?n? 0uf???8u.f)? f??bss.??? p??s??.??? t??x?.??x
b
On Fri, 2006-09-29 at 17:24 -0400, fedoralist@subtropolix.org wrote:
Joe Smith wrote:
fedoralist@subtropolix.org wrote:
I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. ...
I hate to ask, but did you try it? The fd0...fdn devices are supposed to auto-detect the actual capacity and density of the disk in the drive.
Yup. After reading the udev stuff.
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ?<??@???.??? b??????u.??? ???h.??? ?????!?t.?aq u????u?.??? ???.??? ??cbt.^?f ?>lu.?hu &?tf??4u.?.? _w??p??.??_ ??.??? dlinux s.ys? pamsu7f?.>du ?t??< v.?n? 0uf???8u.f)? f??bss.??? p??s??.??? t??x?.??x
The 1680 density is NOT a dos/vfat format. IIRC that is a MAC format and needs to be mounted as such for proper access.
b
Jeff Vian wrote:
On Fri, 2006-09-29 at 17:24 -0400, fedoralist@subtropolix.org wrote:
Joe Smith wrote:
fedoralist@subtropolix.org wrote:
I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. ...
I hate to ask, but did you try it? The fd0...fdn devices are supposed to auto-detect the actual capacity and density of the disk in the drive.
Yup. After reading the udev stuff.
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ?<??@???.??? b??????u.??? ???h.??? ?????!?t.?aq u????u?.??? ???.??? ??cbt.^?f ?>lu.?hu &?tf??4u.?.? _w??p??.??_ ??.??? dlinux s.ys? pamsu7f?.>du ?t??< v.?n? 0uf???8u.f)? f??bss.??? p??s??.??? t??x?.??x
The 1680 density is NOT a dos/vfat format. IIRC that is a MAC format and needs to be mounted as such for proper access.
Not true. In fact, Microsoft used to use 1680 density for its install disks. I've no idea if it was ever used for Macs, though. In any case, it mounts fine on core 3 with -t vfat.
The example i posted above was to show that the disk was not automagically detected by udev as 1680. That is what i would expect to see on my core 3 box if i used /dev/fd0 (because it's the wrong density).
core 3: [root@poseidon ~]# mount -t vfat /dev/fd0u1680 /media/floppy/
works fine.
core 4: [root@apollo ~]# mount -t vfat /dev/fd0u1680 /media/floppy/ mount: special device /dev/fd0u1680 does not exist
b
On Sat, 2006-09-30 at 00:23 -0400, fedoralist@subtropolix.org wrote:
Jeff Vian wrote:
On Fri, 2006-09-29 at 17:24 -0400, fedoralist@subtropolix.org wrote:
Joe Smith wrote:
fedoralist@subtropolix.org wrote:
I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. ...
I hate to ask, but did you try it? The fd0...fdn devices are supposed to auto-detect the actual capacity and density of the disk in the drive.
Yup. After reading the udev stuff.
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ?<??@???.??? b??????u.??? ???h.??? ?????!?t.?aq u????u?.??? ???.??? ??cbt.^?f ?>lu.?hu &?tf??4u.?.? _w??p??.??_ ??.??? dlinux s.ys? pamsu7f?.>du ?t??< v.?n? 0uf???8u.f)? f??bss.??? p??s??.??? t??x?.??x
The 1680 density is NOT a dos/vfat format. IIRC that is a MAC format and needs to be mounted as such for proper access.
Not true. In fact, Microsoft used to use 1680 density for its install disks. I've no idea if it was ever used for Macs, though. In any case, it mounts fine on core 3 with -t vfat.
I dimly remember that Win95 (the last version that did a floppy install) had higher than standard density diskettes for the install. I never did know exactly what density it was, and the floppy install for windows disappeared after that use.
The example i posted above was to show that the disk was not automagically detected by udev as 1680. That is what i would expect to see on my core 3 box if i used /dev/fd0 (because it's the wrong density).
core 3: [root@poseidon ~]# mount -t vfat /dev/fd0u1680 /media/floppy/
works fine.
core 4: [root@apollo ~]# mount -t vfat /dev/fd0u1680 /media/floppy/ mount: special device /dev/fd0u1680 does not exist
With Core 3 and earlier all the possible device types were created in /dev. In later releases they saw fit to remove them and they now have udev and hal to do the automatic configuration for you.
I bet if there was a rule for udev to create the device you could get it to mount under FC4 & FC5.
Alternatively, if you know the specific characteristics of the device you could use mknod to create it manually.
b
Jeff Vian wrote:
On Sat, 2006-09-30 at 00:23 -0400, fedoralist@subtropolix.org wrote:
Jeff Vian wrote:
On Fri, 2006-09-29 at 17:24 -0400, fedoralist@subtropolix.org wrote:
Joe Smith wrote:
fedoralist@subtropolix.org wrote:
I've been using core 4 for quite some time now and this is the first time i've had to think about device nodes. I'd like to mount a floppy that's formatted to 1680 density but can't figure out how the device nodes work. ...
I hate to ask, but did you try it? The fd0...fdn devices are supposed to auto-detect the actual capacity and density of the disk in the drive.
Yup. After reading the udev stuff.
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ?<??@???.??? b??????u.??? ???h.??? ?????!?t.?aq u????u?.??? ???.??? ??cbt.^?f ?>lu.?hu &?tf??4u.?.? _w??p??.??_ ??.??? dlinux s.ys? pamsu7f?.>du ?t??< v.?n? 0uf???8u.f)? f??bss.??? p??s??.??? t??x?.??x
The 1680 density is NOT a dos/vfat format. IIRC that is a MAC format and needs to be mounted as such for proper access.
Not true. In fact, Microsoft used to use 1680 density for its install disks. I've no idea if it was ever used for Macs, though. In any case, it mounts fine on core 3 with -t vfat.
I dimly remember that Win95 (the last version that did a floppy install) had higher than standard density diskettes for the install. I never did know exactly what density it was, and the floppy install for windows disappeared after that use.
The example i posted above was to show that the disk was not automagically detected by udev as 1680. That is what i would expect to see on my core 3 box if i used /dev/fd0 (because it's the wrong density).
core 3: [root@poseidon ~]# mount -t vfat /dev/fd0u1680 /media/floppy/
works fine.
core 4: [root@apollo ~]# mount -t vfat /dev/fd0u1680 /media/floppy/ mount: special device /dev/fd0u1680 does not exist
With Core 3 and earlier all the possible device types were created in /dev. In later releases they saw fit to remove them and they now have udev and hal to do the automatic configuration for you.
I bet if there was a rule for udev to create the device you could get it to mount under FC4 & FC5.
OK, i've come across this page:
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
I'm wading through it now, but it's pretty opaque to me. What i'm trying to figure out is whether or not /sbin/hotplug can tell that the disk is at a higher density. Understandably, there's not a whole lot about floppies in any of the udev/hotplug docs i've seen.
And i've been poking around in /etc/udev & /etc/dev.d but haven't yet figured out how this should work.
Alternatively, if you know the specific characteristics of the device you could use mknod to create it manually.
Yeah, i can do that, though i'd have to take measures to ensure udev didn't disappear the node on reboot. In any case, i'm somewhat without clue as to the major & minor numbers required.
Still working on it ....
fedoralist@subtropolix.org wrote:
...
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ...
Dude--you have got to start using more descriptive file names. Seriously.
I just looked again and I actually have '/dev/fd0u1680' (and about a dozen other 'fd0u' device nodes). I'm using FC5.
I actually gave a talk on udev once, but I'm still no expert. I have a summary slide from the talk here: http://www.martnet.com/~jes/temp/hotplug.png (just kidding) and some more links here: http://www.martnet.com/~jes/CHLUG/HAL_udev_hotplug_links.html, although those may be pretty stale by now. The best cookbook-type resource is still here: http://www.reactivated.net/udevrules.php
Anyway, I believe the fd0u devices are being created by this rule in /etc/udev/rules.d/50-udev.rules: KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*",\ RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
This is actually running a utility, /lib/udev/create_floppy_devices, which comes with the udev package.
Sorry I can't give you more specific help but maybe enough clues for a good start.
<Joe
Joe Smith wrote:
fedoralist@subtropolix.org wrote:
...
[root@apollo ~]# mount -t vfat /dev/fd0 /media/floppy/ [root@apollo ~]# ls /media/floppy/ ?.? 8v??.?? fp??????.?1? ??syslin.ux ???.u?? ????????.??? }???.?b? f?>?tf??.t?? ????????.?t? ???}????.u}? ?.??> ??b?6?t?.??? f!?txf?.? ???????.t?= ???????u ...
Dude--you have got to start using more descriptive file names. Seriously.
Funny.
I just looked again and I actually have '/dev/fd0u1680' (and about a dozen other 'fd0u' device nodes). I'm using FC5.
I actually gave a talk on udev once, but I'm still no expert. I have a summary slide from the talk here: http://www.martnet.com/~jes/temp/hotplug.png (just kidding) and some more links here: http://www.martnet.com/~jes/CHLUG/HAL_udev_hotplug_links.html, although those may be pretty stale by now. The best cookbook-type resource is still here: http://www.reactivated.net/udevrules.php
Anyway, I believe the fd0u devices are being created by this rule in /etc/udev/rules.d/50-udev.rules: KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*",\ RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
This is actually running a utility, /lib/udev/create_floppy_devices, which comes with the udev package.
Sorry I can't give you more specific help but maybe enough clues for a good start.
<Joe
Some light reading on a sunday morning. I'll check it out. Thanks for the response.
b