Installing a new kernel on Debian

Update: If you install it using another method, the kernel can simply by updated with the standard APT update tool. However, there is a bug in the kernel update script. After the update, the USB drive is not longer recognised. It has the error sd_mod: Unknown symbol scsi_verify_blk_ioctl. To fix this, you must flash the kernel to the internal memory with (it might be needed to install flash-kernel first): [code]sudo flash-kernel[/code]

Original post: I installed my SheevaPlug with Debian on an SD card using the alternative Debian install method. This works great, with one minor drawback: the kernel is never updated by Debian package management. Luckily, it’s not that complicated to install a new kernel. Sheeva with Linux publishes kernels for the Sheevaplug. There is also a script to update the kernel. On my Sheevaplug however, I could not use this script. The kernel is saved on a small boot partition of the SD card. This partition is too small to copy a new kernel to. Manually doing all the steps is straightforward too.

  1. By default, the boot partition of the SD card is not mounted, so mount it to /boot:
    [code]mount /dev/mmcblk0p1 /boot[/code]
  2. Make backups of the file that will be overwritten. This include the file /boot/uImage and the folder /dev/firmware
  3. Go to Sheeva with Linux and choose a kernel, the latest will be fine. At the time I did this, this was 2.6.35.2. Download the files sheeva-*-uImage, sheeva-*-System.map, and sheeva-*-Modules.tar.gz. Just save them in your home directory
  4. Execute the following commands to extract the new modules and install the symbol table (replace {ver} with the kernel version you downloaded, e.g. 2.6.35.2):
    [code]tar x -C / –overwrite -zf sheeva-{ver}-Modules.tar.gz
    depmod -eF /boot/sheeva-{ver}-System.map {ver}[/code]
  5. Remove the old kernel and copy the new kernel:
    [code]rm /boot/uImage
    mv sheeva-*-uImage /boot/uImage[/code]
  6. Reboot with the command [code]reboot[/code]

The SheevePlug should now reboot. After a minute or so, you should be able to log in again. Use the command [code]uname -a[/code] to check if the new kernel is running. If something goes wrong, you can remove the SD card from the plug, put it in another computer and restore the backup files. I did everything from a SSH session. If you want more information (e.g. the error message during boot), you can do the upgrade over a USB terminal connection.

One thought on “Installing a new kernel on Debian

Leave a Reply

Your email address will not be published. Required fields are marked *