# /dev/fd0 is not working as expected [FIXED]

## MickKi

Hi All,

I am getting  r e a l l y  confused with the behaviour of my floppy disk drive.  My fstab is apple-pie stuff: 

```
/dev/fd0      /mnt/floppy       auto       noauto,user        0 0
```

When I try to mount it as a user this is what I'm getting: 

```
 $ mount /dev/fd0

mount: /dev/fd0 is not a valid block device
```

When I try to mount it as root: 

```
# mount /dev/fd0 /mnt/floppy

mount: /dev/fd0 is not a valid block device
```

I used to be able to mount my floppy drive by simply running " $ mount /dev/fd0".  Then /etc/fstab would take over and the floppy drive would be mounted under /mnt/floppy.  Now only root can mount it - I noticed that all mount points inc. /mnt/floppy under /mnt are now owned by root.

When I try to list the files under /mnt/floppy this is what I get (which reflects the last time I accessed a floppy a few days ago): 

```
# ls -la /mnt/floppy

total 0

drwx------   2 root root  72 Sep 17 07:48 .

drwxr-xr-x  11 root root 296 Jul  3 19:49 ..

-rw-r--r--   1 root root   0 Aug 21 10:40 .keep
```

All that I can think of which may be of relevance is moving over to udev.  Can this be the cause of my trouble?  Is there a fix?

----------

## codergeek42

Try /dev/floppy instead:

```
# mount -t auto /dev/floppy /mnt/floppy
```

And if that works, change your /etc/fstab to use /dev/floppy instead of /dev/fd0.

----------

## MickKi

Thanks codergeek42,

I am still getting the same error: 

```
# mount -t auto /dev/floppy /mnt/floppy

mount: /dev/floppy is not a block device
```

Any other ideas I could try?

----------

## codergeek42

Very weird...What's the output of 

```
# ls -al /dev/f{d,l}
```

?

----------

## dlambeth

I am having the same problem, can't find fd0!

Anybody?

----------

## MickKi

Thank you codergeek42, :Smile: 

 *codergeek42 wrote:*   

> Very weird...What's the output of 
> 
> ```
> # ls -al /dev/f{d,l}
> ```
> ...

 

Well, this is what I'm getting: 

```
# ls -al /dev/f{d,l}

ls: /dev/fl: No such file or directory

lrwxrwxrwx  1 root root 13 Sep 22 18:16 /dev/fd -> /proc/self/fd
```

I had a look around and found: 

```
/dev/floppy:

total 0

drwxr-xr-x   2 root    root      0 Aug  7 20:11 .

drwxr-xr-x  23 root    root      0 Sep 22 18:17 ..

brw-rw----   1 michael floppy 2, 0 Aug  7 20:11 0
```

Also, under /dev: 

```
lrwxrwxrwx   1 root    root          13 Sep 22 18:16 fd -> /proc/self/fd

lrwxrwxrwx   1 root    root           8 Sep 22 18:16 fd0 -> floppy/0
```

I'm confused . . .   :Confused:   What's this "/dev/floppy/0" file?

----------

## codergeek42

Perhaps /dev/floppy/0 is the floppy device for some weird reason?   :Question: 

Try mounting it and see what happens:

```
# mount -t auto /dev/floppy/0 /mnt/floppy
```

----------

## Cr0t

 *dlambeth wrote:*   

> I am having the same problem, can't find fd0!
> 
> Anybody?

 

I am having the same problem that suddenly my fd0 is gone.

```
11:31:38^root@HQ:~ > l /dev/fd/

total 4.0K

dr-x------  2 root root  0 Sep 22 11:31 ./

dr-xr-xr-x  3 root root  0 Sep 22 11:31 ../

lrwx------  1 root root 64 Sep 22 11:31 0 -> /dev/pts/2

lrwx------  1 root root 64 Sep 22 11:31 1 -> /dev/pts/2

lrwx------  1 root root 64 Sep 22 11:31 2 -> /dev/pts/2

lr-x------  1 root root 64 Sep 22 11:31 3 -> /proc/9098/fd/

```

and I don't have /dev/floppy

----------

## codergeek42

I'm not at my Gentoo box right now so I don't remember it clearly, but are you sure you enabled IDE-floppy support in your kernel config?

----------

## Cr0t

 *codergeek42 wrote:*   

> I'm not at my Gentoo box right now so I don't remember it clearly, but are you sure you enabled IDE-floppy support in your kernel config?

 

I double checked all the Kernel functions it's just weird.

----------

## codergeek42

I'm confuzled...that really should be just straightforward stuff..

 :Question:   :Question: 

Perhaps it's a hardware issue? Is the floppy connector ribbon and power supply plgged in ok?

----------

## Cr0t

 *codergeek42 wrote:*   

> I'm confuzled...that really should be just straightforward stuff..
> 
>  
> 
> Perhaps it's a hardware issue? Is the floppy connector ribbon and power supply plgged in ok?

 

Yeap, that just happened after the last kernel update, which is really weird.

----------

## codergeek42

So if you revert to your previous kernel, does it work ok?

----------

## MickKi

Sorry, I forgot to say that I did try mounting the /dev/floppy/0 but I am getting the same error: 

```
 # mount -t auto /dev/floppy/0 /mnt/floppy

mount: /dev/floppy/0 is not a valid block device
```

I haven't changed anything in the kernel settings re: IDE.

Perhaps as you say the ribbon/connector are playing up?  I'll check it just in case, but I am not sure that the /dev/* looks as it should?  Interested to know what your's looks like.

----------

## ravingsanity

I'm having a similar problem.  Before I did an update of my world, I used to be able to mount my floppy drive as a regular user either through the "computer" link in Gnome or just on the command line.  However, for about a week and a half or so, this has not been possible.  I think I remember seeing udev as one of the updates just before this started happening and I was wondering if there was some kind of change in the most recent udev that might cause this.

my fstab entry:

```
/dev/fd0                /mnt/floppy     auto            noauto,user             0 0
```

what happens when I try to mount it:

```
borges [~ 517]% mount /mnt/floppy

mount: I could not determine the filesystem type, and none was specified

borges [~ 518]% mount /dev/fd0

mount: I could not determine the filesystem type, and none was specified

borges [~ 519]% mount -t msdos /dev/fd0 /mnt/floppy

mount: only root can do that
```

That last works when I'm root.  I have msdos file system support in my kernel and so I'm stumped as to why I all of a sudden can't mount my floppy drive as a regular user.  Everything is just as I had it before.  I also tried creating a floppy directory in my home directory to mount to but I get the same "only root can do that" error.  Also, apparently, the "auto" flag doesn't work anymore...?

----------

## codergeek42

I think to do this stuff with udev you have to be in the 'disk' group iirc (though I probably don't).

----------

## Cr0t

The issue is ... do right after boot up an 

```
dmesg | grep -i floppy
```

You wont get shit... at least I don't get shit.

The next issue is that I don't even have /dev/fd0 anymore... this is just to strange, but I don't really have the time right now to fix this problem.

----------

## codergeek42

https://forums.gentoo.org/viewtopic.php?t=215880

Maybe that will help you...*shrug*

----------

## ravingsanity

 *codergeek42 wrote:*   

> I think to do this stuff with udev you have to be in the 'disk' group iirc (though I probably don't).

 

Just tried it and no dice, but thanks for the suggestion.

----------

## Gentree

Yeah , this smack of udev update changing the rules.

```
 I'm stumped as to why I all of a sudden can't mount my floppy drive as a regular user.
```

My god, is this an extention of the " dont let users burn to CD" philosophy madness?

I hope not.  :Evil or Very Mad: 

----------

## ravingsanity

 *Gentree wrote:*   

> Yeah , this smack of udev update changing the rules.
> 
>  *ravingsanity wrote:*    I'm stumped as to why I all of a sudden can't mount my floppy drive as a regular user. 
> 
> My god, is this an extention of the " dont let users burn to CD" philosophy madness?
> ...

 

CD's still mount without issue, but I haven't tried burning yet...they used to burn okay...I tried fiddling with the udev permissions in the /etc/udev/permissions.d/50-udev.permissions file, but that didn't seem to work...further searching turns up nothing...   :Confused: 

----------

## MickKi

Hi All,

I believe that this was primarily a kernel issue as far as my box is concerned.  I was using gentoo-dev-2.6.8-r4 while I was experiencing this floppy mounting problem.

I just compiled and am now running the gentoo-dev-2.6.8-r5 kernel and the floppy mount problem is solved.   :Very Happy: 

It was still asking for the filesystem type, so I added vfat to my fstab so that I do not have to type it each time: 

```
/dev/fd0     /mnt/floppy     vfat,auto    noauto,user     0 0
```

----------

## ravingsanity

 *MickKi wrote:*   

> Hi All,
> 
> I believe that this was primarily a kernel issue as far as my box is concerned.  I was using gentoo-dev-2.6.8-r4 while I was experiencing this floppy mounting problem.
> 
> I just compiled and am now running the gentoo-dev-2.6.8-r5 kernel and the floppy mount problem is solved.  
> ...

 

I was also running 2.6.8-r4 and I solved the problem by changing "auto" to msdos because that's the format of all the floppies I ever have to mount anyway.

----------

## MickKi

Hmm, mine seems to work differently under the 2.6.8-r5 kernel: 

```
 $ mount /dev/fd0

mount: I could not determine the filesystem type, and none was specified
```

That's just having "auto" in my fstab.  As soon as I add "vfat" I get: 

```
 $ mount /dev/fd0

 $ mount

/dev/hdb3 on / type reiserfs (rw,noatime)

none on /proc type proc (rw)

none on /sys type sysfs (rw)

none on /dev type ramfs (rw)

none on /dev/pts type devpts (rw)

/dev/hdb5 on /home type reiserfs (rw,nosuid,nodev,noatime)

none on /proc/bus/usb type usbfs (rw)

none on /dev/shm type tmpfs (rw)

/dev/fd0 on /mnt/floppy type vfat (rw,noexec,nosuid,nodev,user=michael)
```

 And of course with "vfat" I can see long file names on the floppy.  It seems to me that either due to the kernel or I suspect due to udev, the "auto" type in the fstab will not autodetect the file type?

----------

## ravingsanity

 *MickKi wrote:*   

> It seems to me that either due to the kernel or I suspect due to udev, the "auto" type in the fstab will not autodetect the file type?

 

That would appear to be the case.  The "auto" type for floppies seems to be broken now for some reason.  I suspect the udev update that happened recently but I'm not a developer so I could be wrong.

----------

## Cr0t

```
*gentoo-dev-sources-2.6.8-r5 (30 Sep 2004)

  30 Sep 2004; Daniel Drake <dsd@gentoo.org>

  +gentoo-dev-sources-2.6.8-r5.ebuild:

  Remove floppy patch. Fix megaraid, dl2k, acpi. Add dm-bbr from EVMS.

  26 Sep 2004; Luca Barbato <lu_zero@gentoo.org>

  gentoo-dev-sources-2.6.8-r4.ebuild:

  Tested, should work fine on ppc again.

  24 Sep 2004; Sven Wegener <swegener@gentoo.org>

  gentoo-dev-sources-2.6.5.ebuild:

  Fixed CVS keyword replacement.
```

----------

## MickKi

Does anyone know if this problem is also affecting CDROM access?  I  am now having the same problem with mounting my CDROMs.  :Sad: 

----------

## thecrazyperson_ws

my gentoo box got lightninged, but if I might go out on a limb... try adding "iso9660" to the /etc/fstab.  i believe all autodetection is broke, and i don't believe it's a problem with gentoo's kernel patchset.  I'd tinker around, but my gentoo box is borken and my only other *nix box is a pentium 200 with debian sarge on it (too slow to compile kernels one after another   :Evil or Very Mad:  )

----------

## MickKi

Sorry, I should have said:  my fstab has just "iso9660" in it and the CDROM(s) won't mount.  I tried the "-t auto" option to see if I could manually mount it in case the new kernel did not like the "iso9660" filesystem type.  I have also tried adding auto to fstab - no luck.   :Sad: 

----------

## boris64

 *Quote:*   

> 
> 
> I was also running 2.6.8-r4 and I solved the problem by changing "auto" to msdos because that's the format of all the floppies I ever have to mount anyway.

 

sengaya!

that's it. it works again! 

thx  :Wink: 

----------

## MickKi

 *MickKi wrote:*   

> Does anyone know if this problem is also affecting CDROM access?  I  am now having the same problem with mounting my CDROMs. 

 

Hold on a minute!  I don't   :Very Happy:    I was trying to mount a music CD . . .   :Laughing: 

Anyway, slightly different problem now: I can play music using xmms out of /dev/cdroms/cdrom0, but not out of /dev/cdroms/cdrom1.  I mean, it is shown as playing the tracks but there's no sound coming out of it!  :Confused: 

Any ideas?

----------

## baitken

 *MickKi wrote:*   

> 
> 
> Anyway, slightly different problem now: I can play music using xmms out of /dev/cdroms/cdrom0, but not out of /dev/cdroms/cdrom1.  I mean, it is shown as playing the tracks but there's no sound coming out of it! 
> 
> Any ideas?

 

It is possible that the audio output cable is not present.  To play directly from CD you need to have a cable running from your CDROM to your sound card.  Open up the case and see if there is one more cable coming from cdrom0 than cdrom1.  I'm not sure if it is possible to have two at once however, so you might be out of luck.

----------

## MickKi

Thanks baitken!

You got it.  My other half tells me that when she connected the second CDROM she had the audio cable connected to cdrom0.

Thanks for your help.  :Smile: 

----------

