You are not logged in.

#1 2022-03-05 22:34:53

mobilin
Member
Registered: 2022-03-05
Posts: 2

keyboard not working in emergency shell after system update@2022-03-03

Hello all,

Just rebooted my Lenovo ThinkPad L440 after system update (systemd went from 250.1-1 to 250.3-4), and keyboard no longer works in emergency shell*:

...
You are now being dropped into an emergency shell. 
sh: can't access tty; job control turned off
[rootfs ]# _

I've read countless similar threads, but they are all from old years. From GRUB shell (where keyboard still works) I tried insmod`ding anything related to keyboard to no avail. Also tried "initrd ...fallback...." image, but alas.

I'm not really well-versed in GRUB shell, are there more magic options that I could try before resorting to booting liveUSB to the rescue?


* - lame excuse: I always prefer emergency shell, as it deters if whoever noob might steal my laptop :) I simply mount the block device to /new_root and it boots on. I'm later met with LUKS passphrase prompt, which I bet still wouldn't work due to this issue, even if I wasn't lazy to finally fix my automounts to avoid emergency shell.

Last edited by mobilin (2022-03-07 15:31:31)

Offline

#2 2022-03-07 15:21:03

mobilin
Member
Registered: 2022-03-05
Posts: 2

Re: keyboard not working in emergency shell after system update@2022-03-03

UPDATE: booted live USB image and the only thing that helped was rebuilding initramfs from there and borrowing its kernel:

mkdir -p /tmp/rootfs/boot
mount /dev/sda2 /tmp/rootfs
mount /dev/sda1 /tmp/rootfs/boot
mv /tmp/rootfs/boot/initramfs-linux.img /tmp/rootfs/boot/initramfs-linux.img.orig
if [ ! -e /tmp/rootfs/lib/modules/$(uname -r) ]; then  # live USB has 5.16.11-arch1-1, whereas my rootfs had 5.16.11-arch1-2
    mv /tmp/rootfs/boot/vmlinuz-linux /tmp/rootfs/boot/vmlinuz-linux.orig
    cp /run/archiso/bootmnt/vmlinuz-linux  /tmp/rootfs/boot/
    cp -ar /lib/modules/$(uname -r) /tmp/rootfs/lib/
fi
cp /etc/mkinitcpio.conf /tmp/ # and remove all archiso* HOOKS
mkinitcpio -c /tmp/mkinitcpio.conf -k /tmp/rootfs/boot/vmlinuz-linux -g /tmp/rootfs/boot/initramfs-linux.img

If I simply run mkinitcpio -P from my chroot, it produces the same unbootable initramfs.

The differences between live USB and my rootfs' mkinitcpio.conf are: on live USB it doesn't have autodetect and fsck HOOKS, and on my rootfs it doesn't have memdisk HOOK, as well as it compresses as zstd instead of xz.

I may bisect one day which difference exactly is causing the issue.


P.S. There is also a chance that it's not the keyboard that's not working, but input is frozen, or the whole system is frozen at that prompt (also tried external USB keyboard to no avail, and downgrading to systemd-249 didn't help either).

Last edited by mobilin (2022-03-07 15:29:38)

Offline

Board footer

Powered by FluxBB