Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use a USB disk to backup my Ubuntu machine and store the video files I work with. It is formated to ext4 and uses LUKS encription. When I was using 12.04 it was working flawlessly and would mount automatically in every reboot. I just had to enter the passworkd once in a window where I also told the system to remember it forever.

It no longer mounts after I upgraded to 12.10. I've tried the different UUID and the /dev/mapper in /etc/fstabbut it never gets to work at startup. I get the error that the drive failed to mount and offers me to mount it manually or skip. It may be related to a change in the way disks are mounted in 12.10, where I found that in the /media folder there's now a subfolder for my user and then the disks mount in their own subfolders within that one.

I've managed to make my current fstab setup work after boot but only after first mounting the drive via the app Disks, after I enter the password there.

If I don't go through that first I get an error message telling me that the disk does not exist. In these pastes from the terminal you can see the difference in blkid after I used the Disks workaround:

ramon@ramon-ldc-20120921:~$ sudo mount /media/ramon/Respaldo/ [sudo] password for ramon: mount: special device UUID=34241b59-8d65-4e8a-bda4-ef4ab6935eb3 does not exist ramon@ramon-ldc-20120921:~$ sudo blkid /dev/sda1: UUID="71acf30d-abe7-41f1-b678-e9d5db5fa04f" TYPE="ext4" /dev/sda5: UUID="944dde6d-6232-4b96-b347-4d3dff2994f3" TYPE="ext4" /dev/sdb1: UUID="841e796b-e384-4b83-9432-10fa0d863600" TYPE="crypto_LUKS"

Here I used the Disks app to mount the disk:

ramon@ramon-ldc-20120921:~$ sudo blkid /dev/sda1: UUID="71acf30d-abe7-41f1-b678-e9d5db5fa04f" TYPE="ext4" /dev/sda5: UUID="944dde6d-6232-4b96-b347-4d3dff2994f3" TYPE="ext4" /dev/sdb1: UUID="841e796b-e384-4b83-9432-10fa0d863600" TYPE="crypto_LUKS" /dev/mapper/luks-841e796b-e384-4b83-9432-10fa0d863600: LABEL="Respaldo" UUID="34241b59-8d65-4e8a-bda4-ef4ab6935eb3" TYPE="ext4"

This is the line I have right now in my /etc/fstab:

UUID=34241b59-8d65-4e8a-bda4-ef4ab6935eb3 /media/ramon/Respaldo ext4 defaults 0 2

I've already done some research and have not found an answer here in AskUbuntu nor elsewhere. I even tried with a couple programmers that use Ubuntu in my coworking space, but they've never faced such issues before and all we could get to do is what I've shared here.

What I want is that the disk automounts everytime I boot the computer.

Thanks to all for your help and for spending your valuable time going through this post.

share|improve this question
    
I found this info about mounting encripted disks using encfshelp.ubuntu.com/community/… Will test and let you know if it works –  Ramon Suarez Mar 28 '13 at 13:41
    
It does not work.Tried gnome-encfs-manager –  Ramon Suarez Mar 28 '13 at 14:24

3 Answers 3

To have Gnome's "udisks2" mount it automatically with a GUI asking for the crypt password, you need to simply not have any mention of it in your fstab and crypttab.

udisks will automatically set up the mapping in /dev/mapper/luks-xxxx, and try to mount it under /media/[username]/[label]

if you insist on using an entry in your fstab, you have to make sure the luks mapping is set up before the system is trying to mount it.

share|improve this answer
    
It was not working either when it was not on the fstab. it worked before updating to 12.10 just as you said. After the update, nothing would happen with the disk after I booted the computer, even if I plugged it in again :( Udisks is installed in my computer –  Ramon Suarez Nov 7 '12 at 10:29

I had the issue that a previously mountable thing in 12.04 would not mount in 14.04 and it turned out to be a bug. The manual fix was to

$ sudo apt-get install cryptsetup

As this package does not get installed by default, but is required for mounting encrypted volumes. The error I was getting, for reference was:

Error unlocking /dev/sdl1: Error spawning command-line `cryptsetup luksOpen "/dev/sdl1" "luks-b5479205-958b-43ad-9b73-nnnnnnnnnn" ': Failed to execute child process "cryptsetup" (No such file or directory) (g-exec-error-quark, 8)

share|improve this answer
up vote 0 down vote accepted

I found a workaround using the instructions here: HOWTO: Automatically Unlock LUKS Encrypted Drives With A Keyfile.

Following the instructions and rebooting I get to see the disk in the tree on the left of the Nautilus window, but it does not mount it, although it has its very own line in /etc/fstab.

If I type sudo mount -a it does mount the disk. Weird, ain't it?

What I've done for the time being is to add gksudo mount -a to the Startup Applications (you will find it in the Dash, just start typing):

Startup Applications Icon in Dash

Then click on Add:

Startup Applications List

And then fill in the blanks:

Edit Startup Application

The part that matters is entering gksudo mount -a to the right of Command.

Hope somebody can find a more straighforward way !

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.