If a system does not boot anymore, it's usually easiest to boot from a live-media and chroot into the installation to troubleshoot the issue at hand. I'll be using the archlinux installation iso to chroot into a debian install to fix a kernel update that's gone sideways.
Once in the arch installation, make sure that the disks are all detected:
root@archiso ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 853.9M 1 loop /run/archiso/airootfs
sr0 11:0 1 1.2G 0 rom /run/archiso/bootmnt
vda 254:0 0 32G 0 disk
├─vda1 254:1 0 976M 0 part
└─vda2 254:2 0 31G 0 part
├─vg_base-lv_root 253:0 0 3.8G 0 lvm
├─vg_base-lv_usr 253:1 0 5.7G 0 lvm
├─vg_base-lv_var 253:2 0 3.8G 0 lvm
├─vg_base-lv_var_log 253:3 0 3.8G 0 lvm
├─vg_base-lv_var_tmp 253:4 0 1.9G 0 lvm
├─vg_base-lv_tmp 253:5 0 488M 0 lvm
├─vg_base-lv_home 253:6 0 976M 0 lvm
└─vg_base-lv_swap 253:7 0 1.9G 0 lvm
Next, mount all the required partitions as well as /proc, /sys, /dev and /run:
root@archiso ~ # mount -t xfs /dev/vg_base/lv_root /mnt
root@archiso ~ # mount -t xfs /dev/vg_base/lv_usr /mnt/usr
root@archiso ~ # mount -t xfs /dev/vg_base/lv_var /mnt/var
root@archiso ~ # mount -t xfs /dev/vg_base/lv_var_log /mnt/var/log
root@archiso ~ # mount -t xfs /dev/vg_base/lv_var_tmp /mnt/var/tmp
root@archiso ~ # mount -t xfs /dev/vg_base/lv_tmp /mnt/tmp
root@archiso ~ # mount -t xfs /dev/vg_base/lv_home /mnt/home
root@archiso ~ # mount -t xfs /dev/vda1 /mnt/boot
root@archiso ~ # mount -o bind -t proc /proc /mnt/proc
root@archiso ~ # mount -o bind -t sysfs /sys /mnt/sys
root@archiso ~ # mount -o bind -t dev /dev /mnt/dev
root@archiso ~ # mount -o bind -t devpts /dev/pts /mnt/dev/pts
root@archiso ~ # mount -o bind -t run /run /mnt/run
After everything has been mounted, chroot into the installation:
root@archiso ~ # chroot /mnt /bin/bash
The issue in my case was a missing '/boot/vmlinuz-6.1.0-37-amd64'. To check which package provides the file in question, use 'dpkg -S' on a Debian based system and reinstall it using 'apt-get reinstall':
root@archiso:/# sudo apt-get -y reinstall $(dpkg -S /boot/vmlinuz-6.1.0-37-amd64 | cut -d ':' -f 1)
Leave the chroot environment, unmount the partitions and reboot into the Debian installation:
root@archiso:/# exit
root@archiso ~ # umount -R /mnt
root@archiso ~ # systemctl reboot
Debian should now boot as expected.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment