## Ce fichier se charge après la partie réseau de l'installation (normal, sinon il ne pourrait pas le télécharger) # This first command is run as early as possible, just after # preseeding is read. #d-i preseed/early_command string anna-install some-udeb #Source: https://www.debian.org/releases/lenny/example-preseed.txt ## Activer l'installation par SSH (l'utilisateur est "installer") d-i anna/choose_modules string network-console ## Utiliser un mot de passe pour la session #d-i network-console/password password SECRET123 #d-i network-console/password-again password SECRET123 ## Utiliser une clé SSH pour la session d-i network-console/password-disabled boolean true d-i network-console/authorized_keys_url string http://192.168.180.180/ssh/openssh-key d-i preseed/early_command string anna-install network-console ## Permet de passer automatiquement l'écran d'information de connexion d-i network-console/start select continue ## Mettre le système en Français d-i debian-installer/locale string fr_FR.UTF-8 d-i keyboard-configuration/xkb-keymap select fr(latin9) d-i keyboard-configuration/layout string French d-i keyboard-configuration/layoutcode string fr #d-i console-keymaps-at/keymap select fr d-i keymap skip-config d-i netcfg/choose_interface select auto ## Définir le nom d'hôte. ## Avec les deux paramètres suivants, le nom d'hôte peut-être récupéré ## directement deuis le DHCP avec les directives "option host-name" # d-i netcfg/get_hostname string unassigned-hostname # d-i netcfg/get_domain string unassigned-domain ## Sinon utiliser la linge suivante pour donner le que vous voulez ## Ici, la machine se nommera "Debian-auto" d-i netcfg/hostname string Debian-auto ## Définir le miroir d'installation ## Si vous avez un miroir local, c'est ici qu'il faut donner son adresse d-i mirror/country string manual d-i mirror/http/hostname string ftp.fr.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string ## Définir les mots de passes utilisateurs ## Ici, l'utilisateur root d-i passwd/root-password-crypted password $1$gS7ub6Es$mXmJM2Pcx81LfiFrskJrE1 ## Ici, l'utilisateur yohan d-i passwd/user-fullname string Yohan Charbi d-i passwd/username string yohan d-i passwd/user-password password charbi d-i passwd/user-password-again password charbi #d-i passwd/user-password-crypted $1$Ohff74uq$BE9PsuTxEgdUvU.HNpZiR1 ## Configurer la date et l'heure d-i clock-setup/utc boolean true d-i time/zone string Europe/Paris ## On peut utiliser le serveur NTP que l'on souhaite d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string 192.168.1.140 ## Partitionnement du disque ## Ici, on ne se prend pas la tête, formatage du premier disque ## #d-i partman-auto/disk string /dev/sda ## d-i partman/early_command \ ## string debconf-set partman-auto/disk "$(echo /dev/`ls -l /sys/block/[hs]d* | grep -v "usb" | head -n1 | sed 's/^.*\([hs]d[a-z]\+\).*$/\1/'`)" ## d-i partman-auto/method string regular ## d-i partman-lvm/device_remove_lvm boolean true ## d-i partman-md/device_remove_md boolean true ## d-i partman-auto/expert_recipe string \ ## root-home :: \ ## 8192 100 8192 ext4 \ ## $primary{ } $bootable{ } \ ## method{ format } format{ } \ ## use_filesystem{ } filesystem{ ext4 } \ ## mountpoint{ / } \ ## . \ ## 512 2048 100% linux-swap \ ## $primary{ } \ ## method{ swap } format{ } \ ## . \ ## 1024 10000 1000000000 ext4 \ ## $primary{ } \ ## method{ format } format{ } \ ## use_filesystem{ } filesystem{ ext4 } \ ## mountpoint{ /home } \ ## . \ ## ## d-i partman-partitioning/confirm_write_new_label boolean true ## d-i partman/choose_partition select finish ## d-i partman/confirm boolean true ## d-i partman/confirm_nooverwrite boolean true ## # Source: https://gist.github.com/ageekymonk/3d691d89c14da837955c ## d-i partman/early_command string \ ## USBDEV=$(mount | grep hd-media | cut -d" " -f1 | sed "s/\(.*\)./\1/");\ ## BOOTDEV=$(list-devices disk | grep -v \$USBDEV | head -1);\ ## debconf-set partman-auto/disk \$BOOTDEV;\ ## debconf-set grub-installer/bootdev \$BOOTDEV; ## # Source: https://pastebin.com/aUhSskgX ## d-i partman-auto/method string regular ## d-i partman-auto/init_automatically_partition select Guided - use entire disk ## d-i partman/confirm_write_new_label boolean true ## d-i partman/choose_partition select \ ## Finish partitioning and write changes to disk ## d-i partman/confirm boolean true ## d-i partman/confirm_nooverwrite boolean true #d-i partman-base partman/default_filesystem string ext4 d-i partman-base partman/default_filesystem string btrfs d-i partman-auto/method string regular d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true # Source: https://gist.github.com/ageekymonk/3d691d89c14da837955c #d-i partman/early_command string \ USBDEV=$(mount | grep hd-media | cut -d" " -f1 | sed "s/\(.*\)./\1/");\ BOOTDEV=$(list-devices disk | grep -v \$USBDEV | head -1);\ debconf-set partman-auto/disk \$BOOTDEV;\ debconf-set grub-installer/bootdev \$BOOTDEV; #Source: http://192.168.180.180/scripts/preseed/preseed.cfg d-i partman-auto/expert_recipe string \ #500 10000 1000000 ext4 \ 500 10000 1000000 btrfs \ $primary{ } \ $bootable{ } \ method{ format } \ format{ } \ use_filesystem{ } \ #filesystem{ ext4 } \ filesystem{ btrfs } \ mountpoint{ / } . \ 64 512 300% linux-swap \ method{ swap } \ format{ } . \ d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true ## Définition du dépôt des mises à jours de sécurités d-i apt-setup/services-select multiselect security d-i apt-setup/security_host string security.debian.org ## Participation à l'étude statistique d'utilisation des paquets ## Désactivée popularity-contest popularity-contest/participate boolean false ## Type d'installation ## Utilitaires usuels du systèmes + interface graphique #tasksel tasksel/first multiselect standard, desktop tasksel tasksel/first multiselect standard ## Installation d'utilitaires supplémentaires d-i pkgsel/include string openssh-server vim tree htop tmux bash-completion tcpdump ## Installer GRUB sur /dev/sda sans poser question #d-i grub-installer/bootdev string /dev/sda d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string default #d-i preseed/late_command string update-grub ## Exécuter un script après l'installation d-i preseed/late_command string in-target wget -P /tmp/ http://192.168.180.180/scripts/bash/post-install-deb.sh; in-target chmod +x /tmp/post-install-deb.sh; in-target /tmp/post-install-deb.sh ## Terminer l'installation sans poser de question d-i finish-install/reboot_in_progress note ## Éteindre la machine plutôt que de la redémarrer d-i debian-installer/exit/poweroff boolean true