You are not logged in.

#1 2020-04-21 13:24:53

mixxoo
Member
Registered: 2017-05-04
Posts: 10

[SOLVED]No keyboard in systemd initrd emergency shell

Hello,

I have been trying to apply recent systemd feature "systemd.volatile=overlay" to mount the root partition as an overlay filesystem with changes lost at reboot.

I created a new initrd archive with mkinitcpio containing following hooks :

HOOKS=(base systemd autodetect block filesystems sd-vconsole fsck keyboard).

I use UEFI boot with systemd-boot as the bootloader. Then I added a new entry selecting recently built initramfs containing systemd instead of default base-udev configuration.

After reboot initrd-switch-root.service had failed and I had no way to investigate why because the keyboard did not work at all. After a few days of googling and running in circles I ran out of ideas. Here are maybe two questions at once : Why the switch-root.service may fail and why there is no keyboard in initrd rescue shell with systemd?

Notes: systemd 245.2-2, all keyboard hid kernel modules confirmed to be present in generated initramfs, emergency shell without systemd (default initramfs) works fine.

Do you any have some experience with systemd.volatile=overlay? Is there somebody actually got it working. I found some question about it on github (https://github.com/systemd/systemd/issues/13858), however Lennart Poettering only said "this requires that systemd is used in the initrd" and nothing more.

Thank you for any ideas or hints.

EDIT: No answers, try to help yourself smile After some testing I managed to setup overlayfs on root manually from the emergency shell of fallback initramfs generated after kernel update. I do not need systemd initrd anymore. The keyboard probably did not work because, according to messages on the screen, the required kernel modules had been unloaded before switch-root.service has been started. BTW even with systemd mkinitcpio hook enabled there was no systemd-volatile-root.service and binary in generated image.

Last edited by mixxoo (2020-04-23 09:42:12)

Offline

Board footer

Powered by FluxBB