# Télécharger l'iso
cd /export/ISOs/Centos8/
wget http://fr2.rpmfind.net/linux/centos/8.0.1905/isos/x86_64/CentOS-8-x86_64-1905-dvd1.iso
# Créer espace de travail
mkdir -p /export/c8/makeisofolder/
mkdir -p /mnt/iso
# Monter l'ISO
mount -o loop /export/ISOs/Centos8/CentOS-8-x86_64-1905-dvd1.iso /mnt/iso
# Copier le contenu
rsync -av /mnt/iso/ /export/c8/makeisofolder/
# Ajouter le kickstart
cp /export/c8/ks.cfg /export/c8/makeisofolder/isolinux/
# Modifier le grub loader
label linux
menu label ^Install CentOS Linux 8.0.1905
......
......
# devient :
label linux
menu label ^Install CentOS Linux 8.0.1905 KickStart
menu default
kernel vmlinuz
append initrd=initrd.img inst.ks=hd:LABEL=CentOS-8-BaseOS-x86_64:/ks.cfg inst.stage2=hd:LABEL=CentOS-8-BaseOS-x86_64 quiet
# Attention : LABEL=CentOS-8-BaseOS-x86_64 doit correspondre à l'option -V de mkisofs ( -V "CentOS-8-BaseOS-x86_64" )
# On génère l'iso
cd /export/c8/makeisofolder/
mkisofs -o /tmp/Centos8_custom.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "CentOS-8-BaseOS-x86_64" -R -J -v -T isolinux/. .
# On le transforme en iso bootable
isohybrid /tmp/Centos8_custom.iso
# On copy l'iso sur le peripherique USB
dd if=/tmp/Centos8_custom.iso of=/dev/sdb bs=4k
Pour mettre à jour, changer uniquement la version de l'OS