Custom kernel for Ubuntu 10.04 Live USB install

I created a persistent live USB for Ubuntu 10.04 by using usb-creator-gtk, which is a great utility! Now, I want to install a custom kernel. I created .deb packages for my custom kernel using another one of my posts here (“Building Ubuntu kernels the right way”). Then, I tried to install my custom kernel from within the live environment. This put the vmlinuz file and the modules in place, but did not create an initrd or update the syslinux bootloader. I created the initrd myself using mkinitramfs. Assuming you know how to do that. Steps for updating syslinux:

1. Copy the kernel to /cdrom/casper (and name it something compatible with vfat)
2. Repackage the initrd to be compressed with .lz

mkdir initrd-tmp
cd initrd-tmp
gzip -dc /path/to/initrd.gz | cpio -id
find . | cpio --quiet --dereference -o -H newc | lzma -7 > /path/to/new-initrd.lz

3. Copy the new initrd.lz to /cdrom/casper
4. Update /cdrom/syslinux/text.cfg.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s