Upgrading a Motherboard in Linux: Kernel Panic
Kernel Panic, Meet Weeping UserI spent the weekend installing a new motherboard in my audio/video production computer. The old motherboard had a dead memory slot, so it was removed and converted into a skeet target. The new board is an ECS A740GM-M for AMD processors. What should have been a 30-minute chore turned into a vexing showstopper, because the Linux kernel in 64 Studio didn't get along with the new board and panicked on boot.
Kernel Panic, Meet Weeping UserSwapping in a new motherboard is usually a painless task on Linux systems. The most common problem is accidentally changing the hard drive order on a multiple-drive system, and then it won't boot because GRUB can't find the drives. Easy to fix, just plug the drives into the correct slots.
This a different problem. Here is a photo of the screen messages, which are typically cryptic and unhelpful.
While we're on the subject of unhelpful tech, when is the x86 BIOS going to catch up to its decades-old competitors, and provide a BIOS that includes some useful boot management and troubleshooting tools? Like capturing the boot messages, and the ability to step through the whole boot process one step at a time. There are a couple of ways to hack around this, such as monitoring bootup from a serial terminal, or buying and installing a PC Weasel card, which costs $350. Having this functionality integrated into the x86 PC BIOS would be a great help.
The messages indicate a kernel panic. The system boots normally up to the GRUB menu, and then when it gets to the kernel line it panics and requires a hard restart. Kubuntu 8.04 is installed on the same box, and it boots and runs fine. In fact it has several kernels, and they're all happy with the new board:
So I did, and it gave me a usable 64 Studio system. Here are the steps for copying a kernel from a different Linux installation:
- Go into /boot and copy the kernel you want to use from your "donor" system (there may be several kernels) plus its corresponding initrd and System_map files. These will all have the same version number as your kernel, like initrd.img-2.6.24-24-rt and System.map-2.6.24-24-rt. rt means "real time" kernel, which is essential for audio production.
- Copy them into /boot on the recipient system.
- Create a boot stanza in /boot/grub/menu/lst so you'll have an entry in your boot menu. You can copy any existing working stanza and replace the filenames. For example, for my 64 Studio system I now have two stanzas that look like this:
title 64 Studio, kernel 2.6.29-1-multimedia-686 root (hd1,0) kernel /boot/vmlinuz-2.6.29-1-multimedia-686 root=UUID=bb33260f-7472-4705-96a9-db09e86eed6f ro initrd /boot/initrd.img-2.6.29-1-multimedia-686 title test ubuntu kernel 2.6.24-24-rt root (hd1,0) kernel /boot/vmlinuz-2.6.24-24-rt root=UUID=bb33260f-7472-4705-96a9-db09e86eed6f ro initrd /boot/initrd.img-2.6.24-24-rtAn important thing to note here-- if your system uses root=UUID, be very sure you copy the correct UUID for your local system. This identifies the correct block device. Also note that each line needs to be one unbroken line, and not broken as the kernel line is in this example.
- Copy the /lib/modules directory that goes with your borrrowed kernel, which in this example is /lib/modules/2.6.24-24-rt
Old GRUB vs. New GRUBOne more note-- the GRUB examples are for old GRUB 0.97. GRUB 2.0 is starting to appear in distros, and it is very different to configure, an over-complicated spaghetti hash. Watch this space for a GRUB 2.0 tutorial.
Carla Schroder is the author of the Linux Cookbook and the Linux Networking Cookbook (O'Reilly Media), the upcoming "Building a Digital Recording Studio with Audacity" (NoStarch Press), a lifelong book lover, and the managing editor of LinuxPlanet and Linux Today.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: RHEL 6.5, Debian 7.2 and EOL for Linux 3.0.x
- 5Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10