0

I have a pretty basic ArchLinux setup in VirtualBox that I regularly copy over to a USB stick to boot on a real machine. It worked fine for the past few months, but after the last update (Oct 8th 2018) GRUB2 no longer recognizes my LUKS-encrypted system partition, when booting off the USB stick, and drops me into an emergency shell. Running blkid in that shell reveals that GRUB2 doesn't even recognize the USB stick it is loaded from.

Here is a little summary of things that work(ed) and that don't work suggesting that neither my computer nor my USB stick are the problem, but my Arch system:

                          |                      ArchLinux                      |  Fresh install of
                          |  before update  |  after update  | fresh reinstall  |   Ubuntu 18.04.1
--------------------------+-----------------+----------------+------------------+--------------------
Booting from virtual hard |     worked      |     works      |      works       |       works*
disk in VirtualBox        |                 |                |                  |
--------------------------+-----------------+----------------+------------------+--------------------
Booting from USB          |     worked      |  NOT WORKING   |   NOT WORKING    |       works*
in VirtualBox             |                 |                |                  |
--------------------------+-----------------+----------------+------------------+--------------------
Booting from USB          |     worked      |  NOT WORKING   |   NOT WORKING    |       works*
on a computer             |                 |                |                  |

* with and without full disk encryption (LVM on LUKS)

Naturally I tried to fix this by firing up the Arch-iso, mounting all the partitions (of the USB stick), arch-chrooting into the system, checking /etc/mkinitcpio.conf as well as /etc/default/grub and running mkinitcpio -p linux as well as grub-mkconfig -o /boot/grub/grub.cfg. Still not able to boot... I also tried overwriting the USB stick with the updated and still working system from the virtual hard disk, but with no luck either.

Has anyone a clue as to what might be causing this behavior or any hint where I need to look for problems? It can't be the disk encryption, because the system on the virtual hard disk still works after the update (and sadly I haven't got a backup from before the update).


UPDATE: Booting with the fallback initramfs works fine in all cases (vbox, usb in vbox, usb on machine). There might be some hooks missing in the mkinitcpio.conf.


Here are some specifics about my Arch system: It is an EFI system with a GPT formatted disk containing just two partitions, a 200 MiB FAT32 partition with GRUB2 on it and a 15.8 GiB LUKS container holding the ext4 system partition, no LVM involved. Here is a summary of the configuration files. If you need more, let me know.

# /etc/mkinitcpio.conf
[...]
HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)
[...]

# /etc/default/grub
[...]
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/disk/by-uuid/UUID_OF_LUKS_CONTAINER:cryptosystem"
GRUB_CMDLINE_LINUX=""
[...]
#GRUB_DISABLE_LINUX_UUID=true
[...]
#GRUB_ENABLE_CRYPTODISK=y
[...]

# /boot/grub/grub.cfg
[...]
linux /vmlinuz-linux root=UUID=UUID_OF_FS_INSIDE_LUKS rw cryptdevice=/dev/disk/by-uuid/UUID_OF_LUKS_FS:cryptosystem quiet
[...]

Tags: usb, arch-linux, grub2

0

Removing the autodetect hook solves the problem, now I can boot the system without using the fallback image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.