Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I've just switched my entire home network to Linux - I love it!
Anyway, I have an external USB disk drive and a CF card reader, both of which I can mount OK. Whichever I connect first appears at /dev/sda1 - if I leave that connected, the second device then appears at /dev/sda2. So far, so good.
But the disk is ext3, and the CF reader is vfat. So how to I write my fstab so that the correct filesystem is chosen when I mount the devices regardless of mount order?
I had considered using the 'auto' fstype in fstab, but according to the mount manpages:
"Warning: the probing uses a heuristic (the presence of appropriate ‘magic’), and could recognize the wrong filesystem type, possibly with catastrophic consequences. If your data is valuable, don’t ask mount to guess."
The disk is a backup, so the data is 'valuable'. So what's the best way to do this?
So, providing both CF and USB drive are fat32, you would make lines like so:
/dev/sda1 /mnt/sda1 vfat user,auto 0 0
/dev/sda2 /mnt/sda2 vfat user,auto 0 0
vfat is FAT32, user allows it to be mounted by users other than root, and auto mounts it when it is found by hotplug. So edit your fstab, plug in the drive and cd /mnt/sda1, and you're set.
Thanks, Travers. But:
"So, providing both CF and USB drive are fat32..."
- the point of my original problem is that I had one vfat device and one ext3 device. The entries in fstab would only work if I hotplugged the devices in a particular order. But it is a moot point now, because in FC3 the fstab-sync daemon adds and removes fstab entries automagically whenever a USB device is attached/removed. At last, true plug'n'play! Still need to have a card in the CF reader on insertion, though. Thx for the info anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.