I too have been messing with rebuilding the livefs kernel for Ultimate Edition 2.6.1 & have had success. I went from 10.04.1's 2.6.32-17-generic to 2.6.32-27-generic, also saving 100's of MB of space. I hope I can shed some light. Note: there are some fairly heavy commands used below, please use caution:
Code:
#Do not screw around root up
#sudo passwd
su
#grab required tools
apt-get install squashfs-tools lzma lzma-source
#initiate build
modprobe squashfs
#remove old if nec.
rm -R edit
rm -R extract-cd
rm -R mnt
rm -R squashfs
#prepare
mkdir edit
mkdir extract-cd
mkdir mnt
mkdir squashfs
#mount & extract
mount -o loop ultimate-edition-2.6-x64.iso mnt
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs
cp -a squashfs/* edit/
#setup networking for chroot environment
cp /etc/resolv.conf edit/etc
cp /etc/hosts edit/etc
#sources list? (optional)
cp edit/etc/apt/sources.list edit/etc/apt/sources.bak
cp /etc/apt/sources.list edit/etc/apt
#optional extra sources...
cp /etc/apt/sources.list.d/* edit/etc/apt/sources.list.d/
#Mount proc etc. as su
#sudo passwd
#su
umount /home/theemahn/wip/squashfs/
umount /home/theemahn/wip/mnt/
mount --bind /dev/ edit/dev
#mount --bind / edit <<- unnecessary
chroot edit
mount -t devpts none /dev/pts
mount -t proc none /proc
mount -t sysfs none /sys
cd tmp/
apt-get update
#
# The Section of your concern, I typically use it for plymouth splashes #
# In this case a new Kernel, custom plymouth splash also comes along ;) #
#
###########################################################################
#Special commands needed to build new kernel to obtain Plymouth from chroot#
###########################################################################
#Assume super user role - not necessary as done earlier
#su
#unnecessary as done above
#chroot edit
#mount -t devpts none /dev/pts
#mount -t proc none /proc
#mount -t sysfs none /sys
#plymouth-set-default-theme -R Ultimate_Edition_2.6 <<-history, done differently see below
#The above plymouth commands are now depreciated, below setting 250 will make it take over any other known o/s
#customizations
#update-alternatives --install /lib/plymouth/themes/default.plymouth default.plymouth /lib/plymouth/themes/Ultimate_Edition_2.6/Ultimate_Edition_2.6.plymouth 250
#update-alternatives --config default.plymouth #use this command if you wish to change
#change plymouth to another theme always execute the following after the fact.
#update-initramfs -u
#CAUTION:
#Purge all old kernels - This is pretty heavy (please pay close attention to output on the console)
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs -p sudo apt-get -y purge
#Grab headers and source for remaining single kernel
apt-get install build-essential linux-headers-`uname -r` linux-image-`uname -r`
#update initramfs
update-initramfs -u -k all
depmod -a
#this can be used if you wish to install additional drivers as falconindy has said above firmware I believe in your case to be located in cd /lib/modules/`uname -r`/kernel/drivers/firmware/
# Adding Additional drivers Example (as provided by falconindy now hard coded in my wip file):
# =================================
# * Put the kernel driver in the proper place (/lib/modules/`uname -r`/kernel/drivers/net/)
# * Run `sudo depmod -a` and verify that the module has been added in "/lib/modules/`uname -r`/modules.dep".
# * Create a new file in /usr/share/initramfs-tools/modules.d/ with the name of your driver and add the name of the module as well as any dependencies to that file. For example, if you were adding btrfs to your boot image, you'd make a # file called btrfs and add:
# Code:
#
# btrfs
# zlib-deflate
# libcrc32c
# crc32c
#If you ran depmod successfully, modules.dep will tell you what other modules your new driver is dependent on
# * Regenerate the image with: `update-initramfs -u -k all`
# You may need a boot hook as well depending on what exactly the new driver is for.
#Build Initrd.lz
mkinitramfs -o /tmp/initrd.lz `uname -r`
#copy vmlinuz
cp /boot/vmlinuz-`uname -r` /tmp/vmlinuz
#Scrap source and headers (optional)?
#apt-get --remove --purge linux-headers-`uname -r` linux-image-`uname -r`
#unmount
umount -f /proc/sys/fs/binfmt_misc
umount /proc
umount /sys
umount /dev/pts
exit
umount /home/theemahn/wip/edit/dev
#Transfer to disk to build
mv edit/tmp/initrd.lz extract-cd/casper/
mv edit/tmp/vmlinuz extract-cd/casper/
## PROCEED TO BUILD SECTION ##
It's not often I post over here. I hope you appreciate it, and thanks for the tidbit of info falconindy.
TheeMahn,
Bookmarks