You are not logged in.

#1 2016-06-30 11:47:53

mepwn12
Member
Registered: 2016-06-30
Posts: 3

[SOLVED] Encrypted volume not automatically mounting

When I boot into arch my encrypted volume is not automatically mounted and it gives me the following errors:
ERROR: device 'dev/mapper/cryptroot' not found, Skipping fsck.
ERROR: Unable to find root device 'dev/mapper/cryptroot'.

after which i get dropped into the recovery shell. from here on i can manually mount it with the following commands:
'cryptsetup open --type luks /dev/sda2 cryptroot'
'mount -t ext4 /dev/mapper/cryptroot /'
and exiting out of the recovery shell, after which it properly loads everything and asking me for the decryption password again.

I'd rather not have to deal with this every time I boot, but I have no idea how to fix this.

Last edited by mepwn12 (2016-07-04 00:44:22)

Offline

#2 2016-06-30 19:36:49

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: [SOLVED] Encrypted volume not automatically mounting

mepwn12 wrote:

When I boot into arch my encrypted volume is not automatically mounted and it gives me the following errors:
ERROR: device 'dev/mapper/cryptroot' not found, Skipping fsck.
ERROR: Unable to find root device 'dev/mapper/cryptroot'.

after which i get dropped into the recovery shell. from here on i can manually mount it with the following commands:
'cryptsetup open --type luks /dev/sda2 cryptroot'
'mount -t ext4 /dev/mapper/cryptroot /'
and exiting out of the recovery shell, after which it properly loads everything and asking me for the decryption password again.

I'd rather not have to deal with this every time I boot, but I have no idea how to fix this.

Compare the UUIDs of

lsblk -f

for the partition that is your encrypted device to the UUIDs listed in /etc/crypttab. Also, make sure you have the naming right. E.g.

/etc/crypttab

cryptroot           <UUID-of-the-luks-container-in-lsblk -f>                 none                 luks,timeout=360

/etc/fstab

/dev/mapper/cryptroot              /                ext4                rw          0 0

Im going to guess that your problem is in /etc/crypttab since it is responsible for getting luks to unlock the drive (after asking your passphrase of you) and map it to the right place. EIther change the name in /etc/crypttab to match /etc/fstab, or vice versa.

If the above doesnt work, please post the contents of /etc/crypttab, /etc/fstab, and /etc/mkinitcpio.conf.

Last edited by GSF1200S (2016-06-30 19:37:32)

Offline

#3 2016-07-03 23:32:32

mepwn12
Member
Registered: 2016-06-30
Posts: 3

Re: [SOLVED] Encrypted volume not automatically mounting

The instructions in '/etc/crypttab' state that the root directory should not be placed in it

Offline

#4 2016-07-04 00:22:26

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: [SOLVED] Encrypted volume not automatically mounting

mepwn12 wrote:

The instructions in '/etc/crypttab' state that the root directory should not be placed in it

Correct. In essence you have two UUIDs- one is the UUID of the encrypted container/partition while the other is the UUID of the filesystem in the encrypted container. That message is telling you NOT to put the filesystem UUID there but instead the UUID of the encrypted device. Consider the following output from lsblk -f:

[gsf1200s@wristtwister ~]$ lsblk -f
NAME     FSTYPE   LABEL         UUID                                 MOUNTPOINT
sda                                                                  
|-sda1   vfat                   42C9-ZCL6                            
|-sda2                                                               
|-sda3   ntfs                   327HJD809LLE1K54                     
|-sda4                                                               
|-sda5   crypto_L               l89se4gh-ab1m-0845-87yt-lb24lo7hh9q1 
| `-root btrfs                  8953u76f-k894-98u7-0i87-y54309q5u23r /mnt/btrfsroot

sda1 is my UEFI partition, sda3 is my windows partition, sda5 is the luks encrypted partition- the part under it that says "root" is the line relating to my root filesystem. As you can see, its btrfs. In /etc/crypttab, my line looks like this:

root           UUID=l89se4gh-ab1m-0845-87yt-lb24lo7hh9q1            none                    luks,timeout=360

This is how my system is setup and it works fine. I pass a line on the kernel line for my keyfile- unnecessary if using a passphrase instead.

Offline

#5 2016-07-04 00:33:41

mepwn12
Member
Registered: 2016-06-30
Posts: 3

Re: [SOLVED] Encrypted volume not automatically mounting

Nevermind, i made a dumb mistake. I thought I couldn't put my luks container in my crypttab since it had root in the name, thanks for making me realize smile

Offline

#6 2016-07-04 01:28:21

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: [SOLVED] Encrypted volume not automatically mounting

mepwn12 wrote:

Nevermind, i made a dumb mistake. I thought I couldn't put my luks container in my crypttab since it had root in the name, thanks for making me realize smile

Making mistakes is part of how you learn. Glad its sorted smile

Offline

Board footer

Powered by FluxBB