You are not logged in.

#1 2016-12-06 02:44:35

xtian
Member
Registered: 2013-08-25
Posts: 179

[solved] After update I'm being dropped into the recovery shell...

I did the regular semi-monthly full update. I noticed an error flash by, "WARNING-Errors in build-image, may not be complete". I cavalierly ignored it and rebooted.
I guess I should have taken that warning more seriously, because now my system has been dropped to a recovery shell.

ERROR: device '/dev/mapper/cryptVG-root' not found. Skipping fsck.
ERROR: unable to find root device '/dev/mapper/cryptVG-root'
You are being dropped to a recovery shell
[...]

That's a first! After only a little bit of a searching, I found something to do:
Fix “Unable to find root device” Error in Arch Linux

Since this install has Luks on LVM, I first needed to use `cryptsetup` to open the Luks encryption.
With Luks open, I next needed to perform the LVM command `vgchange`.
Then I could mount the mapped encrypted drives to `/mnt/[new root]`.
Next, I followed the steps for chroot from ArchWiki.

After this I was able to return to the first link and implement all of the suggested fixes, which were, brielfy:

# pacman -Syyu
# pacman -S udev
# pacman -S mkinitcpio
# mkinitcpio -p linux

All of this went fine without error.

Unfortunately for me I'm right back where I started.

What does this scenario suggest to you?

Last edited by xtian (2016-12-10 15:48:41)

Offline

#2 2016-12-06 23:23:50

gay
Member
Registered: 2012-12-16
Posts: 90

Re: [solved] After update I'm being dropped into the recovery shell...

Does the boot process fail before or after it queries (should query) for the LUKS passphrase?

A wild guess: Perhaps either the /etc/mkinitcpio.conf or your bootloader config file has been overwritten during the update? You should check both. In /etc/mkinitcpio.conf check that the HOOKS variable contains keymap and encrypt and that keymap comes before encrypt (and that it contains an lvm hook, I believe, it is lvm2). You may also want to include dm_crypt, dm_mod and all encryption (say, twofish) and filesystem (say, xfs) modules your system needs in the MODULES variable.

Bootloader configs can be even more tricky. For instance the grub2 config hides in /etc/default/grub and requires a GRUB_CMDLINE_LINUX variable that specifies real root device, and devicename etc. ... But of course this all depends on what bootloader you have.

Last edited by gay (2016-12-07 00:23:43)


We are exactly the people our parents always warned us about.

Offline

#3 2016-12-07 00:20:32

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [solved] After update I'm being dropped into the recovery shell...

Did you mount /boot before you regenerated the initramfs?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2016-12-07 02:40:27

xtian
Member
Registered: 2013-08-25
Posts: 179

Re: [solved] After update I'm being dropped into the recovery shell...

Did you mount /boot before you regenerated the initramfs?

Not at first I didn't. Time I was paying more attention, "ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'." Of course! This drive is partitioned for dual-boot windows. After mounting /boot for chroot environment, Bob's your uncle.

Does the boot process fail before or after it queries (should query) for the LUKS passphrase?

After.

A little more digging around in the `pacman.log` and I traced some questions to this Bug report:

Device LVM not found after upgrade linux-lts and readline
Indeed. I am using Linux-LTS. The error is even the same:

After a reboot, impossible to boot with linux-lts:
'
ERROR: resume: hibernation device '/dev/mapper/lvm-swap' not found
ERROR: device '/dev/mapper/lvm-root' not found. Skipping fsck
ERROR: Unable to find root device '/dev/mapper/lvm-root
You are being dropped to a recovery shell
type 'exit' to try and continue booting
sh: can't acces tty; job control turned off
[rootfs ]#

This bug is also a duplicate of FS#51818 - [linux-lts][linux-zen][linux-grsec][linux] move to mkinitcpio hook lvm2 breakage

Last edited by xtian (2016-12-07 02:42:23)

Offline

#5 2016-12-07 21:33:34

gay
Member
Registered: 2012-12-16
Posts: 90

Re: [solved] After update I'm being dropped into the recovery shell...

So was the issue solved with the solution suggested in the comments to the bug report you cited?


We are exactly the people our parents always warned us about.

Offline

#6 2016-12-10 15:48:14

xtian
Member
Registered: 2013-08-25
Posts: 179

Re: [solved] After update I'm being dropped into the recovery shell...

gay wrote:

So was the issue solved with the solution suggested in the comments to the bug report you cited?

I'm a weekend-Linux-warrior, so that means I don't have any time to work except on the weekends. But I do keep the convo going during the week so I have something to do on the weekend.

So... Yes. I mounted from an external disk and then remade `mkinitcpio` as recommended in the newest comment.

Offline

Board footer

Powered by FluxBB