Commit 27159490 authored by Paolo Dongilli's avatar Paolo Dongilli
Browse files

Added FUSS-10 ISO creation guide

parent 5a956747
***
ISO
***
**********
ISO FUSS 9
**********
A partire da FUSS 9 (Debian stretch) si generano delle ISO live
(complete di installer testuale e grafico) usando ``live-wrapper``.
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::
......@@ -64,3 +63,397 @@ Vedi anche
* https://live-wrapper.readthedocs.io/en/latest/
* https://wiki.debian.org/vmdebootstrap
***********
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/ stable/updates main
deb-src http://security.debian.org/ 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/ stable/updates main contrib non-free
deb-src http://security.debian.org/ 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-archive-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-archive-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-archive-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib
deb-src [signed-by=/usr/share/keyrings/fuss-archive-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib
EOF
if [ -f $FUSS_KEY ] ; then
cp $FUSS_KEY $CHROOT/usr/share/keyrings/fuss-archive-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-archive-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-archive-keyring.gpg] http://archive.fuss.bz.it/ $RELEASE main contrib contrib non-free
deb-src [signed-by=/usr/share/keyrings/fuss-archive-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-archive-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
filesystem.squashfs
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.
. note::
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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment