FS#29992 - broken boot from cryptsetup root / encrypt hook
Attached to Project:
Arch Linux
Opened by Shawn Smout (silroquen) - Thursday, 24 May 2012, 02:18 GMT
Last edited by Dave Reisner (falconindy) - Friday, 01 June 2012, 13:23 GMT
Opened by Shawn Smout (silroquen) - Thursday, 24 May 2012, 02:18 GMT
Last edited by Dave Reisner (falconindy) - Friday, 01 June 2012, 13:23 GMT
|
Details
Some updates I installed today prevented my system from
booting.
My root is mounted like this in grub.cfg: /vmlinuz-linux root=/dev/mapper/arch ro cryptdevice=/dev/sda6:arch ... Here is what happened on boot: 1. The initrd encrypt hook starts to run. 2. cryptsetup asks for and accepts my password to unlock the "arch" device. 3. An error message "Device arch already exists" repeats endlessly. When the problem occurred, I had these packages installed: mkinitcpio-0.9.0-2-any.pkg.tar.xz linux-3.3.7-1-x86_64.pkg.tar.xz udev-182-4-x86_64.pkg.tar.xz To fix the problem, I downgraded to these: mkinitcpio-0.8.8-1-any.pkg.tar.xz linux-3.3.6-1-x86_64.pkg.tar.xz udev-182-2-x86_64.pkg.tar.xz |
This task depends upon
'lsinitcpio -a' output from the "broken" image is relevant, too.
MODULES="twofish_x86_64 xts"
BINARIES=""
FILES=""
HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck encrypt"
Needs to be fixed in cryptsetup.
https://bugs.archlinux.org/task/30019
1) Boot by using the old method in your kernel line: "root=/dev/sdxx" instead of "cryptdevice=/dev/sdxx:root root=/dev/mapper/root". It will complain that it is deprecated, but it will boot.
2) Change the order of the HOOKS: Move "encrypt" at least in front of "filesystems" (don't forget "keymap", if needed).
3) Create a new initrd and reboot with the correct kernel line.
This solves it for me.
The only way I'm willing to "fix" this in mkinitcpio is to remove the deprecated API usage that causes this (which core/cryptsetup uses). I've already fixed this in testing/cryptsetup.
> Yes, thank you for reiterating what I already stated.
I am not shure if there is some undertone in your sentence, however, i just wanted to help, so: You're welcome.
Downgrading to mkinitcpio-0.8.8-1 linux-3.3.6-1 and udev-182-2 as suggested by OP didn't fix the problem.
Neither did putting sata to the end of hooks in mkinitcpio.conf.
After installing cryptsetup from testing recreating the initrd doesn't complete smoothly.
-> Parsing hook: [encrypt]
/usr/lib/initcpio/install/encrypt: line 12: add_all_modules: command not found
/usr/lib/initcpio/install/encrypt: line 22: add_runscript: command not found
Am I missing something..? Any suggestions how to fix this?
Thanks in advance.
Nearly everything is the same I updated these packages and it won't boot anymore due to misbehavior of cryptsetup.
I'll explain this and you can tell me whether it is a different bug or not, as I said I'm not sure and don't want to fill the Bug tracker with garbage.
I have an encrypted mdadm raid and use udev rules and an usbstick to automatically open my Luks encrypted volumegroup during boot.
Since the recent changes I'm being dropped to a recovery shell due to my root device being unable to find.
I don't get any other error messages besides that one.
During the [mdadm] hook being "mdadm: dev/md/0 has been started with 2 drives." is being echoed as always and the "running hook [encrypt]" section
prints "Waiting 10 seconds for device /dev/md/0 . . .".
In the [lvm2] section my root cannot be found and I'm being dropped to the recovery shell.
Edit: without the stick inserted I'm not even getting prompted for my passphrase it is just being displayed that the device could not be found and "Keyfile could not be opened. Reverting to passphrase." But I never get a chance to enter it and being dropped to rootfs again.
By using the last stable live CD I could normally open my raid (while using the key from my usbstick) and was able to apply the suggested upgrades of mdadm and cryptsetup from testing and recreated my initramfs (/boot /proc /sys /dev were mounted). But the problem still exists and I'm going out of ideas.
Please tell me whether this issue should get it's own bug report or not.
You appear to be cherry picking from testing which is completely unsupported. Versions of lvm, udev, and mdadm are relevant.
And I'm using lvm2-2.02.95-4 udev-182-4 and mdadm-3.2.5-2
The problem occured and still occures when using cryptsetup-1.4.2-1 and mdadm-3.4.2-1 , too.
No other package on my machine is from testing and now I installed only main repo packages and recreated the initramfs.
Here is the initramfs generated completely without stuff from testing being installed.
http://www.2shared.com/file/fwctk3wY/initramfs-linux.html