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/fstab
but 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.
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
As this package does not get installed by default, but is required for mounting encrypted volumes. The error I was getting, for reference was:
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.
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):Then click on Add:
And then fill in the blanks:
The part that matters is entering
gksudo mount -a
to the right of Command.Hope somebody can find a more straighforward way !