Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mikechau/3a1f30b9b5bd336b2e52c42fa83d116e to your computer and use it in GitHub Desktop.
Save mikechau/3a1f30b9b5bd336b2e52c42fa83d116e to your computer and use it in GitHub Desktop.
Minimal instructions for kernel downgrade on arch linux with full system encryption using dm-crypt and luks
# Kernel downgrade on ARCH Linux with encrypted file-system
#
# assumes you followed https://gist.github.com/mattiaslundberg/8620837 to set up your system
#
# Credits:
# https://stephentanner.com/restoring-grub-for-an-encrypted-lvm.html
# https://wiki.archlinux.org/index.php/Kernel_Panics
# Boot into archiso live USB
# load the dm-crypt module
modprobe dm-crypt
# decrypt the root partition
cryptsetup luksOpen /dev/sda3 linux
# run `vgscan` to verify, should produce output similar to
# `Found volume group "vg0" using metadata type lvm2`
# activate logical volumes
vgchange -a y vg0
# `3 logical volume(s) in volume group "vg0" now active`
# verify with `lvscan`
# mount the root partition
mount /dev/vg0/root /mnt
# change root
arch-chroot /mnt /bin/bash
# mount boot partition
mount /dev/sda2 /boot
# list previous kernel versions in pacman cache
find /var/cache/pacman/pkg -name "linux-4.*"
# downgrade to a previous kernel version
pacman -U /var/cache/pacman/pkg/linux-4.xx-x.pkg.tar.xz
# exit and reboot
exit
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment