Arch Linux Upgrade and LVM
Arch Linux Upgrade and LVM
I just ran a pacman -Syu
recently that also did a kernel upgrade. I was surprised to find out that I could no longer boot! My machine told me that the root device MyVol-root
could not be found, which is one of my LVM partitions. I investigated and found out this happens when a kernel upgrade breaks initramfs. I additionally found a thread where user pineapple-biku found a fix to the issue. I am replicating it here, for easier retrieval in the future:
- Boot using the installation CD
cryptsetup open /dev/path-to-encrypted-device tmpboot
. At this point, all the LVM partitions will be accessible under/dev/mapper/lvm-partitions
.mkdir /mnt/arch
mount /dev/mapper/lvm-root-partition /mnt/arch
mount -t proc proc /mnt/arch/proc
mount -t sysfs sys /mnt/arch/sys
mount -o bind /dev /mnt/arch/dev
- If the boot partition is separate,
mount /dev/path-to-boot-device /mnt/arch/boot
chroot /mnt/arch /bin/bash
dhcpcd eth0
(or whatever the ethernet card’s name is)pacman -Syy
pacman -Syu
pacman -S udev
pacman -S mkinitcpio
mkinitcpio -p linux
exit
shutdown -r now