You are not logged in.

#1 2013-09-25 11:15:11

Arhat
Member
Registered: 2010-07-02
Posts: 49
Website

[SOLVED] cryptsetup failed after recent updates

Hi,

I have a LUKS encrypted root partition. After I updated my system this morning and rebooted. the root partition could no longer be mounted.

The system stops booting and drops me into a rescue shell:

The device is not a LUKS volume and the crypto paramater [sic] was not specified

Booting with a rescue disk, (Current Release: 2013.09.01), and setting up my root device manually with

cryptsetup luksOpen /dev/md2 root

mounting it with

mount /dev/mapper/root /mnt

and then

systemctl switch-root /mnt

gets me into a perfectly working system.

Obviously without  "/" mounted I don't have much in the way of logs.

These are the relevant lines from my

/etc/mkinitcpio.conf

MODULES="dm-mod dm-crypt aes_x86_64 raid1 ext4"
...
HOOKS="base udev autodetect modconf block mdadm_udev mdadm keymap encrypt filesystems keyboard fsck"

/boot/syslinux/syslinux.cfg

LABEL arch
        MENU LABEL Arch Linux
        LINUX ../vmlinuz-linux
        APPEND cryptdevice=/dev/md2:root root=/dev/mapper/root ro 
        INITRD ../initramfs-linux.img

My /etc/modprobe.d/ directory is empty.

/etc/fstab:

..
/dev/mapper/root / ext4 defaults 0 1

Any ideas what could have happened, what changed with recent updates and most importantly how do I fix it?

Last edited by Arhat (2015-07-06 15:26:13)

Offline

#2 2013-09-26 22:42:06

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,496

Re: [SOLVED] cryptsetup failed after recent updates

According to the wiki mdadm and mdadm_udev are competing hooks. Maybe it has to do with that?


The painting in my profile is "Eros" by Paul Klee. He is credited in the lower left, but that got blurry during the downscale.

Offline

#3 2013-09-30 17:48:35

Arhat
Member
Registered: 2010-07-02
Posts: 49
Website

Re: [SOLVED] cryptsetup failed after recent updates

I removed the mdadm hook.

Now I get a different error message:

:: running hook [encrypt]
waiting 10 seconds for device /dev/md2
waiting 10 seconds for device /dev/mapper/root

ERROR:'/dev/mapper/root' not found

Offline

#4 2013-09-30 18:13:56

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] cryptsetup failed after recent updates

Strongly suggest that you pick a more reliable name than /dev/md2 (I really doubt it's being named this via the mdadm_udev hook). The UUID would be a good alternative.

Offline

#5 2013-10-01 07:39:01

Arhat
Member
Registered: 2010-07-02
Posts: 49
Website

Re: [SOLVED] cryptsetup failed after recent updates

falconindy wrote:

Strongly suggest that you pick a more reliable name than /dev/md2 (I really doubt it's being named this via the mdadm_udev hook). The UUID would be a good alternative.

Okay I'll need some help with that.
If I want to change my
/boot/syslinux/syslinux.cfg
to use UUIDs

LABEL arch
        MENU LABEL Arch Linux
        LINUX ../vmlinuz-linux
        APPEND cryptdevice=/dev/md2:root root=UUID=e36cd7dc-ed30-46a3-bfc5-cf0db07ce9cd ro 
        INITRD ../initramfs-linux.img

How do I replace the /dev/md2 here?
Like this?

APPEND cryptdevice=/dev/disk/by-uuid/40ef550f-1fa5-4dce-a024-82ea00214127:root root=UUID=e36cd7dc-ed30-46a3-bfc5-cf0db07ce9cd ro

And my /etc/mdadm.conf?

ARRAY /dev/disk/by-uuid/40ef550f-1fa5-4dce-a024-82ea00214127 UUID=b83f101f:31a7be7b:db9ace61:78f7d73d

Where
40ef550f-1fa5-4dce-a024-82ea00214127 is the UUID of /dev/md2
e36cd7dc-ed30-46a3-bfc5-cf0db07ce9cd is the UUID of the encrypted device /dev/dm-2

Strike0 wrote:

According to the wiki mdadm and mdadm_udev are competing hooks. Maybe it has to do with that?

For what it is worth, removing mdadm_udev instead of mdadm (see my post above) did the trick. So that is what caused the error initially. Thanks for pointing that out.

Still, now I'd like to get the system to work using mdadm_udev.

Last edited by Arhat (2013-10-01 07:59:54)

Offline

#6 2013-10-01 11:44:16

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] cryptsetup failed after recent updates

Get rid of mdadm.conf. You don't need it. cryptdevice= understands UUID=....... syntax if you'd prefer.

Offline

Board footer

Powered by FluxBB