Saturday, February 11, 2023

Manjaro does not boot due to kernel panic? Your Grub Customizer and oudated libcrypto.so.1.1 may be to blame

Symptoms:

Kernel panic when booting:

kernel panic - not syncing:

VFS: Unable to mount root fs on [...]

libcrypto.so.1.1 error in Grub Customizers, os-prober etc:

/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory


Solution:
  1. Start by chrooting into your Manjaro installation, from a live or current system: sudo chroot [mount point of Manjaro partiton]/HP_P5_Manjaro

  2. Mount the required file systems (only this version works, not the --bind one): mount -t proc none /proc mount -t sysfs none /sys mount -t devtmpfs none /dev mount -t tmpfs none /run

  3. (Check via df -h and mount if things work)

  4. Recreate the initramfs:
    sudo pacman -S mkinitcpio   and maybe sudo mkinitcpio -P for good measure

  5. Remove any previous installations of GRUB customizer: sudo pacman -R grub-customizer

  6. Backup the original GRUB configuration files: sudo cp -a /etc/default/grub /etc/default/grub.bak sudo cp -a /etc/grub.d /etc/grub.d.bak

  7. Remove the old GRUB configuration files: sudo rm -rf /etc/default/grub sudo rm -rf /etc/grub.d

  8. Reinstall GRUB using pacman, to recreate /etc/default/grub etc.:

  9. pacman -S grub

  10. Recreate the GRUB configuration: sudo grub-mkconfig -o /boot/grub/grub.cfg

  11. Enable os-prober in GRUB: sudo sed -i 's/^#\(GRUB_DISABLE_OS_PROBER=false\)/\1/' /etc/default/grub

  12. Update GRUB, for good measure: sudo update-grub


As code only:

sudo chroot /media/[your e.g. Ubuntu user name]/HP_P5_Manjaro
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev
mount -t tmpfs none /run
sudo pacman -R grub-customizer
sudo pacman -S mkinitcpio
sudo cp -a /etc/default/grub /etc/default/grub.bak
sudo cp -a /etc/grub.d /etc/grub.d.bak
sudo rm -rf /etc/default/grub
sudo rm -rf /etc/grub.d
pacman -S grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo sed -i 's/^#\(GRUB_DISABLE_OS_PROBER=false\)/\1/' /etc/default/grub
sudo update-grub