Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Got my USB flash automount broken after reboot. Using Debian 6, GNOME 2

My NTFS hard disk is still mounting correctly.

When i connect my Android smartphone (with SD and local drive) my messages log looks like:

tail -f /var/log/messages

Aug 21 11:46:14 pp-hideout kernel: [  139.461734] sd 4:0:0:0: [sdc] Attached SCSI removable disk
Aug 21 11:46:14 pp-hideout kernel: [  139.466484] sd 4:0:0:2: [sdd] Attached SCSI removable disk
Aug 21 11:46:14 pp-hideout kernel: [  139.514664] cdrom: This disc doesn't have any tracks I recognize!
Aug 21 11:46:22 pp-hideout kernel: [  148.005560] sd 4:0:0:2: [sdd] 4268032 512-byte logical blocks: (2.18 GB/2.03 GiB)
Aug 21 11:46:22 pp-hideout kernel: [  148.006180] sd 4:0:0:0: [sdc] 7761920 512-byte logical blocks: (3.97 GB/3.70 GiB)
Aug 21 11:46:22 pp-hideout kernel: [  148.010305]  sdd:
Aug 21 11:46:22 pp-hideout kernel: [  148.010679]  sdc:
Aug 21 11:46:22 pp-hideout kernel: [  148.014944]  sdc1
Aug 21 11:46:22 pp-hideout halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_DACE_470F -o sync -m 002 -o gid=plugdev
Aug 21 11:46:23 pp-hideout halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_3E19_07CA -o sync -m 002 -o gid=plugdev

So the problem is somewhere on software level. And the problem is I want it to automount, but it isn't working. Can anybody help?

p.s.: How do Debian USB automounting is working "from the box"? Where can i read about it?

UPDATE: Did some apt-get ideas from web and now I have:

Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_DACE_470F -o sync -m 002 -o gid=plugdev
Aug 22 03:06:05 pp-hideout usbmount[15471]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime /dev/sdc1 /media/usb0
Aug 22 03:06:05 pp-hideout halevt: Running: halevt-mount -s
Aug 22 03:06:05 pp-hideout usbmount[15471]: executing command: run-parts /etc/usbmount/mount.d
Aug 22 03:06:07 pp-hideout usbmount[15436]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime /dev/sdd /media/usb1
Aug 22 03:06:07 pp-hideout halevt: Running: halevt-mount -s
Aug 22 03:06:07 pp-hideout usbmount[15436]: executing command: run-parts /etc/usbmount/mount.d

Now USB flash mounts, BUT read-only. How can I fix read-only? Any ideas?

share|improve this question
    
So, the problem is that it doesn't automount, or it does and you don't want it to? –  jordanm Aug 21 '12 at 21:34
    
Problem is it don't, but i want to, yep. Sorry : ) –  Max Peaceprayer Aug 21 '12 at 21:57
1  
Try running on the command line one of the 'halevt-mount' commands from the above /var/log/messages to get the actual error message, if it cannot be found from the mentioned file. –  Jari Laamanen Aug 21 '12 at 22:43
    
Updated the post. Tried some ideas. Now USB flash mounts, BUT read-only. How can i fix read-only? Any ideas? –  Max Peaceprayer Aug 21 '12 at 23:12
2  
No idea what the problem is, but be aware that halevt depends on HAL, which has been deprecated. Modern systems use udev and udisks to mount USB disks. –  Ernest A Jan 10 '14 at 11:35

2 Answers 2

This is the easiest way I have found:

http://pkill-9.com/mount-usb-micro-sd-card-linux-automount/

share|improve this answer
4  
It is better to provide the answer here and provide the link for more details. That way if the link goes bad this answer doesn't loose its value. –  Anthon Nov 3 '13 at 7:01

To answer your question about out-of-the-box automounting:

I wouldn't expect mounting to happen out-of-the-box without reference to your desktop environment (gnome).

Debian 6 isn't that old. I've used LXDE from it or equivalent. The uselessly generic answer is that all desktop environments (DEs) will include a filemanager. Your filemanager will let you open USBs (unless there's problems with how permissions are set up). Obviously once you open the USB it will be mounted. That's what you can count on out-of-the-box, otherwise it hardly counts as a DE. (Every filemanager I've seen is the same as current Windows OS in this respect: the list of removable drives is available in the left hand pane).

Current gnome as in Debian 8 will mount USBs as soon as they're plugged. AFAIK it hasn't always done that. I.e. at some points it has only mounted devices when opened in the file manager. The "modern" way saves hassle if your other apps don't show unmounted devices, maybe because the apps aren't part of a contemporary linux DE, or if the app in question is a command-line program running inside a terminal emulator :).

The "usbmount" package you installed isn't part of the DE. I'm sceptical that halevt-mount is too - though I could be wrong. Playing with Linux you'll hear a lot of random noise that doesn't necessarily reflect how your own system was designed. My guess for what your DE uses would be gnome-volume-manager (e.g. see gnome-mount).

As Earnest says, modern systems use udisks instead of HAL for mounting. I like udisks :). Assuming udisks wasn't part of your install, if you want more details then you're looking for someone who understood HAL. Good luck.

To mount on boot, you can use /etc/fstab. I.e. that's how internal drives get mounted (after the main "root" filesystem).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.