Kernel Panics
From ArchWiki
| i18n |
|---|
| English |
| Español |
| Italiano |
| 简体中文 |
This page describes how to fall back to a previously installed kernel version if the current one fails.
Contents |
[edit] Start from the installation CD
The first step is booting the installation CD. When started, type arch, like you would when installing arch.
# arch
[edit] Chroot to your normal root
When booted, you are in a minimal but functional live GNU/Linux environment with some basic tools. Now, you have to mount your normal root disk to /mnt.
# mount /dev/sdXY /mnt
If you use a boot partition, don't forget to mount it
# mount /dev/sdXZ /mnt/boot
Newer kernels use an initial ramdisk to set up the kernel environment. When you reinstall a kernel, that initial ramdisk will be regenerated with mkinitcpio. One of mkinitcpio's features is that it does autodetection to find out what kernel modules are required for starting up your computer. For this autodetection to work, /dev, /sys and /proc need to mounted in your chroot:
# mount -t proc none /mnt/proc # mount -t sysfs none /mnt/sys # mount --bind /dev /mnt/dev
Now, we will chroot to this disk:
# chroot /mnt
[edit] Roll back to previous kernel version
If you keep your downloaded pacman packages, you now can easily roll back. If you didn't keep them, you have to find a way to get a previous kernel version on your system now.
Let's suppose you keep the previous versions. We will now install the last working one.
# pacman -U /var/cache/pacman/pkg/kernel26-2.6.23.xx-x.pkg.tar.gz
Maybe you'll have to change the version numbers to the version that last worked for you, but it won't make a big difference.
[edit] Reboot
Now the working kernel is reinstalled, you can safely reboot your PC, and boot your computer as usual. Don't forget to check the arch-newspage to check what went wrong with the kernel build.