Revision of Customizing a Trisquel iso from Fri, 08/30/2013 - 12:27
The revisions let you track differences between multiple versions of a post.
To customize a Trisquel .iso image, you must first download it and place it in an empty directory. Open a terminal and go to that directory, then follow these steps. Note that your architecture must be same as the target, i.e. you cannot customize a 64 bit iso from a 32 bit system (beyond editing the preseed file).
Unpacking
- Become root. All commands below will be run as root.
sudo su
- Create an empty directory and mount the iso on it, then extract the contents:
mkdir tmp mount -o loop trisquel-original.iso tmp cp tmp -a src umount tmp
- Extract the squashed image files into casper/filesystem.squashfs:
mount src/casper/filesystem.squashfs -o loop tmp cp tmp -a jail umount tmp
The Preseed File
Trisquel comes with a preseed file which allows preloading values into the debconf database. You can find the file at src/preseed/trisquel.seed. The file contains commented examples on the changes it can make, like changing the default locale, setting a static network configuration, or automagically installing an extra set of packages before the live-to disk install process (which you need internet access during the install to do).
If you can achieve all the customization you need by changing this file, you can omit the next step.
Making Changes
Now you have the Trisquel system files in the jail directory, and you can start to apply changes. To install or remove packages, you need to enter the jail using chroot:
cp /etc/resolv.conf jail/etc chroot jail mount none /proc -t proc apt-get update apt-get install package echo "" > /etc/resolv.conf umount /proc exitIf you replaced the kernel or the boot scripts, copy the new kernel binary and initrd image as needed:
cp jail/boot/vmlinuz-custom src/isolinux/vmlinuz cp jail/boot/initrd.img-custom src/isolinux/initrd
Repacking
After your modifications are done, you will need to rebuild the squashfs and .iso images. Install squashfs-tools:
apt-get install squashfs-tools
- Compress the jail into the squashfs file, deleting the original one:
rm src/casper/filesystem.squashfs mksquashfs jail src/casper/filesystem.squashfs(you may need to add -nolzma for Trisquel 2.0 to 3.0 to the last line. This option was removed in Trisquel Awen 3.5. The option was to "use ZLIB compression method instead of LZMA", but ZLIB is now the default as shown in the man-pages)
- Finally, create a new .iso image:
mkisofs -D -r -V "My Trisquel modified version" -cache-inodes \ -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \ -boot-load-size 4 -boot-info-table -o trisquel-modified.iso srcPlease make clear to anyone you distribute your version to that it is not an official Trisquel .iso image. If any non-free software is included, please rename your project and do not use our logo.