Difference between revisions of "Kernel Panics"

From ArchWiki
Jump to: navigation, search
(Chroot to your normal root)
m (Chroot to your normal root: /dev/sdXZ)
Line 22: Line 22:
 
  # mount /dev/sdXY /mnt
 
  # mount /dev/sdXY /mnt
 
If you use a boot partition, don't forget to mount it
 
If you use a boot partition, don't forget to mount it
  # mount /dev/sdaXY /mnt/boot
+
  # 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:
 
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:

Revision as of 08:55, 28 March 2008

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end


This page describes how to fall back to a previously installed kernel version if the current one fails.

Start from the installation CD

The first step is booting the installation CD. When started, type arch, like you would when installing arch.

# arch

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

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.

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.