Click to See Complete Forum and Search --> : USB fstab confusion


Nyckelharpa
08-01-2003, 10:54 PM
I have 3 usb devices that I sometimes have connected at the same time, sometimes not. I use them for transferring data from machine to machine (a pendrive, a card reader, and a hard drive).

My fstab entries are as follows:

/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/usb1 vfat defaults,user,noauto 0 0
/dev/sdb1 /mnt/usbhd vfat defaults,user,noauto 0 0
/dev/sdc1 /mnt/usb2 vfat defaults,user,noauto 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

They all seem to work fine, but my problem is this: I mount them graphically by right clicking on the Gnome desktop (in RH9) and then selecting the drive in the drives submenu. This mounts the device and then pops a little icon on the desktop. All fine enough, but the problem is that I am never sure which mnt will produce which drive. /mnt/usb1, which was originally my pendrive, produces a different drive and vice versa. This makes naming the mounts somewhat useless as it always turns out to be a shot in the dark. I just keep mounting until I find the one I want.

So here are my questions:

1. I there any way around this so that my mount usbhd will always mount my hd and so on.

2. What are 'defaults'?

3. What is the 0 0 at the end of the list.

4. Is there any advantage to 'noauto' vs 'auto'

thanks........

plattypus1
08-01-2003, 11:14 PM
Okay, I can answer the "noauto" question- when adding "noauto" to a drive name, it means that the computer doesn't expect anything to be in that device at boot time, and you have to mount it manually. For a USB removable device this is correct.

Second, I would make icons on the GNOME desktop that do "mount /mnt/usb1" "mount /mnt/usbhd" and "/mnt/usb2" rather than taking a "shot in the dark" and mounting whatever device to wherever. Also, try making sure that you always plug the device in the same USB port. I think that should help.

mdwatts
08-02-2003, 06:47 AM
Originally posted by Nyckelharpa

2. What are 'defaults'?

3. What is the 0 0 at the end of the list.



The mount manpage (man mount) will explain what all the defaults are for certain filesystem types and also what '0 0' are (filesystem check & dump).

You do not want to enable the filesystem check option for non Linux partitions such as vfat and ntfs.

(everyone rushes to check their /etc/fstab :) )

michaelk
08-02-2003, 02:54 PM
I see a need to write a script. To tell what drive is mounted one method would be to use the output of cdrecord --scanbus.