Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
 |
|
11-24-2008, 04:47 PM
|
#1
|
Member
Registered: Sep 2004
Posts: 234
Rep:
|
automounting usb drive ubuntu eee
Does anyone know how to get ubuntu eee 8.04.1 to automount usb flash drives? I believe the problem is in /etc/fstab.
|
|
|
11-25-2008, 02:47 PM
|
#2
|
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,156
|
My eee701 with kubuntu 8.04.1 works well, if slowly with a 600MHz CPU.
USB pen-drives, flash cards and DVD/CDs all work fine:
Plug in, a window pops up "What do you want do do with it? (Open in a new window, Omport the photos, Play DVD with kaffeine etc.)
You don't need anything in your fstab to have this behaviour.
If you think fstab is the problem, please post yours.
|
|
|
11-25-2008, 03:39 PM
|
#3
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
In /etc/fstab my usb devices are mounted as /dev/sdc1 and I made the mountpoint /media/usb in fstab. When I plug the device in a window comes up that says that line 6 in fstab is not correct and I need to be superuser to mount the device. How should my fstab file look? What does your fstab file look like? It would be great if the entire fstab file was posted so that I could see what my problem is.
|
|
|
11-25-2008, 06:55 PM
|
#4
|
Member
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578
Rep:
|
$ man fstab
|
|
|
11-26-2008, 04:43 AM
|
#5
|
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,156
|
Polanski,
I asked you to post your fstab. You didn't.
Anyway, here's mine:
Code:
proc /proc proc defaults 0 0
# /dev/sda1, the root filesystem:
UUID=2afb3247-b094-4407-9c1c-d6bc10e5e131 / ext3 noatime,errors=remount-ro 0 1
# next line mounts the 16G sd card as /home:
UUID=ed0b47f7-be52-4a88-b30b-84f0a673e191 /home ext3 noatime 0 2
|
|
|
12-01-2008, 06:56 PM
|
#6
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
Here is my fstab This is for Ubuntu 8.04 eee
#/etc/fstab: static file system information.
#
#<file system><mount point> <type> <options> <dump> <pass>
proc /proc /proc defaults 0 0
#/dev/sdb1
UUID=82ebea53-c3bb-4a11-a8c7-df3fafbe9675 / ext3 relatime,errors=remount-ro, commit=15 0 1
#/dev/sdb5
UUID=2c7ed848-3d4f-f28a-f922-2d667a40992a none swap sw 0 0
/dev/sdc1 /media/usb auto auto,user,exec,rw,utf8 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
rw,user,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,dmask=027,fmask=137
|
|
|
12-02-2008, 10:18 PM
|
#7
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
Any kind of help would be greatly appreciated.
|
|
|
12-02-2008, 10:37 PM
|
#8
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Tradegar's fstab entry doesn't contain a line for the usb device. Your's looks like it has a manual entry added. Try commenting out the /dev/sdc1 line and see if automounting works. I think you manually added an entry for /media/usb occupying the mount point that would be created automatically. Also, after removing the pen drive, check if there is an entry for it in /media/.hal-fstab.
note: I think that ubuntu may dynamically create entries in /etc/fstab instead of using an /etc/media/.hal-fstab, so check both.
Last edited by jschiwal; 12-02-2008 at 10:42 PM.
|
|
|
12-02-2008, 11:00 PM
|
#9
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
I tried commenting out the /dev/sdc1 line and the computer did not even detect the usb device. After I uncommented the line the device was detected but a prompt comes up that says cannot mount volume. unable to mount the volume 'DEVICE'.
[mntent]: line 6 in /etc/fstab is bad
mount: must be superuser to use mount
|
|
|
12-02-2008, 11:33 PM
|
#10
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
Any kind of help would be greatly appreciated. Thank you.
|
|
|
12-02-2008, 11:38 PM
|
#11
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Could you repost your /etc/fstab file. This time, use cut & paste and put it in [ code ] [ /code ] blocks. It looks like the last line was corrupted.
Why do you have a swap file? That is bad news for a solid state device.
|
|
|
12-03-2008, 08:40 AM
|
#12
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
How can I remove the swap file? Here is the code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=82ebea53-c3bb-4a11-a8c7-df3fafbe9675 / ext3 relatime,errors=remount-ro, commit=15 0 1
# /dev/sdb5
UUID=2c7ed848-3d4f-f28a-f922-2d667a40992a none swap sw 0 0
/dev/sdc1 /media/usb auto auto,user,exec,rw,utf8 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
rw,user,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,dmask=027,fmask=137
|
|
|
12-03-2008, 02:40 PM
|
#13
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
Any kind of help would be greatly appreciated. Also, how can I remove the swap file?
|
|
|
12-04-2008, 02:44 AM
|
#14
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
You could comment out the line:
Code:
#UUID=2c7ed848-3d4f-f28a-f922-2d667a40992a none swap sw 0 0
Also remove the "resume=<device>" entry from /boot/grub/menu.lst on the "kernel ..." line. This refers to swap partition device.
It probably was a configuration option when installing the eeePC edition of Ubuntu that you simply missed. If you have a netbook with
a hard drive instead of a SSD, then a swap file won't present a problem.
---
Try running "sudo tail -f /var/log/messages" just before inserting a pendrive. There may be a message indicating what the problem is. I don't use Ubuntu. I believe that it dynamically adds an entry to /etc/fstab after automounting a device.
Make sure that the udevd and hald daemons are running.
ps -u root | egrep 'hal|udev'
There may be other processes matching the pattern for 'hal'. On my laptop, one is called "hald-addon-storage". Ubuntu may be configured differently.
Just a little background that might help. Udevd is responsible for creating device nodes when you add a pendrive for example. Hal receives messages from the kernel when a device is inserted. After a node is created, hal communicates with the desktop by using the databus process "dbusd". Since you see a popup, the problem may not be with the processes not running. You could double check if a device is created.
Also, I'm not sure if Ubuntu uses PolicyKit.
It is relatively new and maybe not supported yet by eeeUbuntu. But check if you have the file:
/usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy
Here is what the policy element for removable devices looks like on my laptop:
Code:
<action id="org.freedesktop.hal.storage.mount-removable">
<description>Mount file systems from removable drives.</description>
<message>System policy prevents mounting removable media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
If you have this file, check that you don't have the entry:
Code:
<allow_active>auth_admin_keep_always</allow_active>
for this policy instead.
Also, try manually mounting a pendrive. The problem could be with the pendrive itself, such as a corrupt filesystem. If monitoring /var/log/messages while inserting, and you see the device node for the drive but not the partition being created, then this may be the case.
Also check that the vfat kernel module is loaded.
lsmod | grep vfat
If it isn't you won't be able to mount the drive automatically or manually. Normally it is included in the /boot/initrd ramdisk and loaded during the first part of the boot process.
Good Luck! Sorry I don't know more about how Gnome communicates with HAL.
Last edited by jschiwal; 12-04-2008 at 03:20 AM.
|
|
|
12-06-2008, 11:08 AM
|
#15
|
Member
Registered: Sep 2004
Posts: 234
Original Poster
Rep:
|
new problem
I reinstallled ubuntu eee and the warning to mount the flash drive is new. It says that I must be superuser to mount.
Here is the new fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=577fb716-efa9-4024-83d2-776818fa5d63 / ext3 relatime,errors=remount-ro 0 1
# /dev/sdb5
#UUID=2c7ed848-3d4f-f28a-f922-2d667a40992a none swap sw 0 0
/dev/sdc1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/.hibernate.img swap swap noauto,defaults 0 0
sudo swapon /.hibernate.img
tmpfs /var/log tmpfs defaults,noatime 0 0
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/tmp tmpfs defaults,noatime 0 0
none /var/cache unionfs dirs=/tmp:/var/cache=ro 0 0
|
|
|
All times are GMT -5. The time now is 07:24 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
|
|