You are not logged in.

#1 2018-06-04 23:26:17

CarterCox
Member
From: Argentina
Registered: 2018-02-24
Posts: 116

[SOLVED]dm-crypt: ERROR: device '/dev/mapper/cryptroot/' not found...

Hi guys,

I just configured an encrypted installation by following https://wiki.archlinux.org/index.php/Dm … _with_LUKS and https://wiki.archlinux.org/index.php/Dm … mkinitcpio.

Here are all the relevant files:

/etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet cryptdevice=UUID=6501ea67-8072-4272-b112-addecc6dce15:cryptroot root=/dev/mapper/cryptroot"
GRUB_CMDLINE_LINUX=""
[...]

/etc/mkinitcio.conf

HOOKS=(base udev autodetect keyboard keymap modconf block encrypt lvm2 filesystems fsck)
[...]

/etc/fstab

# /dev/mapper/cryptroot
UUID=6501ea67-8072-4272-b112-addecc6dce15       /               ext4            rw,relatime,data=ordered        0 1

# /dev/sda1
UUID=74b46520-292e-463c-87e8-4a10c0ac87f7       /boot           ext4            rw,relatime,data=ordered        0 2

# /dev/sda3
UUID=06b74ddd-b7bc-4fc5-8068-bb415feba5ed       none            swap            defaults,pri=-2 0 0

I generated all the necessary configuration files after editing them (grub and mkinitcpio).

But when I boot this happens:

ERROR: device '/dev/mapper/cryptroot/' not found. Skipping fsck.
mount /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#

What did I do wrong?

Thanks for any help you can provide!

Last edited by CarterCox (2018-06-05 21:56:36)


And neither the angels in Heaven above
   Nor the demons down under the sea
Can ever dissever my soul from the soul
   Of the beautiful Annabel Lee;

Offline

#2 2018-06-04 23:44:11

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED]dm-crypt: ERROR: device '/dev/mapper/cryptroot/' not found...

When you are dropped to the rescue shell can you manually open the luks container?

Offline

#3 2018-06-04 23:52:46

CarterCox
Member
From: Argentina
Registered: 2018-02-24
Posts: 116

Re: [SOLVED]dm-crypt: ERROR: device '/dev/mapper/cryptroot/' not found...

When running

cryptsetup /dev/sda2 cryptroot

I get

WARNING: Locking directory /run/cryptsetup is missing!
Enter passphrase for /dev/sda2:

So I enter the passphrase and it is indeed unencrypted.


And neither the angels in Heaven above
   Nor the demons down under the sea
Can ever dissever my soul from the soul
   Of the beautiful Annabel Lee;

Offline

#4 2018-06-05 00:01:50

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED]dm-crypt: ERROR: device '/dev/mapper/cryptroot/' not found...

You have the same UUID for the luks container and its contents.  After you decrypt it and run blkid you should have two seperate UUIDs one for /dev/sda2 and a different one for /dev/mapper/cryptroot.
The UUID GRUB needs for the cryptdevice parameter is  the one for /dev/sda2 the other one could be used in place of root=/dev/mapper/cryptroot.
edit:
spelling one not oen.

Last edited by loqs (2018-06-05 00:04:19)

Offline

Board footer

Powered by FluxBB