Skip to content

Instantly share code, notes, and snippets.

@sieste
Created November 14, 2016 22:35
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sieste/586f727ac860ee0f896cbb8326846933 to your computer and use it in GitHub Desktop.
Save sieste/586f727ac860ee0f896cbb8326846933 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