Personnaliser une image iso de Trisquel

Pour personnaliser une image .iso de Trisquel, vous devez d'abord la télécharger puis la placer dans un répertoire vide. Ouvrez alors un terminal et rendez-vous dans ce répertoire, puis procédez comme suit.

Dépaquetage

  • Passez en utilisateur root. Toutes les commandes ci-dessous doivent être exécutée par l'utilisateur root.

sudo su
  • Créez un répertoire vide et monter l'image iso dans ce répertoire. Il faut ensuite en extraire le contenu:

mkdir tmp
mount -o loop trisquel-original.iso tmp
cp tmp -a src
umount tmp
  • Extraire le fichier image squash contenue dans 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.

Appliquer les changements

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
exit
If 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 -nolzma
  • 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 src
Please make clear to anyone you distribute your version to that it is not an official Trisquel .iso image. Si au moins un logiciel non libre est inclus, veuillez renommer votre projet et ne pas utiliser notre logo.

Révisions

12/21/2010 - 12:35
AlainR
02/23/2013 - 04:52
slughnaz
11/20/2014 - 23:29
RyDroid