Pour créer un système d'installation automatique, on utlise system-config-kickstart. (disponible dans les dépots ou directement sur le média d'installation)
Plusieurs techniques sont possibles : NFS , image FLOPPY … dans laquelle on fournit un fichier de réponse ks.cfg.
dd if=/dev/zero of=/tmp/disquette.img bs=512 count=2950 mke2fs -m 0 /tmp/disquette.img mount -t ext2 -o loop,rw /tmp/disquette.img /mnt/floppy
system-config-start
Une interface graphique vous permettra de choisir différentes options pour l'installation (language/partitionnement/paquets…)
Un fichier d'exemple est créé post-installation dans /root/anaconda-ks.cfg.
Voici un fichier de réponse pour installer CentOS avec création de users/groups :
install cdrom reboot lang fr_FR.UTF-8 keyboard fr-latin9 xconfig --startxonboot network --device eth0 --bootproto dhcp rootpw --iscrypted $1$LDCaP3Js$9FCSA/FSJG/x0t0x9fsjD/ firewall --disabled authconfig --enableshadow --enablemd5 selinux --disabled timezone --utc Europe/Paris bootloader --location=mbr --driveorder=sda --append="rhgb quiet" clearpart --linux part /boot --asprimary --bytes-per-inode=4096 --fstype="ext3" --size=1000 part / --asprimary --bytes-per-inode=4096 --fstype="ext3" --size=7000 part /home --asprimary --bytes-per-inode=4096 --fstype="ext3" --size=2000 part swap --asprimary --bytes-per-inode=4096 --fstype="swap" --size=500 %packages @base @core @development-libs @development-tools @dialup @editors @french-support @gnome-desktop @gnome-software-development @games @graphical-internet @graphics @java-development @legacy-software-development @office @printing @sound-and-video @text-internet @x-software-development @base-x keyutils trousers fipscheck device-mapper-multipath imake libsane-hpaio mesa-libGLU-devel xorg-x11-server-Xnest xorg-x11-server-Xvfb %post groupadd stagiaires groupadd documentation groupadd vip groupadd support useradd -g users -G stagiaires,documentation,support -d /home/francois -m -s /bin/csh francois useradd -G stagiaires,documentation -d /home/fred -m -s /bin/bash fred useradd -G vip,support -d /home/fabrice -m -s /bin/bash fabrice echo "%Support ALL=/bin/chmod, /bin/chown, /bin/chgrp, /bin/df, /usr/bin/du" >> /etc/sudoers %end
mount -t ext2 -o loop,rw /tmp/disquette.img /mnt/floppy cp /root/ks.cfg /mnt/floppy umount /mnt/floppy
Il ne resta plus qu'à monter l'image contenant le fichier de réponse dans votre lecteur disquette.
linux ks=floppy