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:

  1. Boot using the installation CD
  2. cryptsetup open /dev/path-to-encrypted-device tmpboot. At this point, all the LVM partitions will be accessible under /dev/mapper/lvm-partitions.
  3. mkdir /mnt/arch
  4. mount /dev/mapper/lvm-root-partition /mnt/arch
  5. mount -t proc proc /mnt/arch/proc
  6. mount -t sysfs sys /mnt/arch/sys
  7. mount -o bind /dev /mnt/arch/dev
  8. If the boot partition is separate, mount /dev/path-to-boot-device /mnt/arch/boot
  9. chroot /mnt/arch /bin/bash
  10. dhcpcd eth0 (or whatever the ethernet card’s name is)
  11. pacman -Syy
  12. pacman -Syu
  13. pacman -S udev
  14. pacman -S mkinitcpio
  15. mkinitcpio -p linux
  16. exit
  17. shutdown -r now