void linux: recover from grub, kernel panic using live OS

# mount & chroot to void
cryptsetup open /dev/nvme0n1p2 root
mount /dev/mapper/root /mnt
mount /dev/nvme0n1p1 /mnt/boot
mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys
mount --rbind /dev /mnt/dev && mount --make-rslave /mnt/dev
mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc
chroot /mnt /bin/bash

# regenerate initramfs and grub config
VERSION=5.18.16_1
mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-$VERSION.img -k $VERSION

Leave a Reply

Your email address will not be published.