These are the steps for adding a TuxOnIce enabled kernel to Grub's menu.

Copy the new kernel to /boot

First, copy your compiled kernel to the /boot directory:

cp arch/i386/boot/bzImage /boot/tuxonice_kernel

You can, of course replace "tuxonice_kernel" with another name. For now, though, be sure not to replace an existing kernel. If anything is wrong with the new kernel such that you can't boot it, you will want to be able to use your old kernel to fix things up.

Install the modules for your kernel

make modules_install

Note that if you were previously running another kernel with the same base version name (eg 2.6.24-rc3), the modules for that kernel will be overwritten by this command. This may make the other kernel be unable to load modules, and therefore less useful as a backup if you have any problems with the kernel you're about to test.

Add menu.lst entry

Grub uses a configuration file that you'll probably find in /boot/grub. It is usually named /boot/grub/menu.list. You want to add a new entry, based on the kernel you're currently using, but pointing at the new kernel:

Here is an example entry:

title           TuxOnIce
root            (hd0,1)
kernel          /boot/26test root=/dev/hda2 ro quiet resume=swap:/dev/hda1 vga=791
initrd          /boot/initrd.img.gz
savedefault
boot

The initrd line may be missing. Don't worry if it is.

As from 2.6.19 kernel line is as follows: kernel /boot/26test root=UUID=b1f1a6a7-e6d4-4bda-8c1a-8b75c4abbb62 ro quiet resume=swap:/dev/hda1 vga=791 Your UUID can be found by looking in fstab (cat /etc/fstab)

Adding resume= to the commandline

In the example above, notice the kernel line. We have added 'resume=swap:/dev/hda1'. When you boot a TuxOnIce enabled kernel, the TuxOnIce code needs to figure out whether you have previously suspended, or if this is a normal boot. In order to do this, it looks somewhere on your storage for a signature containing the information. Adding the 'resume=' component tells TuxOnIce where to look for that signature.

If you are planning on using the Filewriter to store your image, or the swapwriter with a swapfile, then we don't yet have enough information for you to be able to do this step; you'll need to come back and complete it later.

If, on the other hand, you're planning on using an existing swap partition, you can go ahead and enter the resume= line now. Simply follow the pattern shown above, replacing /dev/hda1 with the parittion on which your swap is located. The 'swap:' part tells TuxOnIce whether to use the swapwriter or the filewriter. If, when compiling the kernel, you only selected one of them, you don't _need_ to include this component; you can choose to abbreviate it to 'resume=/dev/hda1'.

Unlike lilo, you don't need to do anything further. Grub has the nous to find your file without you needing to rerun a binary to tell it about your edits.

Reboot!

You can now reboot into the new kernel. When you boot, the default may still be set to the old kernel. Don't forget to explicitly choose the new one. Once you're satisfied that it works ok, you might want to change the default over. We recommend retaining the old kernel and its entry, just in case you have problems with later updates.

Back

None: Grub (last edited 2007-11-28 02:05:01 by NigelCunningham)