Answer the question
In order to leave comments, you need to log in
Way to automount removable media in console Ubuntu?
Good evening, hackers!
Given:
Pure console Ubuntu 12.04 LTS
Task:
Automount and unmount flash drives, hard drives, cdrom, etc.
Conditions
Media must be writable by normal user
cdrom must be unmounted on eject button
Results:
gvfs + policykit = complicated and unstable.
halevt + pmount = complicated and abandoned
sudo + udev = not supported by DE, unknown how it works with cdrom
Question:
Advise a promising and logical option.
PS While leaning towards udev.
Answer the question
In order to leave comments, you need to log in
4 years ago I did this on bare Debian using udev + autofs, look here: wiki.debian.org/AutoFs
I didn’t try it with cd-rom, but flash drives were mounted with a bang:
Do not pay attention to the pop-up inscriptions - this is a small trolling of one comrade, for whom the video was filmed. The comrade claimed that in this terrible and terrible backward Linux there is not even auto-mounting except by means of DE :)
help.ubuntu.com/community/UsbDriveDoSomethingHowto - here is a way to write a script that reacts to hot-plugging. I'd probably start with this.
About 3 years ago I was sitting only in the console. I used ivman (I was in Debian turnips). Also, for the lazy, you can use the PCManFM daemon or, harder, Thunar.
In debian, I have been using usbmount.alioth.debian.org/ for a hundred years to automount usb flash drives
with screws, a little more difficult - you can do something, but there are usually a lot of partitions and different fs, so the rules will be much more complicated than just
/dev/sdx1 -> /media/usb0
but udev anyway, yes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question