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.
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.
|
 |
06-21-2006, 08:32 AM
|
#1
|
LQ Newbie
Registered: May 2006
Distribution: Cygwin
Posts: 10
Rep:
|
Non-root users unable to write to auto mounted usb drive.
I've recently installed SuSE 10.1. I've a couple of issues...
1) When I insert my Kingmax 1GB usb drive, SuSE automounts it to /media/usbstick. However, only root is able to write to it. I'm forced to chown the drive to the user that wants to use it instead. Is there a way to make suse automount and allow write to the stick for nonroot users?
2) I don't know if this is a bug or not but I would think it is...when I try to mount it upon boot time in /etc/fstab I noticed dmesg reports that no /dev/sda1 special drive was found...however, a few lines later it detects the drive but it's not automounted (shouldn't the drive be detected before reading /etc/fstab?). So I have to remove the drive and reinsert it so that SuSE automounts it to /media/usbstick.
I'd like it automounted to /mnt/usb instead with write access to nonroot users at boot time. My current workaround was to add this to /etc/rc.d/rc:
mount /dev/sda /mnt/usb
chown username /mnt/usb
I'm sure there's a cleaner and/or more proper way of doing it.
Andrew.
|
|
|
06-21-2006, 09:21 AM
|
#2
|
Member
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Rep:
|
You can use
Code:
mount /dev/sda /mnt/usb -o gid=(GID of users group),mode=666
to mount it owned by the GID of the users group and/or use "mode=" to change the mode of the mount.
You probably can't mount it at boot though, because the proper modules need to be loaded before it maps the USB device to a pseudo SCSI device. You could add "noauto,users,rw" to fstab to stop it trying to mount at boot and alow users to mount and write.
|
|
|
06-21-2006, 10:25 AM
|
#3
|
LQ Newbie
Registered: May 2006
Distribution: Cygwin
Posts: 10
Original Poster
Rep:
|
I think you meant sda1 instead of sda. I tried a similar command without using mode=666 and that didn't work. Unfortunately your code doesn't work either as it returns a long message...to make it brief:
mount: wrong fs type, bad option, bad superblock on /dev/sda1
So I tried these instead:
mount -t auto /dev/sda1 /mnt/usb -o gid=100,mode=666
mount -t ext3 /dev/sda1 /mnt/usb -o gid=100,mode=666
But that just returned the same message. I tried using just sda instead of sda1 as you suggested but same error message.
Any other ideas? Anyone?
|
|
|
06-21-2006, 10:33 AM
|
#4
|
Member
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Rep:
|
Quote:
mount: wrong fs type, bad option, bad superblock on /dev/sda1
|
This usually means that there is something wrong with the filesystem on the device. Maybe it's corrupt somehow
Can you mount the USB stick at all?
If not you may have to use (c)fdisk to check the partition table.
And maybe mkfs to reformat it.
|
|
|
06-21-2006, 01:12 PM
|
#5
|
LQ Newbie
Registered: May 2006
Distribution: Cygwin
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by binary_y2k2
This usually means that there is something wrong with the filesystem on the device. Maybe it's corrupt somehow
Can you mount the USB stick at all?
If not you may have to use (c)fdisk to check the partition table.
And maybe mkfs to reformat it.
|
Mounting it is no problem and all files are readable/writeable.
I found the answer though just prior to finding your reply. I backed up my usb drive and repartitioned it using cfdisk and formatting it as dos (fat32). I then followed the rest of the article just like before and had no problems this time. Thanks for trying to help.
I still can't get it to auto mount the way I want it during boot without doing it manually through /etc/init.d/rc.
|
|
|
06-21-2006, 05:18 PM
|
#6
|
Member
Registered: Jun 2006
Location: Stevensville, Michigan, USA
Distribution: Ubuntu 6.06 LTS dual boot with XP Pro
Posts: 37
Rep:
|
Quote:
Originally Posted by andrew_cz
Mounting it is no problem and all files are readable/writeable.
I found the answer though just prior to finding your reply. I backed up my usb drive and repartitioned it using cfdisk and formatting it as dos (fat32). I then followed the rest of the article just like before and had no problems this time. Thanks for trying to help.
I still can't get it to auto mount the way I want it during boot without doing it manually through /etc/init.d/rc.
|
You must have had it NTFS.
|
|
|
06-24-2006, 12:47 PM
|
#7
|
LQ Newbie
Registered: May 2006
Distribution: Cygwin
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by frank golden
You must have had it NTFS.
|
Definitely not. It was FAT16 but it must've been corrupted.
|
|
|
All times are GMT -5. The time now is 03:07 PM.
|
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
|
|