Linux - Hardware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-25-2007, 01:55 AM
|
#1
|
|
Member
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654
Rep:
|
usb HD vs. usb flashdrive? fstab entry?
I am runnng: #2 in sig, slack-11, 2.6.20 kernel
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:
Code:
/dev/sdb:
HDIO_DRIVE_CMD(identify) failed: Invalid argument
root@phargrave:/home/perry# hdparm -I /dev/sdb1
/dev/sdb1:
HDIO_DRIVE_CMD(identify) failed: Invalid argument
root@phargrave:/home/perry# hdparm -I /dev/sdb2
thanks!
|
|
|
|
04-25-2007, 02:26 AM
|
#2
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
Quote:
Code:
/dev/sdb1 /home/usb auto users,umask=000 1 0
|
Shouldn't that be;
Code:
/dev/sdb1 /home/usb auto rw,owner,umask=0000 1 0
But most people are using udev for hotpluggable devices these days.
I seem to recall that if you have rw,owner - or rw,users - you don't actually need the umask.
You could try "ext3,vfat" instead of "auto" too.
Also, isn't "users" a bit redundant (unless more than one person can be logged in at a time)?
The mountpoint is a curious choice - implies you are keeping a home directory on a removable device. One expects /mnt/usb or /media/usb
Last edited by Simon Bridge; 04-25-2007 at 02:28 AM.
|
|
|
|
04-25-2007, 02:40 PM
|
#3
|
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 1,163
Rep:
|
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.
|
|
|
|
04-25-2007, 06:41 PM
|
#4
|
|
Member
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654
Original Poster
Rep:
|
i never thought my mountpoint was so odd.. only use that mount point because its convenient, ls ../usb i could move it, if its truly a problem.
i thought all usb flash drives were FAT? thats why I used the umask, but if the rw,users works then I'll try that too.
thank you!
|
|
|
|
04-25-2007, 07:09 PM
|
#5
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
Quote:
|
Originally Posted by dracolich
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.
|
Quote:
|
Originally Posted by bioe007
thought all usb flash drives were FAT?
|
You didn't report trouble mounting a flash drive, you reported trouble mounting a usb disk.
Let us know how it goes.
|
|
|
|
04-25-2007, 07:14 PM
|
#6
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
Last edited by jschiwal; 04-25-2007 at 07:16 PM.
|
|
|
|
04-25-2007, 10:46 PM
|
#7
|
|
Member
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654
Original Poster
Rep:
|
Quote:
|
Originally Posted by Simon Bridge
You didn't report trouble mounting a flash drive, you reported trouble mounting a usb disk.
|
you're right, but the two seem inseperably related by the same /dev/sdb1 fstab entry. what I needed was a clue about what to use for the sdb1 entry.
Quote:
|
Originally Posted by jschiwal
Umask is an option for fat32 and ntfs filesystems. ... so refer to the man page
|
didn't know that. And will do; I honestly had a brain fart there and posted this before 'man mount' and 'man fstab' - my apologies
net result-> I changed my fstab entry to:
Code:
/dev/sdb1 /home/usb auto rw,users 1 0
which has solved the problem, its now working fine for both my usb-HD and USB flash drives.
sincere gratitude all around, on me 
|
|
|
|
04-25-2007, 11:17 PM
|
#8
|
|
Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
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.
|
|
|
|
04-25-2007, 11:55 PM
|
#9
|
|
Member
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654
Original Poster
Rep:
|
Quote:
|
Originally Posted by Electro
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...
..get it, source... tree?

Last edited by bioe007; 04-26-2007 at 01:21 AM.
|
|
|
|
05-07-2007, 10:44 AM
|
#10
|
|
LQ Newbie
Registered: Jan 2006
Location: Grand Rapids, Mi.
Distribution: Kanotix, Ubuntu Jaunty 9.04, Karmic 9.10, Ubuntu moblin remix
Posts: 28
Rep:
|
I use Sidux linux and have not had any problems mounting or unmounting usb HD or SD sticks, seems to automatically take care of that.
|
|
|
|
05-07-2007, 11:57 AM
|
#11
|
|
Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
Quote:
|
Originally Posted by bioe007
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.
|
|
|
|
05-07-2007, 03:52 PM
|
#12
|
|
Member
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654
Original Poster
Rep:
|
thanks for the clarification.. I'll have to do some more reading. I have just begun to delve into udev rules for another device.
Thanks for the replies!
perry
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:02 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|