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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Having trouble getting fstab to properly differentiate between when a usb hard-drive and a usb flash drive are plugged in... this is the error:
Code:
perry@phargrave:~$ dmesg | tail
sdb: assuming drive cache: write through
SCSI device sdb: 58605120 512-byte hdwr sectors (30006 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 00 00 00
sdb: assuming drive cache: write through
sdb: sdb1 sdb2 sdb3
sd 2:0:0:0: Attached scsi disk sdb
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
EXT3-fs: Unrecognized mount option "umask=000" or missing value
see that after I plug in the usb HD.
the HD is a working pull from #1 in my sig after an upgrade, 30GB 4200RPM (can't remember the MFG - i can look if needed, some dell junk drive)
I'm pretty sure the trouble lies with my fstab entry:
Code:
/dev/sdb1 /home/usb auto users,umask=000 1 0
which works great for usb stick, but not if I plug in this HD where sdb1 is going to be ext3.. is there a workaround for this? Or should I reformat the HD so sbd1 is always vfat?
ps. i tried to get hdparm -I /dev/sdb #and also /dev/sdb1 but:
The mount point is indeed a curious one. It implies that usb is the name of a user. If the mount point doesn't exist then it's not going to mount.
I've had similar problems when mounting a usb disk that's formatted as ext2 or ext3. Mount doesn't seem to like the umask option when applied to ext. I find umask is really only useful with FAT partitions.
Umask is an option for fat32 and ntfs filesystems. That is because the filesystems don't retain unix ownership and permissions, so these are set as options of the mount command. Different filesystems have different mount options, so refer to the man page for what the options are.
If you insert a pendrive or usb drive and you aren't sure what the filesystem is, you could run "sudo file -s /dev/sdb1" to find out.
You should not used fstab for removable mediums using USB and IEEE-1394 (aka Firewire or i.Link). I suggest using either use udev, dbus, or hal to automatically mount the drives. I just mount them manually.
It is better to mount a removable drive at any directory instead of /home. The /home directory is where users are located. IMHO, it is more convenient to mount removable drives at some directory in /mnt and setup a symbolic link from your home directory that goes to /mnt.
You should not used fstab for removable mediums ... use udev, dbus, or hal to automatically mount the drives.
i did not know that.. may I ask why it is bad to use fstab? is it because init will try and mount them?
i will google/LQ search for udev/dbus/hal automounting... (feel free though to *me to any good links )
Quote:
I just mount them manually.
didn't you just tell me to do it automatically?
Quote:
IMHO, it is more convenient to mount removable drives at some directory in /mnt and setup a symbolic link from your home directory that goes to /mnt.
aaah...a much better idea. will do that.
again, thanks for the help!
<edit #1> small progress report..
I have moved all my mounts from /home and made symbolic links, can someone please check my syntax?
Code:
ln -s -t /media/usb1 ~/usb1
it seems to be working fine but is there a more elegant way t do this? not sure if the -t is needed... thanks!
<edit #2> pre-screwing something up question:
so I found this package of scripts, got the source and will begin playing unless I'm barking up the wrong tree...
i did not know that.. may I ask why it is bad to use fstab? is it because init will try and mount them?
i will google/LQ search for udev/dbus/hal automounting... (feel free though to *me to any good links )
didn't you just tell me to do it automatically?
aaah...a much better idea. will do that.
again, thanks for the help!
<edit #1> small progress report..
I have moved all my mounts from /home and made symbolic links, can someone please check my syntax?
Code:
ln -s -t /media/usb1 ~/usb1
it seems to be working fine but is there a more elegant way t do this? not sure if the -t is needed... thanks!
<edit #2> pre-screwing something up question:
so I found this package of scripts, got the source and will begin playing unless I'm barking up the wrong tree...
..get it, source... tree?
USB storage devices can change from one device node and then to the next. Also can be using a different filesystem and/or different partition number. I suggest using HAL or dbus to automatically mount them. If that is too hard, manually mount them yourself. I prefer manually mount them because I have a few drives that uses different fileystems that needs different mount options.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.