ISO FUSS 9

In FUSS 9 (Debian stretch) le ISO live (complete di installer testuale e grafico) si generavano usando live-wrapper.

Vengono usate le versioni presenti in Debian buster, ovvero ad agosto 2018:

live-wrapper (0.7)
vmdebootstrap (1.11-1)

Build

Setup

  • Su un’installazione di Debian buster o successive, installare live-wrapper:

    # apt install live-wrapper
    
  • Copiare il file /usr/share/live-wrapper/customise.sh:

    # cp /usr/share/live-wrapper/customise.sh fuss-customise.sh
    

    sotto alla riga:

    . /usr/share/vmdebootstrap/common/customise.lib
    

    aggiungere:

    # overriden from the above for FUSS
    prepare_apt_source() {
        # handle the apt source
        mv ${rootdir}/etc/apt/sources.list.d/base.list ${rootdir}/etc/apt/
        echo "deb $1 $2 main contrib non-free" > ${rootdir}/etc/apt/sources.list
        echo "deb-src $1 $2 main contrib non-free" >> ${rootdir}/etc/apt/sources.list
        echo "deb http://archive.fuss.bz.it/ stretch main" >> ${rootdir}/etc/apt/sources.list
        wget -qO ${rootdir}/tmp/fuss-apt.key https://archive.fuss.bz.it/apt.key
        chroot ${rootdir} apt-key add /tmp/fuss-apt.key
        chroot ${rootdir} apt -qq -y update > /dev/null 2>&1
    }
    

Build

Per generare la ISO di FUSS 9 per architettura amd64, lanciare il seguente comando:

lwr -o fuss9-live-amd64.iso -d stretch --architecture=amd64 --customise=./fuss-customise.sh -m http://ftp.de.debian.org/debian/ -e "fuss-client fuss-kids fuss-children fuss-education fuss-graphics fuss-language-support fuss-multimedia fuss-extra-multimedia fuss-net fuss-office fuss-various"

Per generare la ISO di FUSS 9 per architettura i386, lanciare il seguente comando:

lwr -o fuss9-live-i386.iso -d stretch --architecture=i386 --customise=./fuss-customise.sh -m http://ftp.de.debian.org/debian/ -e "fuss-client fuss-kids fuss-children fuss-education fuss-graphics fuss-language-support fuss-multimedia fuss-extra-multimedia fuss-net fuss-office fuss-various"

Vedi anche

ISO FUSS 10

Con FUSS 10, il tool adottato per personalizzare una immagine ISO esistente si chiama remaster-iso (https://github.com/unixabg/remaster-iso).

Creare la ISO live di FUSS

remaster-iso è disponibile come pacchetto solo a partire da Debian 11 «bullseye». Se si lavora con Debian 10 è necessario, peretanto, clonare il progetto remaster-iso da GitHub e spostarsi nella cartella creata:

git clone https://github.com/unixabg/remaster-iso.git
cd remaster-iso

Di seguito viene mostrato come personalizzare l’immagine di Debian Live amd64 Xfce reperibile da https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.10.0-amd64-xfce.iso con

wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.10.0-amd64-xfce.iso

Qualora servissero anche i firmware non-free, l’immagine dalla quale partire è la seguente: https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-10.10.0-amd64-xfce+nonfree.iso ed il comando da dare per scaricarla è:

wget https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-10.10.0-amd64-xfce+nonfree.iso

Modificare il file di configurazione remaster-iso.conf. Di seguito un esempio:

######################
## remaster settings
######################
_BASEDIR=$(pwd)
_ISOExtractPath="${_BASEDIR}/iso-extract"
_ISOLivePath="live"
_ISOMountPoint="${_BASEDIR}/iso-mount"
_ISOName=""
_ISOTargetName="fuss-10-amd64-live-light"
_ISOTargetTitle="FUSS 10 amd64 live light"

_VER="0.9.4"

Estrarre il file .iso

./remaster-extract -i debian-live-10.10.0-amd64-xfce.iso

Lanciare poi il comando remaster-squashfs-editor e selezionare «C» premendo INVIO:

./remaster-squashfs-editor
#################################
    remaster-squashfs-editor
    remaster-iso version 0.9.3
#################################
  (C)hroot - Chroot in to the filesystem.squashfs + psu-*.squashfs stack.
  (J)oin   - Join the partial squashfs update files to new single psu-DATE.squashfs
  (N)ew    - New master filesystem.squashfs file which joins all *.squashfs file to new single filesystem.squashfs
  E(x)it   - Exit the program with no action
Enter choice [C , J , N , X] C

Modifiare il file dei repository se necessario

nano /etc/apt/sources.list
# ##### Debian Main Repos
deb http://ftp.it.debian.org/debian/ buster main
deb-src http://ftp.it.debian.org/debian/ buster main

deb http://ftp.it.debian.org/debian/ buster-updates main
deb-src http://ftp.it.debian.org/debian/ buster-updates main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

deb http://ftp.debian.org/debian buster-backports main
deb-src http://ftp.debian.org/debian buster-backports main

# ##### FUSS Main Repo
deb http://archive.fuss.bz.it/ buster main
deb-src http://archive.fuss.bz.it/ buster main

Se servono anche pacchetti contrib e non-free, il file dev’essere

# ##### Debian Main Repos
deb http://ftp.it.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.it.debian.org/debian/ buster main contrib non-free

deb http://ftp.it.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.it.debian.org/debian/ buster-updates main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

deb http://ftp.debian.org/debian buster-backports main contrib non-free
deb-src http://ftp.debian.org/debian buster-backports main contrib non-free

# ##### FUSS Main Repo
deb http://archive.fuss.bz.it/ buster main contrib non-free
deb-src http://archive.fuss.bz.it/ buster main contrib non-free

Aggiornare i pacchetti

apt update
apt install curl wget apt-transport-https dirmngr
wget -qO - https://archive.fuss.bz.it/apt.key | sudo apt-key add -
apt update && apt full-upgrade

Installare fuss-client

apt install fuss-client

Lanciare il comando per la configurazione di FUSS standalone (desktop)

fuss-client --iso --standalone [--light] [--unofficial] [--locale=LOCALE] --domain fuss.bz.it

dove

  • --light mantiene l’immagine leggera senza installare i metapacchetti didattici;

  • --unofficial permette di installare i firmware non-free di debian;

  • --locale=LOCALE permette di scegliere la lingua di default, dove LOCALE è, a titolo d’esempio, nella forma de_DE.UTF-8.

Scaricare la chiave del repository archive.fuss.bz.it che verrà utilizzata da Calamares (https://calamares.io/) durante l’installazione:

curl https://archive.fuss.bz.it/apt.key | gpg --dearmor > /usr/share/keyrings/fuss-keyring.gpg

Modificare lo script /usr/sbin/sources-final che scriverà i repository durante l’installazione:

#!/bin/sh
#
# Writes the final sources.list files
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="buster"
FUSS_KEY="/usr/share/keyrings/fuss-keyring.gpg"

cat << EOF > $CHROOT/etc/apt/sources.list
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian $RELEASE main
deb-src http://deb.debian.org/debian $RELEASE main

deb http://deb.debian.org/debian $RELEASE-updates main
deb-src http://deb.debian.org/debian $RELEASE-updates main

deb http://security.debian.org/debian-security/ $RELEASE/updates main
deb-src http://security.debian.org/debian-security/ $RELEASE/updates main
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/deb_debian_org_debian.list
deb http://deb.debian.org/debian $RELEASE-backports main
deb-src http://deb.debian.org/debian $RELEASE-backports main
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/archive_fuss_bz_it.list
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib
EOF

if [ -f $FUSS_KEY ] ; then
    cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-keyring.gpg
fi

exit 0

Per le immagini unofficial il file dev’essere

#!/bin/sh
#
# Writes the final sources.list files
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="buster"
FUSS_KEY="/usr/share/keyrings/fuss-keyring.gpg"

cat << EOF > $CHROOT/etc/apt/sources.list
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian $RELEASE main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE main contrib non-free

deb http://deb.debian.org/debian $RELEASE-updates main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE-updates main contrib non-free

deb http://security.debian.org/debian-security/ $RELEASE/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ $RELEASE/updates main contrib non-free
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/deb_debian_org_debian.list
deb http://deb.debian.org/debian $RELEASE-backports main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE-backports main contrib non-free
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/archive_fuss_bz_it.list
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib contrib non-free
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib contrib non-free
EOF

if [ -f $FUSS_KEY ] ; then
    cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-keyring.gpg
fi

exit 0

Rimuovere i pacchetti inutilizzati e ripulire la cache pacchetti

apt-get autoremove
apt-get clean

Configurare la live

nano /etc/live/config.conf.d/fuss.conf
LIVE_HOSTNAME="fuss"
LIVE_USERNAME="user"
LIVE_USER_FULLNAME="FUSS Live user"
LIVE_LOCALES="en_US.UTF-8,it_IT.UTF-8,de_AT.UTF-8"
LIVE_TIMEZONE="Europe/Rome"
LIVE_KEYBOARD_LAYOUTS="it,de"

Cambiare l’hostname di default

nano /etc/hostname
fuss

Per prendere le impostazioni del pannello come previsto da FUSS, modificare una riga dello script /lib/live/config/1170-xfce4-panel:

nano /lib/live/config/1170-xfce4-panel
sudo -u "${LIVE_USERNAME}" cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /home/"${LIVE_USERNAME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

Qualora servisse, nella cartella /lib/live/config ci sono tutti gli script richiamati dalla live per le diverse configurazioni. Come documentazione c’è la man page di live-config dov’è tutto abbastanza ben documentato.

Uscire e salvare le modifiche fatte in chroot digitando Y ed invio

root@jarvis:~# exit
Exited the chroot so time to clean up.
Restore original overlay/etc/hosts.
Restore overlay/etc/resolv.conf.
Remove overlay/root/.bash_history.
#############################################################
 (Y)es save my chroot modifications.
 (N)o do not save my chroot modifications.
Select to save your chroot modifications (default is N):

Y
Now making the updated squashfs 20200614-013407.
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on psu-20200614-013407.squashfs, block size 131072.

Lanciare nuovamente ./remaster-squashfs-editor e scegliere l’opzione N confermando poi con Y la creazione di filesystem.squashfs:

./remaster-squashfs-editor
#################################
    remaster-squashfs-editor
    remaster-iso version 0.9.3
#################################
  (C)hroot - Chroot in to the filesystem.squashfs + psu-*.squashfs stack.
  (J)oin   - Join the partial squashfs update files to new single psu-DATE.squashfs
  (N)ew    - New master filesystem.squashfs file which joins all *.squashfs file to new single filesystem.squashfs
  E(x)it   - Exit the program with no action
Enter choice [C , J , N , X] N
I: New option selected!
I: change directory to target live folder
I: strting mount list and points operations
I: found ./psu-20200614-020636.squashfs ... setting up mount point of psu-20200614-020636_squashfs
I: mounting ./psu-20200614-020636.squashfs on psu-20200614-020636_squashfs
./psu-20200614-020636_squashfs:./filesystem_squashfs
./psu-20200614-020636_squashfs ./filesystem_squashfs ./psu_overlay
./psu-20200614-020636_squashfs:./filesystem_squashfs
#############################################################
 (Y)es, create a new single filesystem.squashfs.
 (N)o, do not create a new single filesystem.squashfs.
Select to create a new single filesystem.squashfs (default is N):

Y

Rimuovere la cartella ./iso-extract/live/psu-OOS\*

rm -fr ./iso-extract/live/psu-OOS*

Copiare i file kernel-related presenti nello squashfs nella cartella ./iso-extract/live

Per fare questo lanciare nuovamente ./remaster-squashfs-editor scegliendo l’opzione (C)hroot

config-4.19.0-16-amd64
config-5.10.0-0.bpo.3-amd64
initrd.img-4.19.0-16-amd64
initrd.img-5.10.0-0.bpo.3-amd64
System.map-4.19.0-16-amd64
System.map-5.10.0-0.bpo.3-amd64
vmlinuz-4.19.0-16-amd64
vmlinuz-5.10.0-0.bpo.3-amd64

Si esca dall’ambiente chroot senza apportare modifiche

Modificare i file per personalizzare il menu di boot a piacimento:

isolinux/menu.cfg
boot/grub/grub.cfg

E” arrivato il momento di generare la nuova ISO.

Verificare che il comando xorriso nello script remaster-compose abbia i seguenti parametri:

xorriso -as mkisofs -r -D -V "${ISOTargetTitle}" -cache-inodes -J -l -iso-level 3 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c isolinux/boot.cat  -b isolinux/isolinux.bin  -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot  -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat  -o "${BASEDIR}/${BUILDDATE}-${ISOTargetName}.iso" .

Terminare poi con il comando ./remaster-compose per generare il file .iso

./remaster-compose

Al termine dello script si troverà nell’attuale cartella di lavoro la nuova immagine .iso.

Nota

Per successivi aggiornamenti e personalizzazioni, sarà sufficiente partire dall’immagine ISO creata precedentemente facendo solo le modifiche necessarie ed utilizzando i tre script di remaster-iso come indicato sopra.

ISO FUSS 11

Con FUSS 11, il tool adottato per personalizzare una immagine ISO rimane remaster-iso (https://github.com/unixabg/remaster-iso).

Creare la ISO live di FUSS

remaster-iso è disponibile come pacchetto solo a partire da Debian 11 «bullseye». Se si lavora con Debian 10 è necessario, peretanto, clonare il progetto remaster-iso da GitHub e spostarsi nella cartella creata:

git clone https://github.com/unixabg/remaster-iso.git
cd remaster-iso

Di seguito viene mostrato come personalizzare l’immagine di Debian Live amd64 Xfce reperibile da https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce.iso con

wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce.iso

Qualora servissero anche i firmware non-free, l’immagine dalla quale partire è la seguente: https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce+nonfree.iso ed il comando da dare per scaricarla è:

wget https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce+nonfree.iso

Modificare il file di configurazione remaster-iso.conf. Di seguito un esempio:

######################
## remaster settings
######################
_BASEDIR=$(pwd)
_ISOExtractPath="${_BASEDIR}/iso-extract"
_ISOLivePath="live"
_ISOMountPoint="${_BASEDIR}/iso-mount"
_ISOName=""
_ISOTargetName="fuss-11-amd64-live-lite"
_ISOTargetTitle="FUSS 11 amd64 live lite"

_VER="0.9.4"

Estrarre il file .iso

./remaster-extract -i debian-live-11.4.0-amd64-xfce.iso

Lanciare poi il comando remaster-squashfs-editor e selezionare «C» premendo INVIO:

./remaster-squashfs-editor
#################################
    remaster-squashfs-editor
    remaster-iso version 0.9.3
#################################
  (C)hroot - Chroot in to the filesystem.squashfs + psu-*.squashfs stack.
  (J)oin   - Join the partial squashfs update files to new single psu-DATE.squashfs
  (N)ew    - New master filesystem.squashfs file which joins all *.squashfs file to new single filesystem.squashfs
  E(x)it   - Exit the program with no action
Enter choice [C , J , N , X] C

Modifiare il file dei repository se necessario

nano /etc/apt/sources.list
# ##### Debian Main Repos
deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main

deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main

deb http://deb.debian.org/debian-security/ bullseye-security main
deb-src http://deb.debian.org/debian-security/ bullseye-security main
nano /etc/apt/sources.list.d/deb_debian_org_debian.list
# ##### Debian Backports Repo
deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main
nano /etc/apt/sources.list.d/archive_fuss_bz_it.list
# ##### FUSS Main Repo
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ bullseye main
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ bullseye main

Se servono anche pacchetti contrib e non-free, il file devono essere modificati come segue:

nano /etc/apt/sources.list
# ##### Debian Main Repos
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
nano /etc/apt/sources.list.d/deb_debian_org_debian.list
# ##### Debian Backports Repo
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
nano /etc/apt/sources.list.d/archive_fuss_bz_it.list
# ##### FUSS Main Repo
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ bullseye main contrib non-free
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ bullseye main contrib non-free

Aggiornare i pacchetti

apt update
apt install curl wget apt-transport-https dirmngr
wget -qO - https://archive.fuss.bz.it/apt.key | gpg --dearmour > /usr/share/keyrings/fuss-keyring.gpg
apt update && apt full-upgrade

Installare fuss-client

apt install fuss-client

Lanciare il comando per la configurazione di FUSS standalone (desktop)

fuss-client --iso --standalone --light [--unofficial] [--locale=LOCALE] --domain fuss.bz.it

dove

  • --light mantiene l’immagine leggera senza installare i metapacchetti didattici;

  • --unofficial permette di installare i firmware non-free di debian;

  • --locale=LOCALE permette di scegliere la lingua di default, dove LOCALE è, a titolo d’esempio, nella forma de_DE.UTF-8.

Nello specifico:

  • per la ISO FUSS ufficiale lite:

    fuss-client --iso --standalone --light --domain fuss.bz.it
    
  • per la ISO FUSS ufficiale full:

    fuss-client --iso --standalone --domain fuss.bz.it
    
  • per la ISO FUSS «unofficial» light:

    fuss-client --iso --standalone --light --unofficial --domain fuss.bz.it
    
  • per la ISO «unofficial» full:

    fuss-client --iso --standalone --unofficial --domain fuss.bz.it
    

Se non fatto precedentemente, scaricare la chiave del repository archive.fuss.bz.it che verrà utilizzata da Calamares (https://calamares.io/) durante l’installazione:

curl https://archive.fuss.bz.it/apt.key | gpg --dearmor > /usr/share/keyrings/fuss-keyring.gpg

Modificare lo script /usr/sbin/sources-final che scriverà i repository durante l’installazione:

#!/bin/sh
#
# Writes the final sources.list files
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="bullseye"
FUSS_KEY="/usr/share/keyrings/fuss-keyring.gpg"

cat << EOF > $CHROOT/etc/apt/sources.list
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian $RELEASE main
deb-src http://deb.debian.org/debian $RELEASE main

deb http://deb.debian.org/debian $RELEASE-updates main
deb-src http://deb.debian.org/debian $RELEASE-updates main

deb http://security.debian.org/debian-security/ $RELEASE-security main
deb-src http://security.debian.org/debian-security/ $RELEASE-security main
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/deb_debian_org_debian.list
deb http://deb.debian.org/debian $RELEASE-backports main
deb-src http://deb.debian.org/debian $RELEASE-backports main
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/archive_fuss_bz_it.list
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main
EOF

if [ -f $FUSS_KEY ] ; then
    cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-keyring.gpg
fi

exit 0

Per le immagini unofficial il file dev’essere

#!/bin/sh
#
# Writes the final sources.list files
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="bullseye"
FUSS_KEY="/usr/share/keyrings/fuss-keyring.gpg"

cat << EOF > $CHROOT/etc/apt/sources.list
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian $RELEASE main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE main contrib non-free

deb http://deb.debian.org/debian $RELEASE-updates main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE-updates main contrib non-free

deb http://security.debian.org/debian-security/ $RELEASE-security main contrib non-free
deb-src http://security.debian.org/debian-security/ $RELEASE-security main contrib non-free
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/deb_debian_org_debian.list
deb http://deb.debian.org/debian $RELEASE-backports main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE-backports main contrib non-free
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/archive_fuss_bz_it.list
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib non-free
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib non-free
EOF

if [ -f $FUSS_KEY ] ; then
    cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-keyring.gpg
fi

exit 0

Sostituire il file main.py nella cartella /usr/lib/x86_64-linux-gnu/calamares/modules/displaymanager con la versione modificata disponibile al link https://www.fuss.bz.it/utility/calamares/main.py

wget -O /usr/lib/x86_64-linux-gnu/calamares/modules/displaymanager/main.py https://www.fuss.bz.it/utility/calamares/main.py

Rimuovere i pacchetti inutilizzati e ripulire la cache pacchetti

apt-get autoremove
apt-get clean

Configurare la live

nano /etc/live/config.conf.d/fuss.conf
LIVE_HOSTNAME="fuss"
LIVE_USERNAME="user"
LIVE_USER_FULLNAME="FUSS Live user"
LIVE_LOCALES="en_US.UTF-8,it_IT.UTF-8,de_AT.UTF-8"
LIVE_TIMEZONE="Europe/Rome"
LIVE_KEYBOARD_LAYOUTS="it,de"

Cambiare l’encoding della console

nano /etc/default/console-setup

impostando

CHARMAP="UTF-8"

Cambiare l’hostname di default

nano /etc/hostname
fuss

Per prendere le impostazioni del pannello come previsto da FUSS, modificare una riga dello script /lib/live/config/1170-xfce4-panel:

nano /lib/live/config/1170-xfce4-panel
sudo -u "${LIVE_USERNAME}" cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /home/"${LIVE_USERNAME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

Qualora servisse, nella cartella /lib/live/config ci sono tutti gli script richiamati dalla live per le diverse configurazioni. Come documentazione c’è la man page di live-config dov’è tutto abbastanza ben documentato.

Uscire e salvare le modifiche fatte in chroot digitando Y ed invio

root@jarvis:~# exit
Exited the chroot so time to clean up.
Restore original overlay/etc/hosts.
Restore overlay/etc/resolv.conf.
Remove overlay/root/.bash_history.
#############################################################
 (Y)es save my chroot modifications.
 (N)o do not save my chroot modifications.
Select to save your chroot modifications (default is N):

Y
Now making the updated squashfs 20200614-013407.
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on psu-20200614-013407.squashfs, block size 131072.

Lanciare nuovamente ./remaster-squashfs-editor e scegliere l’opzione N confermando poi con Y la creazione di filesystem.squashfs:

./remaster-squashfs-editor
#################################
    remaster-squashfs-editor
    remaster-iso version 0.9.3
#################################
  (C)hroot - Chroot in to the filesystem.squashfs + psu-*.squashfs stack.
  (J)oin   - Join the partial squashfs update files to new single psu-DATE.squashfs
  (N)ew    - New master filesystem.squashfs file which joins all *.squashfs file to new single filesystem.squashfs
  E(x)it   - Exit the program with no action
Enter choice [C , J , N , X] N
I: New option selected!
I: change directory to target live folder
I: strting mount list and points operations
I: found ./psu-20200614-020636.squashfs ... setting up mount point of psu-20200614-020636_squashfs
I: mounting ./psu-20200614-020636.squashfs on psu-20200614-020636_squashfs
./psu-20200614-020636_squashfs:./filesystem_squashfs
./psu-20200614-020636_squashfs ./filesystem_squashfs ./psu_overlay
./psu-20200614-020636_squashfs:./filesystem_squashfs
#############################################################
 (Y)es, create a new single filesystem.squashfs.
 (N)o, do not create a new single filesystem.squashfs.
Select to create a new single filesystem.squashfs (default is N):

Y

Rimuovere la cartella ./iso-extract/live/psu-OOS\*

rm -fr ./iso-extract/live/psu-OOS*

Copiare i file kernel-related presenti nello squashfs nella cartella ./iso-extract/live

Per fare questo lanciare nuovamente ./remaster-squashfs-editor scegliendo l’opzione (C)hroot

config-4.19.0-16-amd64
config-5.10.0-0.bpo.3-amd64
initrd.img-4.19.0-16-amd64
initrd.img-5.10.0-0.bpo.3-amd64
System.map-4.19.0-16-amd64
System.map-5.10.0-0.bpo.3-amd64
vmlinuz-4.19.0-16-amd64
vmlinuz-5.10.0-0.bpo.3-amd64

Si esca dall’ambiente chroot senza apportare modifiche

Si modifichi all’occorrenza l’immagine iso-extract/isolinux/splash.png.

Modificare i file per personalizzare il menu di boot a piacimento. Nelle ultime iso prodotte è stata lasciata solo l’opzione live (che include l’installer Calamares) e di rimuovere le opzioni Graphical Debian Installer, Debian Installer e Debian Installer with Speech Synthesis:

iso-extract/isolinux/menu.cfg
iso-extract/boot/grub/grub.cfg

È arrivato il momento di generare la nuova ISO lanciando il comando

./remaster-compose

Al termine dello script si troverà nell’attuale cartella di lavoro la nuova immagine .iso.

Nota

Per successivi aggiornamenti e personalizzazioni, sarà sufficiente partire dall’immagine ISO creata precedentemente facendo solo le modifiche necessarie ed utilizzando i tre script di remaster-iso come indicato sopra.

ISO FUSS 12

Con FUSS 12, il tool adottato per personalizzare una immagine ISO rimane remaster-iso (https://github.com/unixabg/remaster-iso).

Creare la ISO live di FUSS

remaster-iso è disponibile come pacchetto solo a partire da Debian 11 «bullseye». Se si lavora con Debian 10 è necessario, pertanto, clonare il progetto remaster-iso da GitHub e spostarsi nella cartella creata:

git clone https://github.com/unixabg/remaster-iso.git
cd remaster-iso

Di seguito viene mostrato come personalizzare l’immagine di Debian Live amd64 Xfce reperibile da https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-12.1.0-amd64-xfce.iso con

wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-12.1.0-amd64-xfce.iso

Qualora servissero anche i firmware non-free, l’immagine dalla quale partire è la seguente: https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce+nonfree.iso ed il comando da dare per scaricarla è:

wget https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce+nonfree.iso

Modificare il file di configurazione remaster-iso.conf. Di seguito un esempio:

######################
## remaster settings
######################
_BASEDIR=$(pwd)
_ISOExtractPath="${_BASEDIR}/iso-extract"
_ISOLivePath="live"
_ISOMountPoint="${_BASEDIR}/iso-mount"
_ISOName=""
_ISOTargetName="fuss-12-amd64-live-lite"
_ISOTargetTitle="FUSS 12 amd64 live lite"

_VER="0.9.4"

Estrarre il file .iso

./remaster-extract -i debian-live-12.1.0-amd64-xfce.iso

Lanciare poi il comando remaster-squashfs-editor e selezionare «C» premendo INVIO:

./remaster-squashfs-editor
#################################
    remaster-squashfs-editor
    remaster-iso version 0.9.4
#################################
  (C)hroot - Chroot in to the filesystem.squashfs + psu-*.squashfs stack.
  (J)oin   - Join the partial squashfs update files to new single psu-DATE.squashfs
  (N)ew    - New master filesystem.squashfs file which joins all *.squashfs file to new single filesystem.squashfs
  E(x)it   - Exit the program with no action
Enter choice [C , J , N , X] C

Modificare il file dei repository se necessario

nano /etc/apt/sources.list
# ##### Debian Main Repos
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian bookworm main
deb-src http://deb.debian.org/debian bookworm main

deb http://deb.debian.org/debian bookworm-updates main
deb-src http://deb.debian.org/debian bookworm-updates main

deb http://security.debian.org/debian-security/ bookworm-security main
deb-src http://security.debian.org/debian-security/ bookworm-security main
nano /etc/apt/sources.list.d/deb_debian_org_debian.list
# ##### Debian Backports Repo
deb http://httpredir.debian.org/debian bookworm-backports main
nano /etc/apt/sources.list.d/archive_fuss_bz_it.list
# ##### FUSS Main Repo
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg]  http://archive.fuss.bz.it/ bookworm main
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ bookworm main

Se servono anche pacchetti contrib e non-free, il file devono essere modificati come segue:

nano /etc/apt/sources.list
# ##### Debian Main Repos
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware non-free
deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware non-free

deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware non-free
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware non-free

deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free-firmware non-free
deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free-firmware non-free
nano /etc/apt/sources.list.d/deb_debian_org_debian.list
# ##### Debian Backports Repo
deb http://httpredir.debian.org/debian bookworm-backports main contrib non-free-firmware non-free
nano /etc/apt/sources.list.d/archive_fuss_bz_it.list
# ##### FUSS Main Repo
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg]  http://archive.fuss.bz.it/ bookworm main contrib non-free
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ bookworm main contrib non-free

Aggiornare i pacchetti

apt update
apt install curl wget apt-transport-https dirmngr
wget -qO - https://archive.fuss.bz.it/apt.key | gpg --dearmour > /usr/share/keyrings/fuss-keyring.gpg
apt update && apt full-upgrade

Installare fuss-client

apt install fuss-client

Lanciare il comando per la configurazione di FUSS standalone (desktop)

fuss-client --iso --standalone --light [--unofficial] [--locale=LOCALE] --domain fuss.bz.it

dove

  • --light mantiene l’immagine leggera senza installare i metapacchetti didattici;

  • --unofficial permette di installare i firmware non-free di debian;

  • --locale=LOCALE permette di scegliere la lingua di default, dove LOCALE è, a titolo d’esempio, nella forma de_DE.UTF-8.

Nello specifico:

  • per la ISO FUSS ufficiale lite:

    fuss-client --iso --standalone --light --domain fuss.bz.it
    
  • per la ISO FUSS ufficiale full:

    fuss-client --iso --standalone --domain fuss.bz.it
    
  • per la ISO FUSS «unofficial» light:

    fuss-client --iso --standalone --light --unofficial --domain fuss.bz.it
    
  • per la ISO «unofficial» full:

    fuss-client --iso --standalone --unofficial --domain fuss.bz.it
    

Se non fatto precedentemente, scaricare la chiave del repository archive.fuss.bz.it che verrà utilizzata da Calamares (https://calamares.io/) durante l’installazione:

curl https://archive.fuss.bz.it/apt.key | gpg --dearmor > /usr/share/keyrings/fuss-keyring.gpg

Nota

Se il fuss-client –standalone … dovesse fallire con l’errore:

ERROR: Ansible could not initialize the preferred locale: unsupported locale setting

riconfigurare i locales scegliendo una lingua lanciando il comando:

dpkg-reconfigure locales

Modificare lo script /usr/sbin/sources-final che scriverà i repository durante l’installazione:

#!/bin/sh
#
# Writes the final sources.list files
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="bookworm"
FUSS_KEY="/usr/share/keyrings/fuss-keyring.gpg"

cat << EOF > $CHROOT/etc/apt/sources.list
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian $RELEASE main
deb-src http://deb.debian.org/debian $RELEASE main

deb http://deb.debian.org/debian $RELEASE-updates main
deb-src http://deb.debian.org/debian $RELEASE-updates main

deb http://security.debian.org/debian-security/ $RELEASE-security main
deb-src http://security.debian.org/debian-security/ $RELEASE-security main
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/deb_debian_org_debian.list
deb http://deb.debian.org/debian $RELEASE-backports main
deb-src http://deb.debian.org/debian $RELEASE-backports main
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/archive_fuss_bz_it.list
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main
EOF

if [ -f $FUSS_KEY ] ; then
    cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-keyring.gpg
fi

exit 0

Per le immagini unofficial il file dev’essere

#!/bin/sh
#
# Writes the final sources.list files
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
RELEASE="bookworm"
FUSS_KEY="/usr/share/keyrings/fuss-keyring.gpg"

cat << EOF > $CHROOT/etc/apt/sources.list
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian $RELEASE main contrib non-free-firmware non-free
deb-src http://deb.debian.org/debian $RELEASE main contrib non-free-firmware non-free

deb http://deb.debian.org/debian $RELEASE-updates main contrib non-free-firmware non-free
deb-src http://deb.debian.org/debian $RELEASE-updates main contrib non-free-firmware non-free

deb http://security.debian.org/debian-security/ $RELEASE-security main contrib non-free-firmware non-free
deb-src http://security.debian.org/debian-security/ $RELEASE-security main contrib non-free-firmware non-free
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/deb_debian_org_debian.list
deb http://deb.debian.org/debian $RELEASE-backports main contrib non-free
deb-src http://deb.debian.org/debian $RELEASE-backports main contrib non-free
EOF

cat << EOF > $CHROOT/etc/apt/sources.list.d/archive_fuss_bz_it.list
deb [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib non-free
deb-src [signed-by=/usr/share/keyrings/fuss-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib non-free
EOF

if [ -f $FUSS_KEY ] ; then
    cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-keyring.gpg
fi

exit 0

Sostituire il file main.py nella cartella /usr/lib/x86_64-linux-gnu/calamares/modules/displaymanager con la versione modificata disponibile al link https://www.fuss.bz.it/utility/calamares/main.py

wget -O /usr/lib/x86_64-linux-gnu/calamares/modules/displaymanager/main.py https://www.fuss.bz.it/utility/calamares/main.py

Nota

Verificare periodicamente che il modulo main.py sia ancora compatibile con l’ultima versione di calamares. Eventualmente modificarlo.

Rimuovere i pacchetti uim, ibus e, se necessario, riconfigurare libdvd-pkg

apt remove uim ibus
dpkg-reconfigure libdvd-pkg

Rimuovere i pacchetti inutilizzati e ripulire la cache pacchetti

apt-get autoremove
apt-get clean

Configurare la live

nano /etc/live/config.conf.d/fuss.conf
LIVE_HOSTNAME="fuss"
LIVE_USERNAME="user"
LIVE_USER_FULLNAME="FUSS Live user"
LIVE_LOCALES="en_US.UTF-8,it_IT.UTF-8,de_AT.UTF-8"
LIVE_TIMEZONE="Europe/Rome"
LIVE_KEYBOARD_LAYOUTS="it,de"

Cambiare l’encoding della console

nano /etc/default/console-setup

impostando

CHARMAP="UTF-8"

Cambiare l’hostname di default

nano /etc/hostname
fuss

Per prendere le impostazioni del pannello come previsto da FUSS, modificare una riga dello script /lib/live/config/1170-xfce4-panel:

nano /lib/live/config/1170-xfce4-panel
sudo -u "${LIVE_USERNAME}" cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /home/"${LIVE_USERNAME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

Qualora servisse, nella cartella /lib/live/config ci sono tutti gli script richiamati dalla live per le diverse configurazioni. Come documentazione c’è la man page di live-config dov’è tutto abbastanza ben documentato.

Per evitare che all’avvio della ISO live appaia lo sfondo artwork presente al momento della compilazione della stessa, si consiglia di modificare lo script /usr/share/fuss-artwork/rotate-background.sh, aggiungendo:

if grep -w "overlay" /etc/fstab; then
    EXPECTED_LINK="/usr/share/fuss-artwork/wallpapers/fuss-$(RELEASE)-wallpaper.svg"
fi

subito prima della riga:

test "$CURRENT_LINK" = "$EXPECTED_LINK" && exit 0

In questo modo, in modalità Live apparirà lo sfondo predefinito per la versione installata.

Terminate le modifiche fatte in chroot, uscire dall’Editor di squashfs e salvare digitando Y ed invio

root@jarvis:~# exit
Exited the chroot so time to clean up.
Restore original overlay/etc/hosts.
Restore overlay/etc/resolv.conf.
Remove overlay/root/.bash_history.
#############################################################
 (Y)es save my chroot modifications.
 (N)o do not save my chroot modifications.
Select to save your chroot modifications (default is N):

Y
Now making the updated squashfs 20230614-013407.
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on psu-20230614-013407.squashfs, block size 131072.

Lanciare nuovamente ./remaster-squashfs-editor e scegliere l’opzione N confermando poi con Y la creazione di filesystem.squashfs:

./remaster-squashfs-editor
#################################
    remaster-squashfs-editor
    remaster-iso version 0.9.4
#################################
  (C)hroot - Chroot in to the filesystem.squashfs + psu-*.squashfs stack.
  (J)oin   - Join the partial squashfs update files to new single psu-DATE.squashfs
  (N)ew    - New master filesystem.squashfs file which joins all *.squashfs file to new single filesystem.squashfs
  E(x)it   - Exit the program with no action
Enter choice [C , J , N , X] N
I: New option selected!
I: change directory to target live folder
I: strting mount list and points operations
I: found ./psu-20230614-020636.squashfs ... setting up mount point of psu-20230614-020636_squashfs
I: mounting ./psu-20230614-020636.squashfs on psu-20230614-020636_squashfs
./psu-20230614-020636_squashfs:./filesystem_squashfs
./psu-20230614-020636_squashfs ./filesystem_squashfs ./psu_overlay
./psu-20230614-020636_squashfs:./filesystem_squashfs
#############################################################
 (Y)es, create a new single filesystem.squashfs.
 (N)o, do not create a new single filesystem.squashfs.
Select to create a new single filesystem.squashfs (default is N):

Y

Rimuovere la cartella ./iso-extract/live/psu-OOS*

rm -fr ./iso-extract/live/psu-OOS*

Copiare i file kernel-related presenti nello squashfs nella cartella ./iso-extract/live

config-6.1.0-9-amd64
config-6.1.0-10.bpo.3-amd64
initrd.img-6.1.0-9-amd64
initrd.img-6.1.0-10-amd64
System.map-6.1.0-9-amd64
System.map-6.1.0-10-amd64
vmlinuz-6.1.0-9-amd64
vmlinuz-6.1.0-10-amd64

Per fare questo lanciare nuovamente ./remaster-squashfs-editor scegliendo l’opzione (C)hroot Aprire un altro terminale e spostarsi in iso-extract/live. Copiarvi i file da iso-extract/live/psu_overlay/boot/, dove è stata montata la cartella, eliminando eventualmente quelli con la versioni non desiderate

cp /media/iso/fuss-12-amd64-live-full/iso-extract/live/psu_overlay/boot/* .

Si esca dall’ambiente chroot senza apportare modifiche

Si modifichi all’occorrenza l’immagine iso-extract/isolinux/splash.png ed eventualmente anche iso-extract/isolinux/splash800x600.png.

Modificare i file per personalizzare il menu di boot a piacimento. Si può decidere ad esempio di mantenere solo l’opzione live (che include l’installer Calamares) e di rimuovere le opzioni Graphical DebianInstaller, Debian Installer e Debian Installer with Speech Synthesis:

iso-extract/isolinux/menu.cfg
iso-extract/boot/grub/grub.cfg

Nota

Nel caso nel menu di boot manchino alcune opzioni, come il supporto di localizzazione per avviare la live nella lingua desiderata, si possono copiare parti di codice dai file di distribuzioni precedenti.

È arrivato il momento di generare la nuova ISO lanciando il comando

./remaster-compose

Al termine dello script si troverà nell’attuale cartella di lavoro la nuova immagine .iso.

Nota

Per successivi aggiornamenti e personalizzazioni, sarà sufficiente partire dall’immagine ISO creata precedentemente facendo solo le modifiche necessarie ed utilizzando i tre script di remaster-iso come indicato sopra.