Skip to main content

A simple guide to remaster the latest Trisquel 9 iso image

The new Trisquel 9 distro is out and I really think it is great, I have used the "mini" version which supports the fast and light lxde desktop and for this reason is my favorite flavor.
At first view you can see that there is some necessary software missing (Firefox-Abrowser for example) and it can be annoying if you wish to make multi functional installations.
Therefore there are many programs that allow to remaster a distro or create a live iso of your running system..
However I never liked them.. sometimes I fund issues with the size of the iso created (usually too big) and I never trusted 100% its functionality installing it on different PCs

I found out there is a way to "remaster" the original iso manually and including the missing software or making further personalizations.
In this case the result will be 100% clean and it will work like the original iso but with the benefit of your own personalizations.

As Trisquel is based on Ubuntu, the same process documented here will apply: https://help.ubuntu.com/community/LiveCDCustomization

This guide is just to recap the process I follow based on my own needs in the easiest possible way.. so let's proceed...

Download it from the official website and then place it on your /home folder renaming it in simply trisquel.iso.
Get the necessary software to modify it with a simple sudo apt install squashfs-tools genisoimage resolvconf

From a new terminal complete the following steps:

mkdir ~/live

cd ~/live

mkdir extract-cd mnt

sudo mount -o loop ~/trisquel.iso mnt

sudo rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

sudo unsquashfs mnt/casper/filesystem.squashfs

sudo mv squashfs-root edit

sudo cp /etc/resolv.conf edit/etc/

sudo mount --bind /dev/ edit/dev

sudo chroot edit

mount -t proc none /proc && mount -t sysfs none /sys && mount -t devpts none /dev/pts

export HOME=/root && export LC_ALL=C

cd /etc/skel

mkdir Desktop Documents Downloads Music Pictures Public Templates Videos

cd /

At this point you can add all the software you want.

On mine I have done:

sudo apt update
sudo apt upgrade

and then:

sudo apt install libftdi1 libftdi-dev libusb-dev libpci-dev subversion pciutils usbutils git build-essential gnat flex bison libncurses5-dev wget zlib1g-dev flashrom
sudo apt install soundconverter squashfs-tools genisoimage resolvconf vlc pitivi libreoffice firefox gdebi wget git curl rsync gimp jami cheese kazam speedtest-cli screenfetch gparted network-manager-openvpn-gnome flashrom
sudo apt install blueman kodi kodi-pvr-iptvsimple lzop gnome-themes-extra xfce4-power-manager pavucontrol
sudo apt install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf build-essential libncurses5-dev fakeroot

wich is basically all I need for 1) recompiling,2) music/videos 3)office programs 4)internet stuff

then I have customized the fstab file to have the options "discard" and "noatime" by default running:
nano /lib/partman/fstab.d/ext3

On that file find the lines:

options="errors=remount-ro"

else

options="${options},errors=remount-ro" add (without the quotes) “noatime,nodiratime,” right before errors.

Change it in

options="discard,noatime,errors=remount-ro"

else

options="${options},discard,noatime,errors=remount-ro"


save che changes and exit


Now we need to correctly exit the chroot enviroment:

apt-get clean

apt-get autoremove

rm -rf /tmp/* ~/.bash_history

umount /proc

umount /sys

umount /dev/pts

exit

sudo umount edit/dev

sudo umount mnt

Now we are ready to build the iso of trisquel running from a terminal on your /live folder (previously set):

sudo mksquashfs edit extract-cd/casper/filesystem.squashfs

cd extract-cd

sudo rm md5sum.txt

find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt

cd ..

sudo mkisofs -r -V "tr1sq3lm4rc0" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../tr1sq3lm4rc0.iso extract-cd

cd ..

sudo chmod 777 tr1sq3lm4rc0.iso


At this point you will find the new tr1sq3lm4rc0.iso on your /home folder which in the example above is 1,5 GB, fair enough!

Now simply flash it on a cd/dvd or usb drive (using dd or any other program to do so) and to install it like the normal iso on any compatible pc.

You can also resume your building project or update after a while entering back on that folder and on a terminal:

cd ~/live

sudo mount --bind /dev/ edit/dev

sudo chroot edit

mount -t proc none /proc && mount -t sysfs none /sys && mount -t devpts none /dev/pts

now you can update/upgrade your built or add/remove software

at the end just repeat the steps for exiting on the chroot enviroment and once done then delete the previous built filesystem.squashfs with:

sudo rm ~/live/extract-cd/casper/filesystem.squashfs

You are now ready to build your iso with all the changes and upgrades again simply repeating the steps for building the iso.

For more details and more personalizations options please visit https://help.ubuntu.com/community/LiveCDCustomization

Comments

Popular posts from this blog

Coreboot on x230 - How to change the Skulls bootspash image

I assume that skulls is already installed on your x230 and you are happy with it :) however you would like to change the bootsplash image.. It seems to be simple... however it can be "tricky".. or at least it was for me..  That's because the "usable" image created by the skulls script is the "top" one only. the coreboot instructions to flash with a layout file with didn't work for me 0x00000000:0x007fffff ifdmegbe 0x00800000:0x00bfffff bios I get this error: Proceeding anyway because user forced us to. Found chipset "Intel QM77". Enabling flash write... Warning: SPI Configuration Lockdown activated. Enabling hardware sequencing due to multiple flash chips detected. OK. Found Programmer flash chip "Opaque flash chip" (12288 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Error: Image size (4194304 B) doesn't match the flash chip's size (12582912 B)! So I thought it could be a good idea to flash fro...

Skulls scripts - how to make the seabios_free version bootsplash showing and adding secondary payloads

I was playing with the skulls scripts  for the seabios_free to rebuild the coreboot image for the thinkpad x230, considering that, as reported on their github, it: "includes the VGA BIOS SeaVGABIOS which is free software. While technically more interesting, visually this is currently not as beautiful: The bootspash image is not shown ." The solution that I have fund is not perfect as the supported resolution by libgfxinit is limited to 1024x768, so the image is shrunk, however it does show and it works fine for me. I have replied then on this thread /issues/59 What we have to change to fix it is not the .config file present in the /x230 folder but the free-defconfig-8053595370 file to set the correct resolution to the libgfxinit adding the following: CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1024 CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=768 Once done we still need to add the bootsplash image as per the seabios coreboot instructions  However I think that adding on the script someth...

Coreboot with Seabios and VGA on ThinkPad T400

I have a beautiful t400 running libreboot and still working amazing, however... I needed to boot windows 10 on it ;( I come across some guides on internet to recompile coreboot for this or similar models however the instructions didn't work if you aim to run windows on it.  Obviously re-flashing the stock bios is not a "reasonable" option for me.. and I couldn't find any alternative "ready to go".. so I decided to recompile coreboot and making it capable to boot windows 10 on my t400. From this personal small "project" I got the benefit to be able to boot any other linux distro and any bsd (I have tried freebsd only so far) without any complicated settings to add on the grub configuration. Also, it doesn't include any Intel ME (the same as libreboot) which is a backdoor (https://www.theregister.com/2017/11/20/intel_flags_firmware_flaws/) and I feel like that coreboot and seabios are immune to the recent grub security issues (not sure if they ca...