meh...

coding - hacking - rambling - brainvomiting

Downgrading a Bad Kernel on Arch With LUKS and LVM

  • boot into the ArchLinux Install Medium.
  • here the steps to get the chroot running and where to probably find the old kernel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# load dm_crypt/luks
modprobe dm_crypt
modprobe dm_mod #not sure if needed

# open the crypt container
cryptsetup luksOpen /dev/sd[x] crypt

# scan for new LVM drives and activate them
vgscan
vgchange -ay

# create a basefolder and mount all the stuff in it (I assume you use btrfs with compression and seperate partitions for root,home and var - adapt to your own system)
mkdir ${arch_base}
mount -o compress=lzo /dev/mapper/cryptpool-cryptroot ${archbase}
mount -o compress=lzo /dev/mapper/cryptpool-crypthome ${archbase}/home
mount -o compress=lzo /dev/mapper/cryptpool-cryptvar ${archbase}/var

mount -t proc proc ${archbase}/proc
mount -t sysfs sys ${archbase}/sys
mount -o bind /dev ${archbase}/dev

# start chroot
chroot ${archbase} /bin/zsh

# find your old kernel in /var/cache/pacman/pkg/linux-* and install it
pacman -U ${kernel-package}

# you propably also want to downgrade the kernel-headers
# (linux-headers-*)

# finally add this to your /etc/pacman.conf
# IgnorePkg   = linux linux-headers

# exit chroot, umount all the stuff again and reboot
exit
umount ${new_arch}/{home,var,proc,sys,dev}
umount ${new_arch}
reboot