You are not logged in.

#1 2016-11-15 19:06:01

Teorax
Member
Registered: 2016-11-15
Posts: 17

[SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Hi all,

I brought myself into a stupid situation:
After reading about a bug in cryptsetup (http://hmarco.org/bugs/CVE-2016-4484/CV … shell.html) I tried to reproduce it on my system out of curiosity (I know: stupid idea -_-): and it worked, after holding "Enter" pressed for around a minute during cryptsetup pass phrase dialog I got to a shell.

The problem now is that after reboot and the correct pass I still drop to shell, since the root partition cannot be found.
The output is:

ERROR: resume: hibernation device '/dev/cryptlvm/swap' not found
ERROR: device '/dev/mapper/cryptlvm-root' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/cryptlvm-root'.

followed by the shell:

You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
sh: can't access tty: job control turned off
[rootfs ]#

Can someone give me a idea on how to resolve that?
I tried to lookup a solution but am just don not understand boot parameters well enough. sad The partitions itself is still intact. I can load it from live CD and all but if I try to open it with cryptsetup from the supposed recovery shell above it is already opened.

Thank you for your time.
Best,

Teo

Edit: Original title: Cannot boot into encrypted LVM anymore after pressing ENTER too long.
It seems the error was not recovery console related, since not reproducable. See also https://bbs.archlinux.org/viewtopic.php?id=219585

Last edited by Teorax (2016-11-16 17:16:33)

Offline

#2 2016-11-15 19:14:52

frostschutz
Member
Registered: 2013-11-15
Posts: 1,009

Re: [SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Did you do anything once dropped to the shell?

Dropping to a recovery shell is a standard feature of many Initramfs implementations, sometimes it saves you the need of having to boot a real recovery system. It's not really a security issue, at most it's an unwanted feature if you're dealing with evil maid and have everything else locked down...

As long as you don't mess up your HDDs (dd, mkfs, ...) once dropped to that shell, there should be no permanent change at all, just reboot and everything is back to normal. So it's strange that your issue persists...

Can you open it from a livecd? If not then your issue is deeper. Maybe it coincided with hardware failure.

Offline

#3 2016-11-15 19:45:31

Teorax
Member
Registered: 2016-11-15
Posts: 17

Re: [SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Thx for the quick reply.

I did not do anything really in the recovery shell (ls and list of commands). I thought of the whole progress in the same way you describe it, thus expected no permanent change. Still I can't boot.

As written, yes, I can still open the encrypted container and mount the partitions inside from a live cd.

I don't really know how to approach the problem. Trying to rebuild GRUB? Can I boot somehow from that recovery shell?

Thank you for your help
Best
Teo

Offline

#4 2016-11-15 21:58:06

frostschutz
Member
Registered: 2013-11-15
Posts: 1,009

Re: [SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Oh sorry, somehow I missed that.

I'd chroot and regenerate kernel/initramfs (mkinitcpio), see if that changes anything.

You could also try the fallback image, if you have that, just in case it's related to missing kernel modules somehow.

If that doesn't solve it you'll have to check everything... crypttab, fstab, kernel parameters (`cat /proc/cmdline` in the initramfs shell for those), mkinitcpio config, ...?

If you open crypt devices on a livecd, give them the same names as specified in your crypttab.

Last edited by frostschutz (2016-11-15 21:58:55)

Offline

#5 2016-11-15 23:13:05

Teorax
Member
Registered: 2016-11-15
Posts: 17

Re: [SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Thanks for your help.
I'll try chroot and see on. I'm confident I can handle with the wiki from there. I will post my result.  Seems like the reason for all the hassle will stay in the dark.

Offline

#6 2016-11-16 16:51:51

frostschutz
Member
Registered: 2013-11-15
Posts: 1,009

Re: [SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Same issue here, archlinux update somehow created an initcpio with incompatible libraries: https://bbs.archlinux.org/viewtopic.php?id=219585

Running mkinitcpio should sort it.

Offline

#7 2016-11-16 17:13:46

Teorax
Member
Registered: 2016-11-15
Posts: 17

Re: [SOLVED]Cannot boot into encrypted LVM anymore after pressing ENTER...

Hi frostschutz,

thanks for the link and ongoing help.
I was also able to rebuild initramfs in more or less the same way via live USB and chroot. Everything back to normal now.

Since I couldn't reproduce the effect, I suppose the error also came with an update coincidentally.

I am very grateful for your great support!

Teo

Offline

Board footer

Powered by FluxBB