LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 11-24-2008, 04:47 PM   #1
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Rep: Reputation: 30
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.
 
Old 11-25-2008, 02:47 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,156

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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.
 
Old 11-25-2008, 03:39 PM   #3
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
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.
 
Old 11-25-2008, 06:55 PM   #4
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
$ man fstab
 
Old 11-26-2008, 04:43 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,156

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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
 
Old 12-01-2008, 06:56 PM   #6
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
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
 
Old 12-02-2008, 10:18 PM   #7
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
Any kind of help would be greatly appreciated.
 
Old 12-02-2008, 10:37 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
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.
 
Old 12-02-2008, 11:00 PM   #9
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
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
 
Old 12-02-2008, 11:33 PM   #10
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
Any kind of help would be greatly appreciated. Thank you.
 
Old 12-02-2008, 11:38 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
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.
 
Old 12-03-2008, 08:40 AM   #12
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
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
 
Old 12-03-2008, 02:40 PM   #13
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
Any kind of help would be greatly appreciated. Also, how can I remove the swap file?
 
Old 12-04-2008, 02:44 AM   #14
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
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.
 
Old 12-06-2008, 11:08 AM   #15
Polanski
Member
 
Registered: Sep 2004
Posts: 234

Original Poster
Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cd/dvd automounting problem after replacing dvd-drive (Ubuntu Hardy 8.04) ErV Ubuntu 2 09-22-2008 01:47 AM
automounting USB Flash Drive BigWaveDave Linux - Embedded & Single-board computer 10 06-06-2008 09:34 AM
automounting usb drive with -noexec off Rohan_mk1 Linux - Software 0 12-13-2006 09:53 AM
automounting my USB flash drive Artex Linux - Newbie 2 08-27-2006 10:27 PM
ubuntu partitioning tool does not see external usb hard drive when installing ubuntu fakie_flip Linux - Software 2 07-30-2006 12:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration