FC4 floppy weirdness...

Place to discuss Fedora and/or Red Hat
Post Reply
dishawjp
administrator
administrator
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY
Contact:

FC4 floppy weirdness...

Post by dishawjp » Thu Jul 21, 2005 5:50 pm

Hi All,

Under FC3 I can mount a floppy simply by typing (as a normal user):
mount /dev/fd0

Today I've been trying to figure out why this won't work for me in FC4. The following examples were done with the same floppy that I could easily mount minutes ago in FC3. Same hardware, same computer. It's a dual boot FC3/FC4 box.

Code: Select all

[dishawjp@eunix ~]$ mount /dev/fd0
mount: I could not determine the filesystem type, and none was specified
[dishawjp@eunix ~]$ mount -t vfat /dev/fd0
mount: only root can do that
[dishawjp@eunix ~]$ su -
Password:
[root@eunix ~]# mount /dev/fd0
mount: you must specify the filesystem type
[root@eunix ~]# mount -t vfat /dev/fd0
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
[root@eunix ~]# mount -t vfat /dev/fd0 /media/floppy
[root@eunix ~]#
The /dev/fd0 line in my FC4 /etc/fstab is:

Code: Select all

/dev/fd0  /media/floppy   auto    pamconsole,exec,noauto,managed 0 0
and an "ls -l /dev/fd0" in FC4 is:

Code: Select all

brw-rw----  1 dishawjp floppy 2, 0 Jul 21 15:30 /dev/fd0
Both of which appear to be fairly normal. The /dev/fd0 line in my FC3 /etc/fstab has a lot more stuff in it and looks like this:

Code: Select all

/dev/fd0   /media/floppy   auto   pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
But /dev/fd0 looks identical. I do know that the "fscontext=system_u:object_r:removable_t," part is SELinux stuff and since I am running SELinux targeted on both machines I don't know why the difference.

I am hesitant to just paste this stuff into my fstab and maybe really hose things.

What does a "typical" /dev/fd0 fstab line look like in FC4? Any thoughts on why FC4 can't determine filesystem type?

As always, thanks in advance for any insight.

<edited to get rid of some extra spaces on fstab lines>

Jim
Last edited by dishawjp on Thu Jul 21, 2005 6:24 pm, edited 1 time in total.

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Thu Jul 21, 2005 6:10 pm

In case it helps, here's my FC4 fstab line:
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
Of course I don't have a floppy disk to put in it - it may work, and it may not!

dishawjp
administrator
administrator
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY
Contact:

Post by dishawjp » Thu Jul 21, 2005 6:22 pm

Thanks Worker201,

At least I do know now that mine is the same as yours. So they are probably both correct. The question now is how do I get it to work more easily.

Thanks though. At least I can forget about adding those SELinux things that are in my FC3 fstab.

Jim

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Thu Jul 21, 2005 11:39 pm

Maybe I'm gonna say something really stupid here but I thought you alwas had to specify the mountpoint for the device you wanted to mount?
Like

Code: Select all

mount -t vfat /dev/fd0 /media/floppy

dishawjp
administrator
administrator
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY
Contact:

Post by dishawjp » Fri Jul 22, 2005 6:24 am

Hi Ice9,

No, not at all stupid. But I think that now that the mount point is specified in the fstab entry for the device, that's no longer necessary.

Code: Select all

/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
^^^^^    ^^^^^^^
At least as far as I can tell. It seems to me that it's been this way since about FC2 or so.

What makes this whole thing even weirder, is that I can umount /media/floppy as a normal user with no problem!

Jim

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jul 22, 2005 8:04 am

Look at the "user" option of the "mount" man page. Add the "user" keyword to your mount options in your fstab. This allows normal users to mount the associated device. If you want to manually control it you might also want to ditch the "managed" option, in fact just replace the word "managed" with "user" so your fstab entry doesn't get wiped out by hal.

dishawjp
administrator
administrator
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY
Contact:

Post by dishawjp » Fri Jul 22, 2005 9:37 am

Thanks Voidmain,

I'll give that a shot when I get home. Also, since it doesn't seem to be able to detect file system types properly, should I substitute msdos for auto in that field? Looking at the fstab man page, they seem to want msdos instead of vfat like the mount command wants. Any floppies I use are generally DOS formatted.

Thanks again,

Jim

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jul 22, 2005 10:25 am

It's not able to detect your floppy type? Maybe that's because your user doesn't have permissions to the device. I'll bet once you put "user" in there it should autodetect just fine. Otherwise vfat or msdos should be sufficient.

Post Reply