Ok, I've tried this now. Here is a slightly modified howto which uses sudo only when strictly required, and incorporates some tips from the Ubuntu Wiki page on
liveCD customization.
1. Open a terminal
You can open it from Applications > Accessories > Terminal, or alternatively pressing Alt+F2 and typing gnome-terminal in it.
2. Enter sudo password
Type
and enter your password.
3. Install things
To make sure you have all the programs you need, type
Code:
sudo apt-get install squashfs-tools genisoimage fakeroot file-roller
4. Set up
Type this, changing the values of the variables to specify what you want to do:
Code:
ORIG_IMAGE=~/Desktop/ubuntu-8.10-rc-desktop-i386.iso
MOD_IMAGE=~/Desktop/ubuntu-8.10-rc-desktop-i386-nosdhci.iso
MOD_LABEL="Ubuntu 8.10 i386"
TEMP_DIR=~/tmp
ORIG_IMAGE should point at the ISO file you already have, and MOD_IMAGE says where to put the modified ISO. MOD_LABEL and TEMP_DIR can be safely left alone.
5. Proceed
Copy this and paste it into your terminal verbatim:
Code:
mkdir -p "$TEMP_DIR/mod-distrib/ISO"
cd "$TEMP_DIR/mod-distrib"
file-roller -e ISO "$ORIG_IMAGE"
sudo unsquashfs ISO/casper/filesystem.squashfs
#START MODIFICATIONS
echo "# Local blacklist" > squashfs-root/etc/modprobe.d/blacklist.local
echo "blacklist sdhci" >> squashfs-root/etc/modprobe.d/blacklist.local
echo "blacklist sdhci-pci" >> squashfs-root/etc/modprobe.d/blacklist.local
#END MODIFICATIONS
rm ISO/casper/filesystem.squashfs
sudo mksquashfs squashfs-root ISO/casper/filesystem.squashfs -nolzma
sudo chown $USER ISO/casper/filesystem.squashfs
rm -rf squashfs-root
cd ISO
rm md5sum.txt
find . -type f -print0 | xargs -0 md5sum > md5sum.txt
fakeroot mkisofs -D -r -V "$MOD_LABEL" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o "$MOD_IMAGE" .
cd .. && rm -rf ISO
cd && rmdir "$TEMP_DIR/mod-distrib"
After a little wait the modified ISO will be on your desktop (or wherever you decided to place it), and all the messy temporary bits should have been cleared away. You can burn your ISO to a CD by double-clicking on it (provided you haven't explicitly modified this behaviour!)
If you need to do any other straight-forward modifications to the distribution (ie. add, remove or modify configuration files), do them between "#START MODIFICATIONS" and "#END MODIFICATIONS" above. Anything involving installing/removing packages requires a more sophisticated approach using a chroot cage as described in
the relevant wiki page, but the rest should remain valid.
Bookmarks