Compare commits

..

No commits in common. "master" and "v0.3.0" have entirely different histories.

178 changed files with 1041 additions and 14635 deletions

2
.gitignore vendored
View File

@ -1,3 +1 @@
installer/ installer/
temp_pxe_files/
*.deb

View File

@ -1,60 +1,3 @@
## Release 1.0.0
### Removed
* No longer download Wheezy release.
* gpxelinux cause it is no longer available in Debian package.
* Debian Jessie entries.
### Bullseye support
* Download new Debian Stable Bullseye.
* Set new latecommand script (update packages,…).
* Preseed files :
* Default preseed file.
* Add Cinnamon preseed (UEFI + LUKS).
* Add Gnome3 preseeds (UEFI + LUKS or UEFI).
* Add compute node preseed.
### Improvement
* Add an UEFI entry to manage specific partitions (see #16).
* task-ssh-server is removed (see #18).
* task-french and task-english are removed (see #18).
* Ensure to have minimal documentation available on the system.
* Do not use wireless interface for installation (see #19).
* Gnome preseed is now only available with UEFI (see #20).
* Update PXE files to last version from Bullseye (6.04~git20190206.bf6db5b4).
* Use deb.debian.org fastly instance instead of ftp.fr.debian.org URL.
### Fix
* Remove tasksel only if no X session was installed (see #17).
* Update doc about Debian distribution name and remove useless entries (oldStable).
* No longer define zsh as default shell for root.
* Installation of aptitude, puppet, tmux and zsh move to latecommand script (post.sh).
* Upgrade iwlwifi firmware to version 20210315.
## Release 0.4.1
### Improvement
* Standard task is no longer install for Debian Stretch server with preseed (see #14).
* Ensure to install `python-apt`|Ansible dependencie (see #14).
### Fix
* Ensure to create olddir (/var/log/messages.d) for 'messages' log.
* Remove the "\" for Rsyslog 'messages' definition.
## Release 0.4.0
### Features
* Delete the extra partition for free space with the Debian's preseed (#2).
* Add some backgrounds (#4).
* Update Clonezilla and Gparted to their latest version.
* Swap is now between 25% of the RAM and 32GB at max.
* Add a nvme0n1 disk to allow auto-partition from the preseed file for new SSD connection.
* Add an entry to install Debian Stable with Mate environnment for i386 computers.
* New logrotate configuration for Debian Stretch (#12).
### Fixes
* Use the new IP address.
* Use shellcheck to ensure POSIX compatibility.
* Add information about update netboot installer after each point release (#5).
## Release 0.3.0 ## Release 0.3.0
### Summary ### Summary
@ -66,6 +9,7 @@ Features release.
* Update the PXE files to the latest Jessie version. * Update the PXE files to the latest Jessie version.
* Documentation updates. * Documentation updates.
#### Fixes #### Fixes
* Debian's preseed: /opt max size is 4Gb for all Debian. * Debian's preseed: /opt max size is 4Gb for all Debian.
* Fix differences between all preseed files. * Fix differences between all preseed files.
@ -104,7 +48,7 @@ The code move to Gogs.
* scripts/README.md desribe the scripts. * scripts/README.md desribe the scripts.
* Move Debian Jessie in front of Wheezy. * Move Debian Jessie in front of Wheezy.
* New preseed files (for Jessie/Wheezy, GUI for minions,…). * New preseed files (for Jessie/Wheezy, GUI for minions,…).
* New firmwares for the initrd: **myricom** and **qlogic**. * New firmares for the initrd: **myricom** and **qlogic**.
* Add a vda disk to allow auto-partition from the preseed file for VM. * Add a vda disk to allow auto-partition from the preseed file for VM.
#### Bugfixes #### Bugfixes

117
README.md
View File

@ -11,7 +11,7 @@
## Overview ## Overview
All needed files to set up a PXE server for both standard bios and UEFI (32b and 64b). All needed files to set up a PXE server.
## Description ## Description
@ -20,48 +20,24 @@ Use some bootloaders files provide by:
* `pxelinux` debian package: * `pxelinux` debian package:
* gpxelinux.0 * gpxelinux.0
* pxelinux.0 * pxelinux.0
* `syslinux-efi` debian package:
* syslinux.efi
* `syslinux-common` debian package: * `syslinux-common` debian package:
* chain.c32 * chain.c32
* ldlinux.c32 * ldlinux.c32
* ldlinux.e32
* ldlinux.e64
* libcom32.c32 * libcom32.c32
* libutil.c32 * libutil.c32
* menu.c32 * menu.c32
* reboot.c32 * reboot.c32
* vesamenu.c32 * vesamenu.c32
* To get those files from the packages of your repositories: To get those files from the packages of your repositories:
``` sh ``` sh
mkdir -p temp_pxe_files mkdir -p temp_pxe_files
cd temp_pxe_files cd temp_pxe_files
mkdir bios efi32 efi64 aptitude download pxelinux syslinux-common
aptitude download pxelinux syslinux-common syslinux-efi ar p pxelinux*.deb data.tar.xz | tar xJ -C . --strip-components=4 ./usr/lib/PXELINUX/{g,}pxelinux.0
ar p pxelinux*.deb data.tar.xz | tar xJ -C . --strip-components=4 ./usr/lib/PXELINUX/pxelinux.0
ar p pxelinux*.deb data.tar.xz | tar xJ -C bios/ --strip-components=4 ./usr/lib/PXELINUX/pxelinux.0
ar p syslinux-efi*.deb data.tar.xz | tar xJ -C efi32/ --strip-components=5 ./usr/lib/SYSLINUX.EFI/efi32/syslinux.efi
ar p syslinux-efi*.deb data.tar.xz | tar xJ -C efi64/ --strip-components=5 ./usr/lib/SYSLINUX.EFI/efi64/syslinux.efi
ar p syslinux-common*.deb data.tar.xz | tar xJ -C . --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.c32 ar p syslinux-common*.deb data.tar.xz | tar xJ -C . --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.c32
ar p syslinux-common*.deb data.tar.xz | tar xJ -C bios/ --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.c32
ar p syslinux-common*.deb data.tar.xz | tar xJ -C efi32/ --strip-components=6 ./usr/lib/syslinux/modules/efi32/{chain.c32,ldlinux.e32,libcom32.c32,libutil.c32,menu.c32,reboot.c32,vesamenu.c32}
ar p syslinux-common*.deb data.tar.xz | tar xJ -C efi64/ --strip-components=6 ./usr/lib/syslinux/modules/efi64/{chain.c32,ldlinux.e64,libcom32.c32,libutil.c32,menu.c32,reboot.c32,vesamenu.c32}
``` ```
The MD5 checksum can mismatch between the files from this repo and those from Debian's packages.
* The MD5 checksum can mismatch between the files from this repo and those from Debian's packages.
* Then create symlinks to avoid to duplicate files:
``` sh
for DIR in bios efi32 efi64; do
ln -s ../config "${DIR}"
ln -s ../installer "${DIR}"
ln -s ../preseed "${DIR}"
ln -s ../pxelinux.cfg "${DIR}"
done
```
### Configuration files ### Configuration files
Contains the files which defines the PXE menu. The [first one][main menu.cfg] will: Contains the files which defines the PXE menu. The [first one][main menu.cfg] will:
@ -72,19 +48,21 @@ Contains the files which defines the PXE menu. The [first one][main menu.cfg] wi
#### config/debian/menu.cfg #### config/debian/menu.cfg
1. Provide PXE entries for: 1. Provide PXE entries for:
* Debian Bookworm (Stable) amd64 with additional firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script). * Debian Jessie (Stable) amd64.
* Debian Bookworm (Stable) amd64 with additional firmwares and preseed file. * Debian Jessie (Stable) amd64 with additionnals firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script).
* Debian Bookworm (Stable) amd64 for compute nodes with preseed. * Debian Jessie (Stable) amd64 with additionnals firmwares and preseed file.
* Debian Bullseye (oldStable) amd64 with additional firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script). * Debian Jessie (Stable) amd64 for minions with preseed (Mate as default GUI).
* Debian Bullseye (oldStable) amd64 with additional firmwares and preseed file. * Debian Jessie (Stable) amd64 for minions with preseed (Cinnamon as default GUI).
* Debian Bullseye (oldStable) amd64 for compute nodes with preseed. * Debian Jessie (Stable) amd64 for minions with preseed (Gnome 3 as default GUI).
* Debian Bullseye (oldStable) amd64 + UEFI + LUKS for minions with preseed (Cinnamon as default GUI). * Debian Jessie (Stable) i386.
* Debian Bullseye (oldStable) amd64 + UEFI + LUKS for minions with preseed (Gnome3 as default GUI). * Debian Wheezy (oldStable) amd64 with additionnals firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script).
* Debian Bullseye (oldStable) amd64 + UEFI for minions with preseed (Gnome3 as default GUI). * Debian Wheezy (oldStable) amd64 with additionnals firmwares and preseed file.
* Debian Wheezy (oldStable) amd64 with preseed (Gnome 3 as default GUI).
* Debian Wheezy (oldStable) i386.
* Debian Sid (unstable) amd64. * Debian Sid (unstable) amd64.
* Debian Sid (unstable) amd64 with additional firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script). * Debian Sid (unstable) amd64 with additionnals firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script).
* Debian Sid (unstable) i386. * Debian Sid (unstable) i386.
2. If you want to use with your own TFTPD server, you need te set your IP server! Replace all occurrences of *129.20.203.27* by the IP of your TFTPD server to be able to load the preseed files! 2. If you want to use with your own TFTPD server, you need te set your IP server! Replace all occurrences of *129.20.27.239* by the IP of your TFTPD server to be able to load the preseed files!
#### config/ubuntu/menu.cfg #### config/ubuntu/menu.cfg
Provide PXE entries for: Provide PXE entries for:
@ -95,7 +73,7 @@ Provide PXE entries for:
### Preseed ### Preseed
A preseed file can be loaded by the Debian-Installer to answer all questions A preseed file can be loaded by the Debian-Installer to answer all questions
Preseeding provides a way to set answers to questions asked by the Debian-Installer, without having to manually enter the answers. This makes it possible to fully automate most types of installation and even offers some features not available during normal installations. More informations on [Debian wiki][preseed informations] and in [Debian sources][debian sources] (search for partman-auto, partman-lvm,… packages). Preseeding provides a way to set answers to questions asked by the Debian-Installer, without having to manually enter the answers. This makes it possible to fully automate most types of installation and even offers some features not available during normal installations. More informations on [Debian wiki][preseed informations].
#### Commons configurations #### Commons configurations
* Localization: * Localization:
@ -105,7 +83,7 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
* Keyboard: fr-latin9 (French) * Keyboard: fr-latin9 (French)
* Hardware: * Hardware:
* Network configuration (IP, hostname, domain): automatic (from DHCP server) * Network configuration (IP, hostname, domain): automatic (from DHCP server)
* Load additional firmwares if availables. * Load additionnals firmwares if availables.
* Account: * Account:
* Create a root account. * Create a root account.
* root password: SHA-256 hash of the password * root password: SHA-256 hash of the password
@ -114,7 +92,7 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
* Timezone: Europe/Paris * Timezone: Europe/Paris
* NTP server: ntp.univ-rennes1.fr * NTP server: ntp.univ-rennes1.fr
* Partitionning * Partitionning
* Use the entire first disk (sda, vda aka virtual hdd or nvme0n1) with LVM. * Use the entire first disk (sda or vda aka virtual hdd) with LVM.
* Purge all LVM, RAID,… partitions or informations already set on the first disk. * Purge all LVM, RAID,… partitions or informations already set on the first disk.
* Partitionning: * Partitionning:
@ -132,12 +110,14 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
| lv_swap | SWAP | 512 Mb - 100% RAM size | Swap sapce | | lv_swap | SWAP | 512 Mb - 100% RAM size | Swap sapce |
| lv_free | /mnt/free | free space | See below | | lv_free | /mnt/free | free space | See below |
* APT: * APT:
* Installation from internet (repository: deb.debian.org) * Installation from internet (repository: ftp.fr.debian.org)
* Add a repository for Puppet (http://apt.puppetlabs.com) and the GPG key.
* Select **ssh-server** and **standard** in _tasksel_ for installation. * Select **ssh-server** and **standard** in _tasksel_ for installation.
* Add additional packages: **tftp-hpa** (to be able to download the [latecommand archive from the PXE server][debian latecommand howto]). * Add additionnals packages: **tmux**, **puppet**, **zsh** and **tftp-hpa** (to be able to download the [latecommand archive from the PXE server][debian latecommand howto]).
* Bootloader: * Bootloader:
* Install Grub on the MBR of the first disk. * Install Grub on the MBR of the first disk.
* late_command * late_command
* Define ZSH as the default shell.
* Permit root login via SSH with it's password. * Permit root login via SSH with it's password.
* Download and extract a _latecommand_ archive from [this repository][debian latecommand description]. * Download and extract a _latecommand_ archive from [this repository][debian latecommand description].
* Run the script from this archive. * Run the script from this archive.
@ -145,36 +125,20 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
------ ------
**lv_free - /mnt/free** **lv_free - /mnt/free**
: The preseed's partitionning need to allocate all the disk space. If it's not define, it will put in the last defined partition all extra free space. So **lv_free** is a temporary LV that you can destroy and use the space to resize any other LV. : The preseed's partitionning need to allocate all the disk space. If it's not define, it will put it in the last defined partition all extra free space. So **lv_free** is a temporary LV that you can destroy and use the space to resize any other LV.
#### Specific configurations #### Specific configurations
* You can choose a desktop environment: * You can choose a desktop environment:
* Debian Stable (aka Bullseye): Cinnamon or Gnome3 * Debian Stable (aka Jessie): Cinnamon, Mate or Gnome3
* Debian oldStable (aka Wheezy): Gnome3
* Partitionning differences for Debian with a desktop environment: * Partitionning differences for Debian with a desktop environment:
| Device | Mount point | Size (Min - Max) | Description | | Device | Mount point | Size (Min - Max) | Description |
|---------|-------------|-------------------|-------------------------------------------------------------| |---------|-------------|------------------|-------------------------------------------------------------|
| sda1 | /boot/efi | 512 - **1024** Mb | EFI partition (from Buster) |
| lv_root | / | 1 - **3** Gb | root partition | | lv_root | / | 1 - **3** Gb | root partition |
| lv_home | /home | 2 - **10** Gb | User's home directories (saved files, personnal settings,…) | | lv_home | /home | 2 - **10** Gb | User's home directories (saved files, personnal settings,…) |
| lv_srv | NOT PRESENT | NOT PRESENT | | | lv_srv | NOT PRESENT | NOT PRESENT | |
#### Informations
* You can use the command: `mkpasswd -m sha-512` to generate a SHA-512 hash for a password.
#### Known issues
##### Volume group name already in use
Despite some preseed's options, these error might occur if a VG_NAME is :
* present on a "first" hard disk
* expected to be created on another hard disk
To fix this :
* Double check the hard disk that should be use for the operating system.
* Manually remove the "previous" VG : `vgremove VG_NAME` and restart the installer.
### Scripts ### Scripts
See the [scripts's README.md][scripts readme.md] file for more informations. See the [scripts's README.md][scripts readme.md] file for more informations.
@ -182,31 +146,38 @@ See the [scripts's README.md][scripts readme.md] file for more informations.
## How to use it ## How to use it
* Put the data of this repository on the PXE server: * Put the data of this repository on the PXE server:
* Clone the repository with https URL or with SSH to **/var/lib/tftpboot**. * Clone the repository with https URL or with SSH to **/var/lib/tftpboot**.
* Download the last archive: `wget https://git.ipr.univ-rennes.fr/cellinfo/tftpboot/archive/master.tar.gz` * Download the last archive: `wget https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/archive/master.tar.gz`
* Install a TFTP server (`tftpd-hpa` package for Debian's based systems or `tftp-server` for Redhat's based systems). * Install a TFTP server (`tftpd-hpa` package for Debian's based systems or `tftp-server` for Redhat's based systems).
* Start the tftpd's service: * Start the tftpd's service:
* `sudo service tftpd-hpa start` * `sudo service tftpd-hpa start`
* `sudo systemctl start tftpd-hpa` * `sudo systemctl start tftpd-hpa`
* You can test if the TFTP server provide the files with a TFTP client (`tftp-hpa`) by downloading a file with the command: `tftp $IP.SRV.TFTP -c get README.md /tmp/README.md_from_tftpd_server` * You can test if the TFTP server provide the files with a TFTP client (`tftp-hpa`) by downloading a file with the command: `tftp $IP.SRV.TFTP -c get README.md /tmp/README.md_from_tftpd_server`
* Set your IP in some files instead of the default one *129.20.203.27*: * Set your IP in some files instead of the default one _129.20.27.239_:
* In configurations files to be able to call Debian's Preseed files or download squashfs filesystem (for Clonezilla, GParted,…): `sudo find config/ -iname "*.cfg" -type f -exec sed -i "s/129.20.203.27/111.222.333.444/g" {} \;` * In configurations files to be able to call Debian's Preseed files or download squashfs filesystem (for Clonezilla, GParted,…): `sudo find config/ -iname "*.cfg" -type f -exec sed -i "s/129.20.27.239/111.222.333.444/g" {} \;`
* In Preseed files, to be able to download the late_command archive from your TFTPD server: `sudo find preseed/ -type f -exec sed -i "s/129.20.203.27/111.222.333.444/g" {} \;` * In Preseed files, to be able to download the late_command archive from your TFTPD server: `sudo find preseed/ -type f -exec sed -i "s/129.20.27.239/111.222.333.444/g" {} \;`
* In scripts to generate examples configuration files with the right IP address: `sudo find scripts/ -iname "*.sh" -type f -exec sed -i "s/129.20.203.27/111.222.333.444/g" {} \;` * In scripts to generate examples configuration files with the right IP address: `sudo find scripts/ -iname "*.sh" -type f -exec sed -i "s/129.20.27.239/111.222.333.444/g" {} \;`
* Run scripts to download needed PXE files (see the [scripts's README.md][scripts readme.md] for more informations): * Run scripts to download needed PXE files (see the [scripts's README.md][scripts readme.md] for more informations):
* Debian: `sudo ./scripts/download_debian.sh` * Debian: `sudo ./scripts/download_debian.sh`
* Debian's initrd with additional firmwares: `sudo ./scripts/make_debian_initrd_with_firmware.sh` * Debian's initrd with additionnals firmwares: `sudo ./scripts/make_debian_initrd_with_firmware.sh"`
* Ubuntu: `sudo ./scripts/download_ubuntu.sh` * Ubuntu: `sudo ./scripts/download_ubuntu.sh`
* Diagnostic tools (Memtest86+, GParted Live,…): `sudo ./scripts/download_diag_tools.sh` * Diagnostic tools (Memtest86+, GParted Live,…): `sudo ./scripts/download_diag_tools.sh`
* Clonezilla: `sudo ./scripts/download_clonezilla.sh` * Clonezilla: `sudo ./scripts/download_clonezilla.sh`
* Generate the late_command archive: `cd scripts/ ; sudo tar czvf latecommand.tar.gz latecommand/` * Generate the late_command archive: `cd scripts/ ; sudo tar czvf latecommand.tar.gz latecommand/`
## TODO
* Add a tiny preseed file that could be loaded for a manual install.
* Download the latecommand archive from this repository instead of the TFTPD server?
* Add Debian Stretch support #1
[main menu.cfg]: ./config/menu.cfg [main menu.cfg]: ./config/menu.cfg
[debian menu.cfg]: ./config/debian/menu.cfg [debian menu.cfg]: ./config/debian/menu.cfg
[preseed informations]: https://wiki.debian.org/DebianInstaller/Preseed [preseed informations]: https://wiki.debian.org/DebianInstaller/Preseed
[debian sources]: https://sources.debian.org/ [preseed jessie]: ./preseed/debian/jessie/preseed.cfg "Debian Jessie preseed"
[preseed wheezy]: ./preseed/debian/wheezy/preseed.cfg "Debian Wheezy preseed"
[scripts readme.md]: ./scripts/README.md "scripts's README.md for tftpboot" [scripts readme.md]: ./scripts/README.md "scripts's README.md for tftpboot"
[debian initrd with firmware script]: ./scripts/README.md#make_debian_initrd_with_firmwaresh "informations about the Debian's initrd with additional firmwares" [debian initrd with firmware script]: ./scripts/README.md#make_debian_initrd_with_firmwaresh "informations about the Debian's initrd with additionnals firmwares"
[debian latecommand description]: ./scripts/README.md#debian-late_command "informations about the Debian's late_command script" [debian latecommand description]: ./scripts/README.md#debian-late_command "informations about the Debian's late_command script"
[debian latecommand howto]: ./scripts/README.md#how-to-use-it "how-to use the Debian's late_command" [debian latecommand howto]: ./scripts/README.md#how-to-use-it "how-to use the Debian's late_command"
[debian latecommand post.sh script]: ./scripts/latecommand/post.sh [debian latecommand post.sh script]: ./scripts/latecommand/post.sh

View File

@ -1,3 +0,0 @@
## TODO
* Add a tiny preseed file that could be loaded for a manual install.
* Add new tools #3

View File

@ -1,83 +0,0 @@
#!/bin/sh
RSYSLOGD_CONF_SRC="$(dirname $0)/jessie/etc/rsyslog.conf"
RSYSLOGD_CONF_PATH="/etc/rsyslog.conf"
RSYSLOGD_INCLUDE_SRC="$(dirname $0)/jessie/etc/rsyslog.d/"
RSYSLOGD_INCLUDE_PATH="/etc/rsyslog.d/"
LOGROTATE_CONF_SRC="$(dirname $0)/jessie/etc/logrotate.conf"
LOGROTATE_CONF_PATH="/etc/logrotate.conf"
LOGROTATE_INCLUDE_SRC="$(dirname $0)/jessie/etc/logrotate.d/"
LOGROTATE_INCLUDE_PATH="/etc/logrotate.d/"
## Packages {{{
# Ensure to have some basic packages
apt -y install aptitude puppet tmux zsh
# Remove NFS and rpcbind
aptitude -y remove nfs-common rpcbind
### Tasksel {{{
if [ "$(dpkg -l task-french)" ]; then
# Move default wordlist to american before remove all packages
select-default-wordlist --set-default=american
aptitude -y remove tasksel tasksel-data task-english task-french task-ssh-server laptop-detect
# Reinstall useful french doc and move back to french dict
aptitude -y install aspell-fr doc-debian-fr doc-linux-fr-text ifrench-gut manpages-fr manpages-fr-extra wfrench
select-default-wordlist --set-default=".*(F|f)rench.*"
else
aptitude -y remove tasksel tasksel-data task-english task-ssh-server laptop-detect
fi
### }}}
# Ensure to reinstall openssh-server
aptitude -y install openssh-server openssh-sftp-server
## }}}
### Rsyslog {{{
# Install new Rsyslog configuration
if [ -f "${RSYSLOGD_CONF_PATH}" ]; then
cp -- "${RSYSLOGD_CONF_PATH}" "${RSYSLOGD_CONF_PATH}".orig
cp -- "${RSYSLOGD_CONF_SRC}" "${RSYSLOGD_CONF_PATH}"
fi
cp -- "${RSYSLOGD_INCLUDE_SRC}"* "${RSYSLOGD_INCLUDE_PATH}"
# Remove old log files
## Kernel log files
rm -f /var/log/kern.log
## Authentication log files
rm -f /var/log/user.log /var/log/auth.log
## Mail log files
rm -f /var/log/mail.err /var/log/mail.info /var/log/mail.log /var/log/mail.warn
## System log files
rm -f /var/log/daemon.log /var/log/syslog /var/log/messages
# Restart Rsyslog service
/etc/init.d/rsyslog restart
### }}}
### Logrotate {{{
# Install new Logrotate configuration
if [ -f "${LOGROTATE_CONF_PATH}" ]; then
cp -- "${LOGROTATE_CONF_PATH}" "${LOGROTATE_CONF_PATH}".orig
cp -- "${LOGROTATE_CONF_SRC}" "${LOGROTATE_CONF_PATH}"
fi
cp -- "${LOGROTATE_INCLUDE_SRC}"* "${LOGROTATE_INCLUDE_PATH}"
# Create an archive directory for some log files (aptitude, dpkg,…)
mkdir -p -- /var/log/old_logs
# Create the log directory for journald (Systemd), need the configuration Storage=(auto|persistent)
mkdir -p -- /var/log/journal
### }}}
exit 0

Binary file not shown.

View File

@ -1 +0,0 @@
../config

View File

@ -1 +0,0 @@
../installer

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
../preseed

Binary file not shown.

View File

@ -1 +0,0 @@
../pxelinux.cfg

Binary file not shown.

Binary file not shown.

BIN
chain.c32

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,16 +1,14 @@
MENU BACKGROUND /config/clonezilla/clonezilla_background.jpg
label liveamd64 label liveamd64
menu label Clonezilla Live ^amd64 menu label Clonezilla Live ^amd64
kernel installer/clonezilla/amd64/vmlinuz kernel installer/clonezilla/amd64/vmlinuz
APPEND initrd=installer/clonezilla/amd64/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://129.20.203.27/installer/clonezilla/amd64/filesystem.squashfs APPEND initrd=installer/clonezilla/amd64/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://129.20.27.239/installer/clonezilla/amd64/filesystem.squashfs
# keyboard-layouts="fr" define the keymap # keyboard-layouts="fr" define the keymap
# locales="fr_FR.UTF-8" define the locale # locales="fr_FR.UTF-8" define the locale
# gl_batch: detect the display # gl_batch: detect the display
label livei686 label livei686
menu label Clonezilla Live ^i686 menu label Clonezilla Live ^i686
kernel installer/clonezilla/i686/vmlinuz kernel installer/clonezilla/i686/vmlinuz
APPEND initrd=installer/clonezilla/i686/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://129.20.203.27/installer/clonezilla/i686/filesystem.squashfs APPEND initrd=installer/clonezilla/i686/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://129.20.27.239/installer/clonezilla/i686/filesystem.squashfs
label separator label separator
menu label ----- menu label -----
label mainmenu label mainmenu

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,87 +1,65 @@
MENU BACKGROUND /config/debian/debian_background.jpg label install
menu label Debian jessie ^amd64
label stableFirmware kernel installer/debian/jessie/amd64/linux
menu label ^Debian Bookworm amd64 Firmwares append vga=normal initrd=installer/debian/jessie/amd64/initrd.gz -- quiet
kernel installer/debian/bookworm/amd64/linux label installFirmware
append vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz -- quiet menu label Debian jessie amd64 ^Firmwares
label stableAuto kernel installer/debian/jessie/amd64/linux
menu label Debian ^Bookworm amd64 PRESEED append vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz -- quiet
kernel installer/debian/bookworm/amd64/linux label installAuto
append vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bookworm/preseed.cfg menu label Debian jessie amd64 ^PRESEED
label stableNoPartitioning kernel installer/debian/jessie/amd64/linux
menu label Debian Bookworm amd64 Preseed ^WITHOUT Partitioning append vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/preseed/debian/jessie/preseed.cfg IPAPPEND 2
kernel installer/debian/bookworm/amd64/linux label installMate
append vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bookworm/preseed.without.partitioning.cfg menu label Debian jessie STAGIAIRE ^Mate amd64 PRESEED
label stableComputeNode kernel installer/debian/jessie/amd64/linux
menu label Debian Bookworm amd64 for ^compute node PRESEED append vga=normal initrd=installer/debian/jessie/amd64/initrd.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/preseed/debian/jessie/preseed_mate.cfg IPAPPEND 2
kernel installer/debian/bookworm/amd64/linux label installCinnamon
IPAPPEND 2 menu label Debian jessie STAGIAIRE ^Cinnamon amd64 PRESEED
append vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bookworm/preseed.computenode.cfg kernel installer/debian/jessie/amd64/linux
label stableGnome append vga=normal initrd=installer/debian/jessie/amd64/initrd.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/preseed/debian/jessie/preseed_cinnamon.cfg IPAPPEND 2
menu label Debian Bookworm ^Gnome3 + UEFI WITH PRESEED label installGnome
kernel installer/debian/bookworm/amd64/linux menu label Debian jessie STAGIAIRE ^Gnome amd64 PRESEED
IPAPPEND 2 kernel installer/debian/jessie/amd64/linux
APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bookworm/preseed.gnome.uefi.cfg append vga=normal initrd=installer/debian/jessie/amd64/initrd.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/preseed/debian/jessie/preseed_gnome.cfg IPAPPEND 2
label install
label stableCinnamon menu label Debian jessie ^i386
menu label Debian Bookworm ^Cinnamon + UEFI WITH PRESEED kernel installer/debian/jessie/i386/linux
kernel installer/debian/bookworm/amd64/linux append vga=normal initrd=installer/debian/jessie/i386/initrd.gz -- quiet
IPAPPEND 2
APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bookworm/preseed.cinnamon.uefi.cfg
label separator label separator
menu label --- menu label ---
label installFirmware
label oldstableFirmware menu label Debian wheezy amd64 Firmwares
menu label Debian Bullseye amd64 Firmwares kernel installer/debian/wheezy/amd64/linux
kernel installer/debian/bullseye/amd64/linux append vga=normal initrd=installer/debian/wheezy/amd64/initrd_firm.gz -- quiet
append vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz -- quiet label wheezy
label oldstableAuto menu label Debian ^wheezy amd64 PRESEED
menu label Debian Bu^llseye amd64 PRESEED kernel installer/debian/wheezy/amd64/linux
kernel installer/debian/bullseye/amd64/linux append vga=normal initrd=installer/debian/wheezy/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/preseed/debian/wheezy/preseed.cfg IPAPPEND 2
IPAPPEND 2 label install
append vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bullseye/preseed.cfg menu label Debian wheezy i386
label oldstableComputeNode kernel installer/debian/wheezy/i386/linux
menu label Debian Bullseye amd64 for compute node PRESEED append vga=normal initrd=installer/debian/wheezy/i386/initrd.gz -- quiet
kernel installer/debian/bullseye/amd64/linux label install
IPAPPEND 2 menu label Debian wheezy STAGIAIRE Gnome amd64 PRESEED
append vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bullseye/preseed.computenode.cfg kernel installer/debian/wheezy/amd64/linux
label oldstableGnomeCrypto append vga=normal initrd=installer/debian/wheezy/amd64/initrd.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/preseed/debian/wheezy/preseed_gnome.cfg IPAPPEND 2
menu label Debian Bullseye Gnome3 + UEFI + Cipher WITH PRESEED
kernel installer/debian/bullseye/amd64/linux
IPAPPEND 2
APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bullseye/preseed.gnome.uefi.cipher.cfg
label oldstableCinnamonCrypto
menu label Debian Bullseye Cinnamon + UEFI + Cipher WITH PRESEED
kernel installer/debian/bullseye/amd64/linux
IPAPPEND 2
APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bullseye/preseed.cinnamon.uefi.cipher.cfg
label oldstableGnome
menu label Debian Bullseye Gnome3 + UEFI WITH PRESEED
kernel installer/debian/bullseye/amd64/linux
IPAPPEND 2
APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/bullseye/preseed.gnome.uefi.cfg
label separator label separator
menu label --- menu label ---
label install
label unstableAmd64
menu label Debian ^sid amd64 menu label Debian ^sid amd64
kernel installer/debian/sid/amd64/linux kernel installer/debian/sid/amd64/linux
append vga=normal initrd=installer/debian/sid/amd64/initrd.gz -- quiet append vga=normal initrd=installer/debian/sid/amd64/initrd.gz -- quiet
label unstableFirmware label install
menu label Debian sid amd64 FIRMWARE menu label Debian sid amd64 FIRMWARE
kernel installer/debian/sid/amd64/linux kernel installer/debian/sid/amd64/linux
append vga=normal initrd=installer/debian/sid/amd64/initrd_firm.xz -- quiet append vga=normal initrd=installer/debian/sid/amd64/initrd_firm.gz -- quiet
label unstableCrypt label install
menu label Debian sid amd64 with BTRFS and LUKS menu label Debian sid i386
kernel installer/debian/sid/amd64/linux kernel installer/debian/sid/i386/linux
IPAPPEND 2 append vga=normal initrd=installer/debian/sid/i386/initrd.gz -- quiet
APPEND vga=normal initrd=installer/debian/sid/amd64/initrd_firm.xz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/preseed/debian/sid/preseed.uefi.luks.btrfs.cfg
label separator label separator
menu label --- menu label ---
label mainmenu label mainmenu
menu label ^Back.. menu label ^Back..
menu exit menu exit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

View File

@ -1,20 +1,18 @@
MENU BACKGROUND /config/diag/diag_background.jpg
label memtest label memtest
menu label ^Memory diagnostic tool (Memtest) menu label ^Memory diagnostic tool (Memtest)
kernel installer/memtest/memtest86+ kernel installer/memtest/memtest86+
label sysresccd label sysresccd
menu label ^Recovery CD (SysRescCD) menu label ^Recovery CD (SysRescCD)
kernel installer/sysresccd/rescuecd kernel installer/sysresccd/rescuecd
append scandelay=5 initrd=installer/sysresccd/initram.igz setkeymap=fr boottftp=tftp://129.20.203.27/installer/sysresccd/sysrcd.dat append scandelay=5 initrd=installer/sysresccd/initram.igz setkeymap=fr boottftp=tftp://129.20.27.239/installer/sysresccd/sysrcd.dat
label gpartedliveamd64 label gpartedliveamd64
menu label Partiton Manager amd64 (^Gparted) menu label Partiton Manager amd64 (^Gparted)
kernel installer/gparted/amd64/vmlinuz kernel installer/gparted/amd64/vmlinuz
append initrd=installer/gparted/amd64/initrd.img boot=live config components union=overlay username=user noswap noeject vga=788 fetch=http://store.ipr.univ-rennes1.fr/InstallProgs/gparted/amd64/filesystem.squashfs append initrd=installer/gparted/amd64/initrd.img boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=tftp://129.20.27.239/installer/gparted/amd64/filesystem.squashfs
label gpartedlivei686 label gpartedlivei686
menu label Partiton Manager i686 (^Gparted) menu label Partiton Manager i686 (^Gparted)
kernel installer/gparted/i686/vmlinuz kernel installer/gparted/i686/vmlinuz
append initrd=installer/gparted/i686/initrd.img boot=live config components union=overlay username=user noswap noeject vga=788 fetch=http://store.ipr.univ-rennes1.fr/InstallProgs/gparted/i686/filesystem.squashfs append initrd=installer/gparted/i686/initrd.img boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=tftp://129.20.27.239/installer/gparted/i686/filesystem.squashfs
label separator label separator
menu label ------ menu label ------
label mainmenu label mainmenu

View File

@ -1,5 +1,3 @@
MENU BACKGROUND /config/ubuntu/ubuntu_background.jpg
label lts64 label lts64
menu label Ubuntu LTS (16.04) GNU/Linux ^amd64 menu label Ubuntu LTS (16.04) GNU/Linux ^amd64
kernel installer/ubuntu/lts/amd64/linux kernel installer/ubuntu/lts/amd64/linux
@ -9,13 +7,13 @@ label lts86
kernel installer/ubuntu/lts/i386/linux kernel installer/ubuntu/lts/i386/linux
append vga=normal initrd=installer/ubuntu/lts/i386/initrd.gz -- quiet append vga=normal initrd=installer/ubuntu/lts/i386/initrd.gz -- quiet
label latest64 label latest64
menu label Ubuntu ^Latest (17.10) GNU/Linux amd64 menu label Ubuntu ^Latest (15.10) GNU/Linux amd64
kernel installer/ubuntu/artful/amd64/linux kernel installer/ubuntu/wily/amd64/linux
append vga=normal initrd=installer/ubuntu/artful/amd64/initrd.gz -- quiet append vga=normal initrd=installer/ubuntu/wily/amd64/initrd.gz -- quiet
label latest86 label latest86
menu label Ubuntu ^Latest (17.10) GNU/Linux i386 menu label Ubuntu ^Latest (15.10) GNU/Linux i386
kernel installer/ubuntu/artful/i386/linux kernel installer/ubuntu/wily/i386/linux
append vga=normal initrd=installer/ubuntu/artful/i386/initrd.gz -- quiet append vga=normal initrd=installer/ubuntu/wily/i386/initrd.gz -- quiet
label separator label separator
menu label ----- menu label -----

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

View File

@ -1 +0,0 @@
../config

View File

@ -1 +0,0 @@
../installer

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
../preseed

View File

@ -1 +0,0 @@
../pxelinux.cfg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
../config

View File

@ -1 +0,0 @@
../installer

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
../preseed

View File

@ -1 +0,0 @@
../pxelinux.cfg

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
gpxelinux.0 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
menu.c32

Binary file not shown.

View File

@ -1,421 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
### Howto use [[[
######################################################################
# Inspired from https://www.debian.org/releases/bookworm/example-preseed.txt
# For more details about all parameters, see projects under Debian installer:
# https://salsa.debian.org/installer-team
## With a PXE boot:
#label bookworm
# menu label Debian GNU/Linux Book^worm 64 bits WITH PRESEED
# kernel installer/debian/bookworm/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bookworm/amd64/preseed.cfg
################################################################## ]]]
### Localization [[[
######################################################################
## Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
# Choose the language to be used for the installation process. The selected
# language will also be the default language for the installed system.
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select fr
################################################################## ]]]
### Network configuration [[[
######################################################################
# Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# If you want to completely disable firmware lookup (i.e. not use firmware
# files or packages that might be available on installation images):
#d-i hw-detect/firmware-lookup string never
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
### Network console [[[
######################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
### Mirror settings [[[
######################################################################
# Mirror
# Usually, deb.debian.org is a good choice
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
# Suite to install.
d-i mirror/suite string
# Suite to use for loading installer components (optional).
#d-i mirror/udeb/suite string testing
################################################################## ]]]
### Account setup [[[
######################################################################
# Enable shadow passwords
d-i passwd/shadow boolean true
# Allow root login
# If skipping creation of a root account, normal user account will be able to use sudo.
d-i passwd/root-login boolean true
# Root password, either in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# …or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# To create a normal user account.
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
# Normal user's password, either in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# …or encrypted with {MD5, SHA512, …) hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
# Create the first user with the specified UID instead of the default.
#d-i passwd/user-uid string 1010
# The user account will be added to some standard initial groups. To
# override that, use this.
#d-i passwd/user-default-groups string audio cdrom video
################################################################## ]]]
### Clock and time zone setup [[[
######################################################################
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
### Disk Partitioning/Boot loader [[[
######################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away…
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
#d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Continue installation without /boot partition ?
# Useful for some expert recipe
d-i partman-auto-lvm/no_boot boolean false
# Name of the volume group for the new system
d-i partman-auto-lvm/new_vg_name string sys
# LVM partition
# This recipe need almost 30Gb free space.
d-i partman-auto/expert_recipe string \
boot-root :: \
300 200000 500 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_srv } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ srv } \
mountpoint{ /srv } \
. \
512 2000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
# Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
# This makes partman automatically partition without confirmation.
# that you told it what to do using one of the methods above.
d-i partman-md/confirm boolean true
d-i partman/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
################################################################## ]]]
### Base system installation [[[
######################################################################
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
d-i base-installer/kernel/image select linux-image-amd64
# Drivers to include in the initrd
# - most: include all available drivers
# - dep: only include drivers needed for this system
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
### Apt setup [[[
######################################################################
# Choose, if you want to scan additional installation media
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
# You can choose to install non-free firmware.
#d-i apt-setup/non-free-firmware boolean true
# You can choose to install non-free and contrib software.
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Use a network mirror
# Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
# Select which update services to use; define the mirrors to be used.
d-i apt-setup/services-select multiselect security
################################################################## ]]]
### Package selection [[[
######################################################################
# Choose packages
tasksel tasksel/first multiselect ssh-server
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
# - tftp-hpa: to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
popularity-contest popularity-contest/participate boolean true
################################################################## ]]]
### Boot loader installation [[[
######################################################################
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true
# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default
# Force GRUB installation to the EFI removable media path?
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
### Finishing up the installation [[[
######################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
################################################################## ]]]
### Advanced options [[[
######################################################################
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
# 1. Umount and remove temp lvm lv_free
# 2. Allow root connections with SSH
# 3. Download and run a post.bookworm.sh script
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bookworm.sh
################################################################## ]]]

View File

@ -1,429 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BookwormCinnamon
# menu label Debian Bookworm ^Cinnamon + UEFI WITH PRESEED
# kernel installer/debian/bookworm/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bookworm/amd64/preseed.cinnamon.uefi.cfg
################################################################## ]]]
### Localization [[[
######################################################################
## Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
# Choose the language to be used for the installation process. The selected
# language will also be the default language for the installed system.
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select fr
################################################################## ]]]
### Network configuration [[[
######################################################################
# Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# If you want to completely disable firmware lookup (i.e. not use firmware
# files or packages that might be available on installation images):
#d-i hw-detect/firmware-lookup string never
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
### Network console [[[
######################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
### Mirror settings [[[
######################################################################
# Mirror
# Usually, deb.debian.org is a good choice
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
# Suite to install.
d-i mirror/suite string
# Suite to use for loading installer components (optional).
#d-i mirror/udeb/suite string testing
################################################################## ]]]
### Account setup [[[
######################################################################
# Enable shadow passwords
d-i passwd/shadow boolean true
# Allow root login
# If skipping creation of a root account, normal user account will be able to use sudo.
d-i passwd/root-login boolean true
# Root password, either in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# …or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# To create a normal user account.
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
# Normal user's password, either in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# …or encrypted with {MD5, SHA512, …) hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
# Create the first user with the specified UID instead of the default.
#d-i passwd/user-uid string 1010
# The user account will be added to some standard initial groups. To
# override that, use this.
#d-i passwd/user-default-groups string audio cdrom video
################################################################## ]]]
### Clock and time zone setup [[[
######################################################################
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
### Disk Partitioning/Boot loader [[[
######################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away…
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
#d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Continue installation without /boot partition ?
# Useful for some expert recipe
d-i partman-auto-lvm/no_boot boolean false
# Keep that one set to true so we end up with a UEFI enabled
# system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
# Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
# Name of the volume group for the new system
d-i partman-auto-lvm/new_vg_name string sys
# LVM partition
# This recipe need almost 30Gb free space.
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
400 200000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 20000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
# Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
# This makes partman automatically partition without confirmation.
# that you told it what to do using one of the methods above.
d-i partman-md/confirm boolean true
d-i partman/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
################################################################## ]]]
### Base system installation [[[
######################################################################
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
d-i base-installer/kernel/image select linux-image-amd64
# Drivers to include in the initrd
# - most: include all available drivers
# - dep: only include drivers needed for this system
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
### Apt setup [[[
######################################################################
# Choose, if you want to scan additional installation media
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
# You can choose to install non-free firmware.
#d-i apt-setup/non-free-firmware boolean true
# You can choose to install non-free and contrib software.
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Use a network mirror
# Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
# Select which update services to use; define the mirrors to be used.
d-i apt-setup/services-select multiselect security
################################################################## ]]]
### Package selection [[[
######################################################################
# Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
# - tftp-hpa: to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
popularity-contest popularity-contest/participate boolean true
################################################################## ]]]
### Boot loader installation [[[
######################################################################
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true
# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default
# Force GRUB installation to the EFI removable media path?
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
### Finishing up the installation [[[
######################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
################################################################## ]]]
### Advanced options [[[
######################################################################
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
# 1. Umount and remove temp lvm lv_free
# 2. Allow root connections with SSH
# 3. Download and run a post.bookworm.sh script
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bookworm.sh
################################################################## ]]]

View File

@ -1,400 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
### Howto use [[[
######################################################################
# Inspired from https://www.debian.org/releases/bookworm/example-preseed.txt
# For more details about all parameters, see projects under Debian installer:
# https://salsa.debian.org/installer-team
## With a PXE boot:
#label bookworm
# menu label Debian Bookworm amd64 for compute node PRESEED
# kernel installer/debian/bookworm/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bookworm/amd64/preseed.compute.cfg
################################################################## ]]]
### Localization [[[
######################################################################
## Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
# Choose the language to be used for the installation process. The selected
# language will also be the default language for the installed system.
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
### Network configuration [[[
######################################################################
# Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# If you want to completely disable firmware lookup (i.e. not use firmware
# files or packages that might be available on installation images):
#d-i hw-detect/firmware-lookup string never
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
### Network console [[[
######################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
### Mirror settings [[[
######################################################################
# Mirror
# Usually, deb.debian.org is a good choice
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
# Suite to install.
d-i mirror/suite string
# Suite to use for loading installer components (optional).
#d-i mirror/udeb/suite string testing
################################################################## ]]]
### Account setup [[[
######################################################################
# Enable shadow passwords
d-i passwd/shadow boolean true
# Allow root login
# If skipping creation of a root account, normal user account will be able to use sudo.
d-i passwd/root-login boolean true
# Root password, either in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# …or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# To create a normal user account.
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
# Normal user's password, either in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# …or encrypted with {MD5, SHA512, …) hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
# Create the first user with the specified UID instead of the default.
#d-i passwd/user-uid string 1010
# The user account will be added to some standard initial groups. To
# override that, use this.
#d-i passwd/user-default-groups string audio cdrom video
################################################################## ]]]
### Clock and time zone setup [[[
######################################################################
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
### Disk Partitioning/Boot loader [[[
######################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away…
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
#d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Continue installation without /boot partition ?
# Useful for some expert recipe
d-i partman-auto-lvm/no_boot boolean false
# Name of the volume group for the new system
d-i partman-auto-lvm/new_vg_name string sys
# LVM partition
# see https://www.bishnet.net/tim/blog/2015/01/29/understanding-partman-autoexpert_recipe/ for a description of partman's algorithm
d-i partman-auto/expert_recipe string \
boot-root :: \
400 2000000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
148480 1000000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
16384 90000 20480 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
10240 80000 40960 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4096 70000 8192 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
40960 60000 81920 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
3072 50000 15360 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
25% 30000 32768 linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_workl } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ DataDisk } \
mountpoint{ /mnt/workl } \
.
# Put all free space in a DataDisk logical volume
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
# This makes partman automatically partition without confirmation.
# that you told it what to do using one of the methods above.
d-i partman-md/confirm boolean true
d-i partman/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
################################################################## ]]]
### Base system installation [[[
######################################################################
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
d-i base-installer/kernel/image select linux-image-amd64
# Drivers to include in the initrd
# - most: include all available drivers
# - dep: only include drivers needed for this system
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
### Apt setup [[[
######################################################################
# Choose, if you want to scan additional installation media
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
# You can choose to install non-free firmware.
#d-i apt-setup/non-free-firmware boolean true
# You can choose to install non-free and contrib software.
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Use a network mirror
# Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
# Select which update services to use; define the mirrors to be used.
d-i apt-setup/services-select multiselect security
################################################################## ]]]
### Package selection [[[
######################################################################
# Choose packages
tasksel tasksel/first multiselect ssh-server
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
# - tftp-hpa: to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
popularity-contest popularity-contest/participate boolean true
################################################################## ]]]
### Boot loader installation [[[
######################################################################
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true
# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default
# Force GRUB installation to the EFI removable media path?
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
### Finishing up the installation [[[
######################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
################################################################## ]]]
### Advanced options [[[
######################################################################
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
# 1. Umount and remove temp lvm lv_free
# 2. Allow root connections with SSH
# 3. Download and run a post.bookworm.sh script
d-i preseed/late_command string in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bookworm.sh
################################################################## ]]]

View File

@ -1,429 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
### Howto use [[[
######################################################################
## With a PXE boot:
#label BookwormGnome
# menu label Debian Bookworm ^Gnome + UEFI WITH PRESEED
# kernel installer/debian/bookworm/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bookworm/amd64/preseed.gnome.uefi.cfg
################################################################## ]]]
### Localization [[[
######################################################################
## Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
# Choose the language to be used for the installation process. The selected
# language will also be the default language for the installed system.
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select fr
################################################################## ]]]
### Network configuration [[[
######################################################################
# Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# If you want to completely disable firmware lookup (i.e. not use firmware
# files or packages that might be available on installation images):
#d-i hw-detect/firmware-lookup string never
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
### Network console [[[
######################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
### Mirror settings [[[
######################################################################
# Mirror
# Usually, deb.debian.org is a good choice
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
# Suite to install.
d-i mirror/suite string
# Suite to use for loading installer components (optional).
#d-i mirror/udeb/suite string testing
################################################################## ]]]
### Account setup [[[
######################################################################
# Enable shadow passwords
d-i passwd/shadow boolean true
# Allow root login
# If skipping creation of a root account, normal user account will be able to use sudo.
d-i passwd/root-login boolean true
# Root password, either in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# …or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# To create a normal user account.
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
# Normal user's password, either in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# …or encrypted with {MD5, SHA512, …) hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
# Create the first user with the specified UID instead of the default.
#d-i passwd/user-uid string 1010
# The user account will be added to some standard initial groups. To
# override that, use this.
#d-i passwd/user-default-groups string audio cdrom video
################################################################## ]]]
### Clock and time zone setup [[[
######################################################################
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
### Disk Partitioning/Boot loader [[[
######################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away…
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
#d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Continue installation without /boot partition ?
# Useful for some expert recipe
d-i partman-auto-lvm/no_boot boolean false
# Keep that one set to true so we end up with a UEFI enabled
# system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
# Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
# Name of the volume group for the new system
d-i partman-auto-lvm/new_vg_name string sys
# LVM partition
# This recipe need almost 30Gb free space.
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
400 200000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 20000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
# Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
# This makes partman automatically partition without confirmation.
# that you told it what to do using one of the methods above.
d-i partman-md/confirm boolean true
d-i partman/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
################################################################## ]]]
### Base system installation [[[
######################################################################
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
d-i base-installer/kernel/image select linux-image-amd64
# Drivers to include in the initrd
# - most: include all available drivers
# - dep: only include drivers needed for this system
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
### Apt setup [[[
######################################################################
# Choose, if you want to scan additional installation media
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
# You can choose to install non-free firmware.
#d-i apt-setup/non-free-firmware boolean true
# You can choose to install non-free and contrib software.
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Use a network mirror
# Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
# Select which update services to use; define the mirrors to be used.
d-i apt-setup/services-select multiselect security
################################################################## ]]]
### Package selection [[[
######################################################################
# Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
# - tftp-hpa: to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
popularity-contest popularity-contest/participate boolean true
################################################################## ]]]
### Boot loader installation [[[
######################################################################
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true
# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default
# Force GRUB installation to the EFI removable media path?
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
### Finishing up the installation [[[
######################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
################################################################## ]]]
### Advanced options [[[
######################################################################
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
# 1. Umount and remove temp lvm lv_free
# 2. Allow root connections with SSH
# 3. Download and run a post.bookworm.sh script
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bookworm.sh
################################################################## ]]]

View File

@ -1,423 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
### Howto use [[[
######################################################################
# Inspired from https://www.debian.org/releases/bookworm/example-preseed.txt
# For more details about all parameters, see projects under Debian installer:
# https://salsa.debian.org/installer-team
## With a PXE boot:
#label bookworm_without_partitioning
# menu label Debian GNU/Linux Bookworm 64 bits Preseed W^ITHOUT Partitioning
# kernel installer/debian/bookworm/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bookworm/amd64/preseed.without.partitioning.cfg
################################################################## ]]]
### Localization [[[
######################################################################
## Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
# Choose the language to be used for the installation process. The selected
# language will also be the default language for the installed system.
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select fr
################################################################## ]]]
### Network configuration [[[
######################################################################
# Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# If you want to completely disable firmware lookup (i.e. not use firmware
# files or packages that might be available on installation images):
#d-i hw-detect/firmware-lookup string never
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
### Network console [[[
######################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
### Mirror settings [[[
######################################################################
# Mirror
# Usually, deb.debian.org is a good choice
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
# Suite to install.
d-i mirror/suite string
# Suite to use for loading installer components (optional).
#d-i mirror/udeb/suite string testing
################################################################## ]]]
### Account setup [[[
######################################################################
# Enable shadow passwords
d-i passwd/shadow boolean true
# Allow root login
# If skipping creation of a root account, normal user account will be able to use sudo.
d-i passwd/root-login boolean true
# Root password, either in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# …or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Skip creation of a normal user account
d-i passwd/make-user boolean false
# To create a normal user account.
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
# Normal user's password, either in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# …or encrypted with {MD5, SHA512, …) hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
# Create the first user with the specified UID instead of the default.
#d-i passwd/user-uid string 1010
# The user account will be added to some standard initial groups. To
# override that, use this.
#d-i passwd/user-default-groups string audio cdrom video
################################################################## ]]]
### Clock and time zone setup [[[
######################################################################
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string Europe/Paris
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
# NTP server to use. The default is almost always fine here.
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
### Disk Partitioning/Boot loader [[[
######################################################################
## Partioning is disable and will require manual intervention from an admin !
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
#d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
#d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
## - regular: use the usual partition types for the architecture
## - lvm: use LVM to partition the disk
## - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string lvm
## You can define the amount of space that will be used for the LVM volume
## group. It can either be a size with its unit (eg. 20 GB), a percentage of
## free space or the 'max' keyword.
#d-i partman-auto-lvm/guided_size string max
## If one of the disks that are going to be automatically partitioned
## contains an old LVM configuration, the user will normally receive a
## warning. This can be preseeded away…
#d-i partman-lvm/device_remove_lvm boolean true
## The same applies to pre-existing software RAID array:
##d-i partman-md/device_remove_md boolean true
## And the same goes for the confirmation to write the lvm partitions.
#d-i partman-lvm/confirm boolean true
#d-i partman-lvm/confirm_nooverwrite boolean true
## Continue installation without /boot partition ?
## Useful for some expert recipe
#d-i partman-auto-lvm/no_boot boolean false
## Name of the volume group for the new system
#d-i partman-auto-lvm/new_vg_name string sys
## LVM partition
## This recipe need almost 30Gb free space.
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#300 200000 500 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#label{ boot } \
#mountpoint{ /boot } \
#. \
#16000 100000 -1 ext4 \
#$defaultignore{ } \
#$primary{ } \
#method{ lvm } \
#vg_name{ sys } \
#. \
#1000 8000 2000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_root } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#4000 7000 10000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_usr } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#options/nodev{ nodev } \
#label{ usr } \
#mountpoint{ /usr } \
#. \
#4000 6000 8000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_var } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#options/nodev{ nodev } \
#label{ var } \
#mountpoint{ /var } \
#. \
#1000 5000 2000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_tmp } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#options/nodev{ nodev } \
#options/nosuid{ nosuid } \
#label{ tmp } \
#mountpoint{ /tmp } \
#. \
#2000 4000 3000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_home } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#options/nodev{ nodev } \
#label{ home } \
#mountpoint{ /home } \
#. \
#512 3000 2000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_srv } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#options/nodev{ nodev } \
#label{ srv } \
#mountpoint{ /srv } \
#. \
#512 2000 4000 ext4 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_opt } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ opt } \
#mountpoint{ /opt } \
#. \
#512 1000 100% linux-swap \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_swap } \
#method{ swap } format{ } \
#. \
#100 100 -1 ext3 \
#$lvmok{ } \
#in_vg{ sys } lv_name{ lv_free } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#label{ free } \
#mountpoint{ /mnt/free } \
#.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
##d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
#d-i partman-basicfilesystems/no_mount_point boolean false
## This makes partman automatically partition without confirmation.
## that you told it what to do using one of the methods above.
#d-i partman-md/confirm boolean true
#d-i partman/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
################################################################## ]]]
### Base system installation [[[
######################################################################
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
d-i base-installer/kernel/image select linux-image-amd64
# Drivers to include in the initrd
# - most: include all available drivers
# - dep: only include drivers needed for this system
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
### Apt setup [[[
######################################################################
# Choose, if you want to scan additional installation media
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
# You can choose to install non-free firmware.
#d-i apt-setup/non-free-firmware boolean true
# You can choose to install non-free and contrib software.
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Use a network mirror
# Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
# Select which update services to use; define the mirrors to be used.
d-i apt-setup/services-select multiselect security
################################################################## ]]]
### Package selection [[[
######################################################################
# Choose packages
tasksel tasksel/first multiselect ssh-server
# Or choose to not get the tasksel dialog displayed at all (and don't install
# any packages):
#d-i pkgsel/run_tasksel boolean false
# Individual additional packages to install
# - tftp-hpa: to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
popularity-contest popularity-contest/participate boolean true
################################################################## ]]]
### Boot loader installation [[[
######################################################################
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true
## As partioning is disable, it's better to manually choose the disk where Grub
## will be installed
# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
#d-i grub-installer/bootdev string default
# Force GRUB installation to the EFI removable media path?
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
### Finishing up the installation [[[
######################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
################################################################## ]]]
### Advanced options [[[
######################################################################
# This command is run just before the install finishes, but when there is
# still a usable /target directory. You can chroot to /target and use it
# directly, or use the apt-install and in-target commands to easily install
# packages and run commands in the target system.
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
# 1. Allow root connections with SSH
# 2. Download and run a post.bookworm.sh script
d-i preseed/late_command string in-target in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bookworm.sh
################################################################## ]]]

View File

@ -1,381 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label bullseye
# menu label Debian GNU/Linux ^Bullseye 64 bits WITH PRESEED
# kernel installer/debian/bullseye/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bullseye/amd64/preseed.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
## Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string sys
### Specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
### This recipe need almost 30Gb free space.
d-i partman-auto/expert_recipe string \
boot-root :: \
300 200000 500 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_srv } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ srv } \
mountpoint{ /srv } \
. \
512 2000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bullseye.sh
################################################################## ]]]

View File

@ -1,392 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BullseyeCinnamon
# menu label Debian Bullseye ^Cinnamon + UEFI WITH PRESEED
# kernel installer/debian/bullseye/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bullseye/amd64/preseed.cinnamon.uefi.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
## Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string sys
### Specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
### This recipe need almost 30Gb free space.
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
400 200000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bullseye.sh
################################################################## ]]]

View File

@ -1,384 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BullseyeCinnamonCrypto
# menu label Debian Bullseye ^Cinnamon + UEFI + Cipher WITH PRESEED
# kernel installer/debian/bullseye/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bullseye/amd64/preseed.cinnamon.uefi.cipher.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
## Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string crypto
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string crypt
### Specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string \
root-encrypted :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
400 200000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
$primary{ } \
lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/crypt/lv_free ; \
lvremove -f /dev/crypt/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bullseye.sh
################################################################## ]]]

View File

@ -1,359 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label bullseye
# menu label Debian Bullseye amd64 for compute node PRESEED
# kernel installer/debian/bullseye/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bullseye/amd64/preseed.compute.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
## Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string sys
### Specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
# see https://www.bishnet.net/tim/blog/2015/01/29/understanding-partman-autoexpert_recipe/ for a description of partman's algorithm
d-i partman-auto/expert_recipe string \
boot-root :: \
400 2000000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
148480 1000000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
16384 90000 20480 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
10240 80000 40960 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4096 70000 8192 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
40960 60000 81920 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
3072 50000 15360 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
25% 30000 32768 linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_workl } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ DataDisk } \
mountpoint{ /mnt/workl } \
.
## Put all free space in a DataDisk logical volume
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bullseye.sh
################################################################## ]]]

View File

@ -1,392 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BullseyeGnome
# menu label Debian Bullseye ^Gnome + UEFI WITH PRESEED
# kernel installer/debian/bullseye/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bullseye/amd64/preseed.gnome.uefi.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
## Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string sys
### Specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
### This recipe need almost 30Gb free space.
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
400 200000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bullseye.sh
################################################################## ]]]

View File

@ -1,385 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BullseyeGnomeCrypto
# menu label Debian Bullseye ^Gnome + UEFI + Cipher WITH PRESEED
# kernel installer/debian/bullseye/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/bullseye/amd64/preseed.gnome.uefi.cipher.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
## Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string crypto
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string crypt
### Specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string \
root-encrypted :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
400 200000 800 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
$primary{ } \
lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/crypt/lv_free ; \
lvremove -f /dev/crypt/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.bullseye.sh
################################################################## ]]]

View File

@ -6,8 +6,7 @@
#label jessie #label jessie
# menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED # menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED
# kernel installer/debian/jessie/amd64/linux # kernel installer/debian/jessie/amd64/linux
# IPAPPEND 2 # APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/installer/debian/jessie/amd64/preseed.cfg IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/jessie/amd64/preseed.cfg
@ -24,7 +23,6 @@ d-i debian-installer/language string en
d-i debian-installer/country string FR d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8 d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8 d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9 d-i debian-installer/keymap string fr-latin9
## Choose language ## Choose language
@ -50,8 +48,8 @@ d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60 d-i netcfg/dhcpv6_timeout string 60
## Network Configuration ## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_hostname string myhostname
d-i netcfg/get_domain string unassigned-domain d-i netcfg/get_domain string mydomain.fr
# If non-free firmware is needed for the network or other hardware, you can # If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or # configure the installer to always try to load it, without prompting. Or
@ -79,10 +77,10 @@ d-i hw-detect/load_firmware boolean true
## Mirror ## Mirror
d-i mirror/country string FR d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/ d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org d-i mirror/http/mirror string ftp.fr.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -134,7 +132,7 @@ d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
# If the system has only one disk the installer will default to using it. # If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given # Otherwise, the device name must be given
d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1 d-i partman-auto/disk string /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -158,7 +156,35 @@ d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-lvm/confirm_nooverwrite boolean true
# Choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe
# Regular partition
# limit:: <min size> <priority> <max size> ## In MB !
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#40 50 100 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#mountpoint{ /boot } \
#. \
#500 10000 10000 ext4 \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#64 512 300% linux-swap \
#method{ swap } format{ } \
#.
# LVM partition # LVM partition
# The device for physical volume must be listed in partman-auto/disk
# This recipe need almost 30Gb free space it's add all <min size> # This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because # sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ... # all logical volume are on sda2 ...
@ -171,7 +197,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 -1 ext4 \ 16000 100000 10000000000000000 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -244,7 +270,7 @@ d-i partman-auto/expert_recipe string \
in_vg{ sys } lv_name{ lv_swap } \ in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \ method{ swap } format{ } \
. \ . \
100 100 -1 ext4 \ 100 100 100000000000 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -269,7 +295,7 @@ d-i partman/confirm_nooverwrite boolean true
## Post install APT setup ## Post install APT setup
d-i apt-setup/uri_type select d-i d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/ d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false d-i apt-setup/security-updates boolean false
@ -299,7 +325,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa d-i pkgsel/include string tmux puppet zsh tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade
@ -353,11 +379,9 @@ d-i cdrom-detect/eject boolean false
#d-i debian-installer/exit/poweroff boolean true #d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \ #in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \ d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \ in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.jessie.sh in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -6,8 +6,7 @@
#label jessie #label jessie
# menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED # menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED
# kernel installer/debian/jessie/amd64/linux # kernel installer/debian/jessie/amd64/linux
# IPAPPEND 2 # APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/installer/debian/jessie/amd64/preseed.cfg IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/jessie/amd64/preseed.cfg
@ -24,7 +23,6 @@ d-i debian-installer/language string en
d-i debian-installer/country string FR d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8 d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8 d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9 d-i debian-installer/keymap string fr-latin9
## Choose language ## Choose language
@ -50,8 +48,8 @@ d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60 d-i netcfg/dhcpv6_timeout string 60
## Network Configuration ## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_hostname string myhostname
d-i netcfg/get_domain string unassigned-domain d-i netcfg/get_domain string mydomain.fr
# If non-free firmware is needed for the network or other hardware, you can # If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or # configure the installer to always try to load it, without prompting. Or
@ -79,10 +77,10 @@ d-i hw-detect/load_firmware boolean true
## Mirror ## Mirror
d-i mirror/country string FR d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/ d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org d-i mirror/http/mirror string ftp.fr.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -134,7 +132,7 @@ d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
# If the system has only one disk the installer will default to using it. # If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given # Otherwise, the device name must be given
d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1 d-i partman-auto/disk string /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -158,7 +156,35 @@ d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-lvm/confirm_nooverwrite boolean true
# Choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe
# Regular partition
# limit:: <min size> <priority> <max size> ## In MB !
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#40 50 100 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#mountpoint{ /boot } \
#. \
#500 10000 10000 ext4 \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#64 512 300% linux-swap \
#method{ swap } format{ } \
#.
# LVM partition # LVM partition
# The device for physical volume must be listed in partman-auto/disk
# This recipe need almost 30Gb free space it's add all <min size> # This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because # sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ... # all logical volume are on sda2 ...
@ -171,7 +197,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 -1 ext4 \ 16000 100000 10000000000000000 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -235,7 +261,7 @@ d-i partman-auto/expert_recipe string \
in_vg{ sys } lv_name{ lv_swap } \ in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \ method{ swap } format{ } \
. \ . \
100 100 -1 ext4 \ 100 100 100000000000 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -260,7 +286,7 @@ d-i partman/confirm_nooverwrite boolean true
## Post install APT setup ## Post install APT setup
d-i apt-setup/uri_type select d-i d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/ d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false d-i apt-setup/security-updates boolean false
@ -290,7 +316,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa d-i pkgsel/include string tmux puppet zsh tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade
@ -344,11 +370,9 @@ d-i cdrom-detect/eject boolean false
#d-i debian-installer/exit/poweroff boolean true #d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \ #in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \ d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \ in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.jessie.sh in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -6,8 +6,7 @@
#label jessie #label jessie
# menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED # menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED
# kernel installer/debian/jessie/amd64/linux # kernel installer/debian/jessie/amd64/linux
# IPAPPEND 2 # APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/installer/debian/jessie/amd64/preseed.cfg IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/jessie/amd64/preseed.cfg
@ -24,7 +23,6 @@ d-i debian-installer/language string en
d-i debian-installer/country string FR d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8 d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8 d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9 d-i debian-installer/keymap string fr-latin9
## Choose language ## Choose language
@ -50,8 +48,8 @@ d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60 d-i netcfg/dhcpv6_timeout string 60
## Network Configuration ## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_hostname string myhostname
d-i netcfg/get_domain string unassigned-domain d-i netcfg/get_domain string mydomain.fr
# If non-free firmware is needed for the network or other hardware, you can # If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or # configure the installer to always try to load it, without prompting. Or
@ -79,10 +77,10 @@ d-i hw-detect/load_firmware boolean true
## Mirror ## Mirror
d-i mirror/country string FR d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/ d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org d-i mirror/http/mirror string ftp.fr.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -134,7 +132,7 @@ d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
# If the system has only one disk the installer will default to using it. # If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given # Otherwise, the device name must be given
d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1 d-i partman-auto/disk string /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -158,7 +156,35 @@ d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-lvm/confirm_nooverwrite boolean true
# Choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe
# Regular partition
# limit:: <min size> <priority> <max size> ## In MB !
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#40 50 100 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#mountpoint{ /boot } \
#. \
#500 10000 10000 ext4 \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#64 512 300% linux-swap \
#method{ swap } format{ } \
#.
# LVM partition # LVM partition
# The device for physical volume must be listed in partman-auto/disk
# This recipe need almost 30Gb free space it's add all <min size> # This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because # sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ... # all logical volume are on sda2 ...
@ -171,7 +197,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 -1 ext4 \ 16000 100000 10000000000000000 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -235,7 +261,7 @@ d-i partman-auto/expert_recipe string \
in_vg{ sys } lv_name{ lv_swap } \ in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \ method{ swap } format{ } \
. \ . \
100 100 -1 ext4 \ 100 100 100000000000 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -260,7 +286,7 @@ d-i partman/confirm_nooverwrite boolean true
## Post install APT setup ## Post install APT setup
d-i apt-setup/uri_type select d-i d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/ d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false d-i apt-setup/security-updates boolean false
@ -290,7 +316,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa d-i pkgsel/include string tmux puppet zsh tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade
@ -344,11 +370,9 @@ d-i cdrom-detect/eject boolean false
#d-i debian-installer/exit/poweroff boolean true #d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \ #in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \ d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \ in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.jessie.sh in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -6,8 +6,7 @@
#label jessie #label jessie
# menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED # menu label Debian GNU/Linux ^Jessie 64 bits WITH PRESEED
# kernel installer/debian/jessie/amd64/linux # kernel installer/debian/jessie/amd64/linux
# IPAPPEND 2 # APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/installer/debian/jessie/amd64/preseed.cfg IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/jessie/amd64/preseed.cfg
@ -24,7 +23,6 @@ d-i debian-installer/language string en
d-i debian-installer/country string FR d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8 d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8 d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9 d-i debian-installer/keymap string fr-latin9
## Choose language ## Choose language
@ -50,8 +48,8 @@ d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60 d-i netcfg/dhcpv6_timeout string 60
## Network Configuration ## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_hostname string myhostname
d-i netcfg/get_domain string unassigned-domain d-i netcfg/get_domain string mydomain.fr
# If non-free firmware is needed for the network or other hardware, you can # If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or # configure the installer to always try to load it, without prompting. Or
@ -79,10 +77,10 @@ d-i hw-detect/load_firmware boolean true
## Mirror ## Mirror
d-i mirror/country string FR d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/ d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org d-i mirror/http/mirror string ftp.fr.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -134,7 +132,7 @@ d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
# If the system has only one disk the installer will default to using it. # If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given # Otherwise, the device name must be given
d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1 d-i partman-auto/disk string /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -158,7 +156,35 @@ d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-lvm/confirm_nooverwrite boolean true
# Choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe
# Regular partition
# limit:: <min size> <priority> <max size> ## In MB !
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#40 50 100 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#mountpoint{ /boot } \
#. \
#500 10000 10000 ext4 \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#64 512 300% linux-swap \
#method{ swap } format{ } \
#.
# LVM partition # LVM partition
# The device for physical volume must be listed in partman-auto/disk
# This recipe need almost 30Gb free space it's add all <min size> # This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because # sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ... # all logical volume are on sda2 ...
@ -171,7 +197,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 -1 ext4 \ 16000 100000 10000000000000000 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -235,7 +261,7 @@ d-i partman-auto/expert_recipe string \
in_vg{ sys } lv_name{ lv_swap } \ in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \ method{ swap } format{ } \
. \ . \
100 100 -1 ext4 \ 100 100 100000000000 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -260,7 +286,7 @@ d-i partman/confirm_nooverwrite boolean true
## Post install APT setup ## Post install APT setup
d-i apt-setup/uri_type select d-i d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/ d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false d-i apt-setup/security-updates boolean false
@ -290,7 +316,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa d-i pkgsel/include string tmux puppet zsh tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade
@ -344,11 +370,9 @@ d-i cdrom-detect/eject boolean false
#d-i debian-installer/exit/poweroff boolean true #d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \ #in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \ d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \ in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.jessie.sh in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -1,380 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label buster
# menu label Debian GNU/Linux ^Buster 64 bits WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string sys
### From buster, need to specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
### This recipe need almost 30Gb free space.
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 400 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_srv } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ srv } \
mountpoint{ /srv } \
. \
512 2000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.buster.sh
################################################################## ]]]

View File

@ -1,353 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label buster
# menu label Debian GNU/Linux ^Buster 64 bits WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -1,388 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label buster
# menu label Debian Buster ^Cinnamon 64 bits WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg
d-i partman-auto-lvm/new_vg_name string sys
### From buster, need to specify the expected size
d-i partman-auto-lvm/guided_size string max
## LVM partition
### This recipe need almost 30Gb free space.
d-i partman-auto/expert_recipe string \
boot-root :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 400 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.buster.sh
################################################################## ]]]

View File

@ -1,383 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BusterCinnamonCrypto
# menu label Debian Buster ^Cinnamon + UEFI + Cipher WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cinnamon.uefi.cipher.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string crypto
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg
d-i partman-auto-lvm/new_vg_name string crypt
### From buster, need to specify the expected size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string \
root-encrypted :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 400 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
$primary{ } \
lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/crypt/lv_free ; \
lvremove -f /dev/crypt/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.buster.sh
################################################################## ]]]

View File

@ -1,344 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label buster
# menu label Debian GNU/Linux ^Buster 64 bits WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# recipe copied from https://git.ipr.univ-rennes.fr/cellinfo/tftpboot/src/master/preseed/debian/stretch/preseed_computenode.cfg
# <min_size_mb> <priority_in_mb> <max_size_in_mb>
# see https://www.bishnet.net/tim/blog/2015/01/29/understanding-partman-autoexpert_recipe/ for a description of partman's algorithm
d-i partman-auto/expert_recipe string \
boot-root :: \
200 2000000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
148480 1000000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
25600 90000 30720 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
10240 80000 20480 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4096 70000 8192 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
40960 60000 61440 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
3072 50000 15360 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
25% 30000 32768 linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_workl } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ DataDisk } \
mountpoint{ /mnt/workl } \
.
## Put all free space in a DataDisk logical volume
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -1,377 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label buster
# menu label Debian GNU/Linux ^Buster 64 bits WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Keep that one set to true so we end up with a UEFI enabled
# system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
# enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 538 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman-md/confirm boolean true
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -1,383 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label BusterGnomeCrypto
# menu label Debian Buster ^Gnome + UEFI + Cipher WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.gnome.uefi.cipher.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string crypto
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg
d-i partman-auto-lvm/new_vg_name string crypt
### From buster, need to specify the expected size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string \
root-encrypted :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 400 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
$primary{ } \
lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/crypt/lv_free ; \
lvremove -f /dev/crypt/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.buster.sh
################################################################## ]]]

View File

@ -1,353 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label buster
# menu label Debian GNU/Linux ^Buster 64 bits WITH PRESEED
# kernel installer/debian/buster/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/buster/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/buster/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard mate-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -1,363 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label stretch
# menu label Debian GNU/Linux ^Stretch 64 bits WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_srv } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ srv } \
mountpoint{ /srv } \
. \
512 2000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh

View File

@ -1,377 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label stretch
# menu label Debian GNU/Linux ^Stretch 64 bits WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Keep that one set to true so we end up with a UEFI enabled
# system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
# enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 538 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman-md/confirm boolean true
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh

View File

@ -1,377 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label stretch
# menu label Debian GNU/Linux ^Stretch 64 bits WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Keep that one set to true so we end up with a UEFI enabled
# system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
# enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
538 538 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman-md/confirm boolean true
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh

View File

@ -1,385 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label StretchGnomeCrypto
# menu label Debian Stretch ^Gnome + UEFI + Cipher WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.gnome.uefi.cipher.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string crypto
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg
d-i partman-auto-lvm/new_vg_name string crypt
### From buster, need to specify the expected size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string \
root-encrypted :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 400 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
$primary{ } \
lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } \
lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
## Otherwise it's the last partition which get all free space
## Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/crypt/lv_free ; \
lvremove -f /dev/crypt/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh
################################################################## ]]]

View File

@ -1,353 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label stretch
# menu label Debian GNU/Linux ^Stretch 64 bits WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard cinnamon-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh

View File

@ -1,344 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label stretch
# menu label Debian GNU/Linux ^Stretch 64 bits WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# recipe copied from https://git.ipr.univ-rennes.fr/cellinfo/tftpboot/src/master/preseed/debian/wheezy/preseed_cluster.cfg
# <min_size_mb> <priority_in_mb> <max_size_in_mb>
# see https://www.bishnet.net/tim/blog/2015/01/29/understanding-partman-autoexpert_recipe/ for a description of partman's algorithm
d-i partman-auto/expert_recipe string \
boot-root :: \
200 2000000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
148480 1000000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
25600 90000 30720 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
10240 80000 20480 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4096 70000 8192 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
40960 60000 61440 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
3072 50000 15360 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
25% 30000 32768 linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_workl } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ DataDisk } \
mountpoint{ /mnt/workl } \
.
## Put all free space in a DataDisk logical volume
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh

View File

@ -1,353 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label stretch
# menu label Debian GNU/Linux ^Stretch 64 bits WITH PRESEED
# kernel installer/debian/stretch/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/stretch/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/stretch/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard mate-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.stretch.sh

View File

@ -1,389 +0,0 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label sid
# menu label Debian GNU/Linux S^id 64 bits WITH PRESEED
# kernel installer/debian/sid/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/sid/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/sid/amd64/preseed.cfg
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Enable shadow passwords
d-i passwd/shadow boolean true
# Allow login as root?
d-i passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Volume Group/vg name
d-i partman-auto-lvm/new_vg_name string sys
# LVM partition
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 -1 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_srv } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ srv } \
mountpoint{ /srv } \
. \
512 2000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 -1 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Allow to not set a swap partition
#d-i partman-basicfilesystems/no_swap boolean false
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## Kernel
#####################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
# Additional repositories, local[0-9] available
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
# Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Since Debian Jessie, the d-i will ask to specify the device for Grub.
# Should use 'default', to use the default system disk
# Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
# Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sid.sh

View File

@ -1,334 +0,0 @@
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
#
## Howto use [[[
######################################################################
## With a PXE boot:
#label SidCrypto
# menu label Debian ^Sid amd64 with UEFI, LUKS and BTRFS
# kernel installer/debian/sid/amd64/linux
# IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/sid/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/sid/amd64/preseed.uefi.luks.btrfs.cfg
################################################################## ]]]
## Localization [[[
######################################################################
## Install Time
### Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
## The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
################################################################## ]]]
## Network configuration [[[
######################################################################
## Auto-configure networking
d-i netcfg/use_autoconfig boolean true
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
## To set a different link detection timeout (default is 3 seconds).
## Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
d-i netcfg/link_wait_timeout string 3
## If you have a slow dhcp server and the installer times out waiting for
## it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 1
## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
## If non-free firmware is needed for the network or other hardware, you can
## configure the installer to always try to load it, without prompting. Or
## change to false to disable asking.
d-i hw-detect/load_firmware boolean true
################################################################## ]]]
## Remote install (Manual) [[[
######################################################################
## Use the following settings if you wish to make use of the network-console
## component for remote installation over SSH. This only makes sense if you
## intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
################################################################## ]]]
## Mirror settings [[[
######################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string sid
################################################################## ]]]
## Account [[[
######################################################################
## Enable shadow passwords
d-i passwd/shadow boolean true
## Allow login as root?
d-i passwd/root-login boolean true
## Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
## ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
## Create a normal user account now?
d-i passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
#d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
################################################################## ]]]
## Clock and time zone setup [[[
######################################################################
## Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
################################################################## ]]]
## Disk Partitioning/Boot loader [[[
######################################################################
## If the system has only one disk the installer will default to using it.
## Otherwise, the device name must be given
d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
## Specify the method to use
### - regular: use the usual partition types for the architecture
### - lvm: use LVM to partition the disk
### - crypto: use LVM within an encrypted partition
d-i partman-auto/method string crypto
## It's not ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
## Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
## Remove old RAID configuration
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
## Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
## Keep that one set to true so we end up with a UEFI enabled
## system. If set to false, /var/lib/partman/uefi_ignore will be touched
d-i partman-efi/non_efi_system boolean true
## Enforce usage of GPT - a must have to use EFI!
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
## Volume Group/vg
d-i partman-auto-lvm/new_vg_name string crypt
### From buster, need to specify the expected size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string \
root-encrypted :: \
538 300000 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 400 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
16000 100000 80000 btrfs \
$lvmok{ } lv_name{ lv_root } \
in_vg { crypt } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ btrfs } \
mountpoint{ / } \
. \
50% 2000 75% linux-swap \
$lvmok{ } lv_name{ lv_swap } \
in_vg { crypt } \
$primary{ } \
method{ swap } format{ } \
. \
100 100 -1 ext3 \
$lvmok{ } lv_name{ lv_free } \
in_vg { crypt } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /mnt/free } \
.
## Return to menu if no mount point is assigned to a filesystem
d-i partman-basicfilesystems/no_mount_point boolean false
## Automatically partition without confirmation
d-i partman/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
################################################################## ]]]
## Kernel [[[
######################################################################
## Kernel to install
d-i base-installer/kernel/image select linux-image-amd64
## Drivers to include in the initrd
d-i base-installer/initramfs-tools/driver-policy select most
################################################################## ]]]
## APT configuration // Package selection [[[
######################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/services-select multiselect security
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/enable-source-repositories boolean true
## Ensure to use a network mirror
### Set to false for an offline installation
d-i apt-setup/use_mirror boolean true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard
## Individual additional packages to install
### tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tftp-hpa
## Whether to upgrade packages after debootstrap.
### Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
## Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
## For CD/DVD case
### Don't scan for additional CD/DVD
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-double boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
################################################################## ]]]
## Boot loader [[[
######################################################################
## Grub is the default boot loader (for x86). If you want lilo installed
## instead, uncomment this:
#d-i grub-installer/skip boolean true
## To also skip installing lilo, and install no bootloader, uncomment this too:
#d-i lilo-installer/skip boolean true
## This is fairly safe to set, it makes grub install automatically to the MBR
## if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
## This one makes grub-installer install to the MBR if it also finds some other
## OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
## Since Debian Jessie, the d-i will ask to specify the device for Grub.
## Should use 'default', to use the default system disk
### Fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
d-i grub-installer/bootdev string default
## Don't force GRUB installation to the EFI removable media path
d-i grub-installer/force-efi-extra-removable boolean false
################################################################## ]]]
## Finishing up the installation [[[
######################################################################
## Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
## This will prevent the installer from ejecting the CD during the reboot,
## which is useful in some situations.
d-i cdrom-detect/eject boolean false
## This is how to make the installer shutdown when finished, but not
## reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
## This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
## Execute some last commands
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target umount /dev/crypt/lv_free ; \
lvremove -f /dev/crypt/lv_free ; \
wget -O /tmp/part.btrfs.sh "https://git.101010.fr/gardouille-dotfiles/scripts/raw/master/debian/part.btrfs.sh" ; \
chmod +x /tmp/part.btrfs.sh && /tmp/part.btrfs.sh ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sid.sh
################################################################## ]]]

View File

@ -6,10 +6,9 @@
#label wheezy #label wheezy
# menu label Debian GNU/Linux Wheezy 64 bits WITH ^PRESEED # menu label Debian GNU/Linux Wheezy 64 bits WITH ^PRESEED
# kernel installer/debian/wheezy/amd64/linux # kernel installer/debian/wheezy/amd64/linux
# IPAPPEND 2 # APPEND vga=normal initrd=installer/debian/wheezy/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/installer/debian/wheezy/amd64/preseed.cfg IPAPPEND 2
# APPEND vga=normal initrd=installer/debian/wheezy/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.203.27/installer/debian/wheezy/amd64/preseed.cfg
## Keep this file just for memory
#################################################################### ####################################################################
# Localization # Localization
@ -24,7 +23,6 @@ d-i debian-installer/language string en
d-i debian-installer/country string FR d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8 d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8 d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i localechooser/supported-locales multiselect fr_FR.UTF-8
d-i debian-installer/keymap string fr-latin9 d-i debian-installer/keymap string fr-latin9
## Choose language ## Choose language
@ -50,8 +48,8 @@ d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60 d-i netcfg/dhcpv6_timeout string 60
## Network Configuration ## Network Configuration
d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_hostname string myhostname
d-i netcfg/get_domain string unassigned-domain d-i netcfg/get_domain string mydomain.fr
# If non-free firmware is needed for the network or other hardware, you can # If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or # configure the installer to always try to load it, without prompting. Or
@ -79,10 +77,10 @@ d-i hw-detect/load_firmware boolean true
## Mirror ## Mirror
d-i mirror/country string FR d-i mirror/country string FR
d-i mirror/http/hostname string deb.debian.org d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/ d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string d-i mirror/http/proxy string
d-i mirror/http/mirror string deb.debian.org d-i mirror/http/mirror string ftp.fr.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -134,7 +132,7 @@ d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
# If the system has only one disk the installer will default to using it. # If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given # Otherwise, the device name must be given
d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1 d-i partman-auto/disk string /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -158,7 +156,35 @@ d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-lvm/confirm_nooverwrite boolean true
# Choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe
# Regular partition
# limit:: <min size> <priority> <max size> ## In MB !
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#40 50 100 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#mountpoint{ /boot } \
#. \
#500 10000 10000 ext4 \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#64 512 300% linux-swap \
#method{ swap } format{ } \
#.
# LVM partition # LVM partition
# The device for physical volume must be listed in partman-auto/disk
# This recipe need almost 30Gb free space it's add all <min size> # This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because # sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ... # all logical volume are on sda2 ...
@ -171,7 +197,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 -1 ext4 \ 16000 100000 10000000000000000 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -244,7 +270,7 @@ d-i partman-auto/expert_recipe string \
in_vg{ sys } lv_name{ lv_swap } \ in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \ method{ swap } format{ } \
. \ . \
16000 100000 -1 ext4 \ 100 100 100000000000 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -269,7 +295,7 @@ d-i partman/confirm_nooverwrite boolean true
## Post install APT setup ## Post install APT setup
d-i apt-setup/uri_type select d-i d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string deb.debian.org d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/ d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false d-i apt-setup/security-updates boolean false
@ -351,10 +377,8 @@ d-i cdrom-detect/eject boolean false
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \ #in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target chsh -s /bin/zsh ; \ d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
umount /dev/sys/lv_free ; lvremove -f /dev/sys/lv_free ; \
in-target /bin/rmdir /mnt/free ; in-target /bin/sed -i '/lv_free/d' /etc/fstab ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \ in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.203.27 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.jessie.sh in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -0,0 +1,375 @@
####################################################################
# Howto use
####################################################################
## With a PXE boot:
#label wheezy
# menu label Debian GNU/Linux Wheezy 64 bits WITH ^PRESEED
# kernel installer/debian/wheezy/amd64/linux
# APPEND vga=normal initrd=installer/debian/wheezy/amd64/initrd_firm.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/url=tftp://129.20.27.239/installer/debian/wheezy/amd64/preseed.cfg IPAPPEND 2
####################################################################
# Localization
####################################################################
#### Install Time
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string FR
d-i debian-installer/locale select en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i debian-installer/keymap string fr-latin9
## Choose language
d-i localechooser/languagelist select en
## Choose keyboard configuration
d-i console-tools/archs string skip-config
d-i console-keymaps-at/keymap select fr-latin9
d-i keyboard-configuration/xkb-keymap select French
#####################################################################
## Network configuration
#####################################################################
# To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
d-i netcfg/dhcpv6_timeout string 60
## Network Configuration
d-i netcfg/get_hostname string myhostname
d-i netcfg/get_domain string mydomain.fr
# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
d-i hw-detect/load_firmware boolean true
#####################################################################
## Remote install (Manual)
#####################################################################
# Use the following settings if you wish to make use of the network-console
# component for remote installation over SSH. This only makes sense if you
# intend to perform the remainder of the installation manually.
#d-i anna/choose_modules string network-console
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme
#####################################################################
## Mirror settings
#####################################################################
## Mirror
d-i mirror/country string FR
d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/http/proxy string
d-i mirror/http/mirror string ftp.fr.debian.org
d-i mirror/suite string
#####################################################################
## Account
#####################################################################
# Allow login as root?
user-setup-udeb passwd/root-login boolean true
# Root password in clear text
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# ... or encrypted with {MD5, SHA512, …) hash
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now?
user-setup-udeb passwd/make-user boolean false
## User name
#d-i passwd/user-fullname string bob
#d-i passwd/username string bob
## User password in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
## ... or encrypted with MD5 hash
##d-i passwd/user-password-crypted password $1$098f6bcd4621d373cade4e832627b4f6
## Set User UID
#d-i passwd/user-uid string 1000
#####################################################################
## Clock and time zone setup
#####################################################################
### Timezone
# Material clock on UTC
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
## Use NTP to set time
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.univ-rennes1.fr
#d-i clock-setup/ntp-server string 0.debian.pool.ntp.org
#####################################################################
## Disk Partitioning/Boot loader
#####################################################################
# If the system has only one disk the installer will default to using it.
# Otherwise, the device name must be given
d-i partman-auto/disk string /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom
# Specify the method to use
# - regular: use the usual partition types for the architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
#d-i partman-auto/method string regular
d-i partman-auto/method string lvm
# It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
# Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# Choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe
# Regular partition
# limit:: <min size> <priority> <max size> ## In MB !
#d-i partman-auto/expert_recipe string \
#boot-root :: \
#40 50 100 ext3 \
#$primary{ } $bootable{ } \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext3 } \
#mountpoint{ /boot } \
#. \
#500 10000 10000 ext4 \
#method{ format } format{ } \
#use_filesystem{ } filesystem{ ext4 } \
#label{ root } \
#mountpoint{ / } \
#. \
#64 512 300% linux-swap \
#method{ swap } format{ } \
#.
# LVM partition
# The device for physical volume must be listed in partman-auto/disk
# This recipe need almost 30Gb free space it's add all <min size>
# sda2 (16Gb), lv_* (~14Gb) then it should not count it because
# all logical volume are on sda2 ...
d-i partman-auto/expert_recipe string \
boot-root :: \
200 200000 250 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
16000 100000 10000000000000000 ext4 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
vg_name{ sys } \
. \
1000 8000 3000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
4000 7000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_usr } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ usr } \
mountpoint{ /usr } \
. \
4000 6000 8000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_var } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ var } \
mountpoint{ /var } \
. \
1000 5000 2000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_tmp } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
label{ tmp } \
mountpoint{ /tmp } \
. \
2000 4000 10000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_home } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
options/nodev{ nodev } \
label{ home } \
mountpoint{ /home } \
. \
512 3000 4000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_opt } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ opt } \
mountpoint{ /opt } \
. \
512 1000 100% linux-swap \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_swap } \
method{ swap } format{ } \
. \
100 100 100000000000 ext4 \
$lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ free } \
mountpoint{ /mnt/free } \
.
## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space
# Automatically partition without confirmation
d-i partman/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
#####################################################################
## APT configuration // Package selection
#####################################################################
## Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available
d-i apt-setup/local0/repository string \
http://apt.puppetlabs.com wheezy main dependencies
#d-i apt-setup/local0/comment string local server
# Enable deb-src lines
d-i apt-setup/local0/source boolean true
# URL to the public key of the local repository; you must provide a key or
# apt will complain about the unauthenticated repository and so the
# sources.list line will be left commented out
#d-i apt-setup/local0/key string http://local.server/key
d-i apt-setup/local0/key string http://apt.puppetlabs.com/pubkey.gpg
# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
#d-i debian-installer/allow_unauthenticated string true
## Choose packages
tasksel tasksel/first multiselect ssh-server standard gnome-desktop
## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tmux puppet zsh tftp-hpa
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true
#####################################################################
## Boot loader
#####################################################################
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string default
#####################################################################
## Finishing up the installation
#####################################################################
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note
# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
d-i cdrom-detect/eject boolean false
# This is how to make the installer shutdown when finished, but not
# reboot into the installed system.
#d-i debian-installer/exit/halt boolean true
# This will power off the machine instead of just halting it.
#d-i debian-installer/exit/poweroff boolean true
#in-target wget -O /tmp/latecommand.tar.gz "https://wiki.101010.fr/lib/exe/fetch.php?media=documentation:administration_systeme:latecommand.tar.gz" --no-check-certificate ; \
d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \
in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh

Binary file not shown.

77
pxelinux.cfg/defaultOLD Executable file
View File

@ -0,0 +1,77 @@
ui menu.c32
menu title PXE-CHIMIE
# Boot sur le disque local au bout de 10 secondes
prompt 0
timeout 100
ONTIMEOUT local-hdd
LABEL local-hdd
MENU LABEL Boot local disk
KERNEL chain.c32
APPEND hd0
LABEL reboot
MENU LABEL Reboot
KERNEL reboot.c32
# D-I config version 2.0
LABEL debian64
MENU TITLE Debian Wheezy 64bits installer
include debian/wheezy/pxelinux.cfg
LABEL ubuntu
MENU LABEL Ubuntu Precise 64bits installer
APPEND ubuntu/precise/ubuntu-installer/amd64/boot-screens/menu.cfg
KERNEL ubuntu/precise/ubuntu-installer/amd64/boot-screens/vesamenu.c32
#LABEL CentOS
# MENU LABEL CentOS 6
# LINUX memdisk
# INITRD iso/CentOS-6.4-x86_64-netinstall.iso
# APPEND iso raw
LABEL CentOS
MENU LABEL CentOS 6 x86_64 text installer
#KERNEL images/CentOS/6/x86_64/vmlinuz vnc vncpassword=tempVNCpwd headless text ip=dhcp ksdevice=eth0 method=http://mirror.in2p3.fr/linux/CentOS/6/os/x86_64 lang=en_US keymap=fr
KERNEL images/CentOS/6/x86_64/vmlinuz keymap=fr
APPEND initrd=images/CentOS/6/x86_64/initrd.img ksdevice=eth0 kssendmac ks=nfs:deploy.chimie.univ-rennes1.fr:/var/lib/tftpboot/images/CentOS/6/x86_64/ks.cfg headless vnc vncpassword=tempVNCpwd text
#APPEND initrd=images/CentOS/6/x86_64/initrd.img ramdisk_size=100000 ks=nfs:deploy.chimie.univ-rennes1.fr:/var/lib/tftpboot/images/CentOS/6/x86_64/ks.cfg text
LABEL nec-firm-upd
MENU LABEL Nec Firmware Update CD
LINUX memdisk
INITRD fw/nec/BOOT_CD_NEC_v1.0.24.iso
APPEND iso raw
TEXT HELP
!!! WARNING : firmware update !!!
ENDTEXT
LABEL freenas
MENU LABEL FreeNAS-9.1.1-RELEASE-x64 Install
LINUX memdisk
INITRD iso/FreeNAS-9.1.1-RELEASE-x64.iso
APPEND iso raw
LABEL freenas
MENU LABEL FreeNAS Install
PXE freenas/boot/pxeboot
LABEL clonezilla
MENU LABEL Clonezilla live i686 (Disk Imaging and Cloning)
KERNEL images/clonezilla/i686/vmlinuz
APPEND initrd=images/clonezilla/i686/initrd.img boot=live config noswap nolocales edd=on nomodeset noprompt usercrypted=SpXNs.adAr4po ocs_live_run="ocs-live-general" ocs_live_extra_param="" keyboard-layouts="fr" ocs_live_batch="no" locales="en_US.UTF-8" vga=788 nosplash noprompt fetch=tftp://129.20.80.239/images/clonezilla/i686/filesystem.squashfs
# Boot the kernel and initramfs over PXE 32-bit.
LABEL pmagic32
MENU LABEL PMagic 32bits
LINUX images/pmagic/bzImage
INITRD images/pmagic/initrd.img
APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256
# Boot the kernel and initramfs over PXE 64-bit.
LABEL pmagic64
MENU LABEL PMagic 64bits
LINUX images/pmagic/bzImage64
INITRD images/pmagic/initrd.img
APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256

Binary file not shown.

2
scripts/.gitignore vendored
View File

@ -0,0 +1,2 @@
finish.tar.gz
latecommand.tar.gz

View File

@ -8,7 +8,6 @@
* [Debian late_command](#debian-late_command) * [Debian late_command](#debian-late_command)
* [Download diag tools](#download_diag_toolssh) * [Download diag tools](#download_diag_toolssh)
* [Download Clonezilla](#download_clonezillash) * [Download Clonezilla](#download_clonezillash)
3. [Update](#update)
## Description ## Description
Set of scripts to download and generate necessary files to allow differents GNU/Linux distributions to boot through the network. Set of scripts to download and generate necessary files to allow differents GNU/Linux distributions to boot through the network.
@ -16,51 +15,51 @@ Set of scripts to download and generate necessary files to allow differents GNU/
## Scripts list ## Scripts list
### download_debian.sh ### download_debian.sh
The script will provide netboot installers for all Debian (>=oldStable) for both **i386** and **amd64**: The script will provide netboot installers for all Debian (>=Stable) for both **i386** and **amd64**:
* Store the files to **/srv/tftp** (default). * Store the files to **/var/lib/tftpboot** (default).
* Download Debian Linux kernel and initrd files for all Debian distributions (Stable: **Bullseye**; oldStable: **Buster**; oldoldStable: **Stretch**; Unstable: **Sid**) and for **i386** and **amd64** architectures. * Download Debian Linux kernel and initrd files for all Debian distributions (Stable: **Jessie**; Testing: **Stretch**; Unstable: **Sid**) and for **i386** and **amd64** architectures.
* Offer an example menu file to use with a TFTP server (default_path/installer/debian/menu.cfg.example). * Offer an example menu file to use with a TFTP server (default_path/installer/debian/menu.cfg.example).
### download_ubuntu.sh ### download_ubuntu.sh
The script will provide netboot installers for the latest LTS and latest advanced Ubuntu distribution for both **i386** and **amd64**: The script will provide netboot installers for the latest LTS and latest advanced Ubuntu distribution for both **i386** and **amd64**:
* Store the files to **/srv/tftp** (default). * Store the files to **/var/lib/tftpboot** (default).
* Download Ubuntu Linux kernel and initrd files for the two lasts Ubuntu distributions (LTS-16.04: **Xenial**; 15.10: **Wily**) and for **i386** and **amd64** architectures. * Download Ubuntu Linux kernel and initrd files for the two lasts Ubuntu distributions (LTS-16.04: **Xenial**; 15.10: **Wily**) and for **i386** and **amd64** architectures.
* Make a symlink to access to the LTS (default_path/installer/ubuntu/lts) instead of it's codename. * Make a symlink to access to the LTS (default_path/installer/ubuntu/lts) instead of it's codename.
### make_debian_initrd_with_firmware.sh ### make_debian_initrd_with_firmware.sh
The script will provide Debian's netboot installers with **additionnals firmwares** for all Debian (>=oldStable) for **amd64** only: The script will provide Debian's netboot installers with **additionnals firmwares** for all Debian (>=Stable) for **amd64** only:
* Store the files to **/srv/tftp** (default). * Store the files to **/var/lib/tftpboot** (default).
* Store temp files to **/tmp/tmp.XXXXXXXXXX** (with `mktemp`). * Store temp files to **/tmp/tmp.XXXXXXXXXX** (with `mktemp`).
* Download Debian's initrd files for all Debian distributions (Stable: **Bullseye**; oldStable: **Buster**; oldoldStable: **Stretch**; Unstable: **Sid**) for **amd64** architecture only. * Download Debian's initrd files for all Debian distributions (Stable: **Jessie**; Testing: **Stretch**; Unstable: **Sid**) for **amd64** architecture only.
* Download additionnals firmwares: * Download additionnals firmwares:
* **bnx2**: For Broadcom NetXtremeII network adapters. * **bnx2**: For Broadcom NetXtremeII network adapters.
* **linux-nonfree**: For Tigon network adapters. * **linux-nonfree**: For Tigon network adapters.
* **myricom**: For Myricom Myri-10G Ethernet adapters (IBM server). * **myricom**: For Myricom Myri-10G Ethernet adapters (IBM server).
* **qlogic**: For QLogic Infiniband, SCSI, Fibre Channel/FCoE adapters. * **qlogic**: For QLogic Infiniband, SCSI, Fibre Channel/FCoE adapters.
* **iwlwifi**: Binary firmware for Intel Wireless cards
* Extract initrd and firmwares packages to build a new initrd. * Extract initrd and firmwares packages to build a new initrd.
### Debian late_command ### Debian late_command
#### Description #### Description
Some useful configurations after a Debian installation: Some useful configurations after a Debian installation:
* Smarter log management (mainly for rotation and old logs). * Smarter rsyslog (more directories and less files in **/var/log**).
* Move `rsyslog` default configuration to two files (__/etc/rsyslog.conf__ and __/etc/rsyslog.d/99syslog.conf__). * Shorter configuration file and use more files from /etc/rsyslog.d/
* `logrotate` now rotate logs to specific directories (such as __/var/log/syslog.d__, __/var/log/mail/__,…) instead of __/var/log/__. * Move log files to directory:
* Create these new directories. * _kern_ logs from /var/log/kern.log to __/var/log/kernel/kernel.log__
* Packages: * _user_ logs from /var/log/user.log to __/var/log/security/user.log__
* Add minimal packages for a working system (aptitude, tmux and zsh). * _mail_ logs from /var/log/mail.… to __/var/log/mail/mail.…__
* Remove some useless packages (nfs rpcbind,…). * _daemon_ logs from /var/log/daemon.log to __/var/log/syslog/daemon.log__
* Ensure an openssh-server is available. * _auth_ logs from /var/log/auth.log to __/var/log/security/auth.log__
* _lpr_ logs from/var/log/lpr.log to __/var/log/lpr/lpr.log__
* _cron_ logs from /var/log/cron.log to __/var/log/cron/cron.log__
* _localX_ logs from /var/log/localX.log to __/var/log/syslog/localX.log__
* _syslog_ logs from /var/log/syslog.log to __/var/log/syslog/syslog.log__
* _authpriv_ logs from … to __/var/log/security/authpriv.log__
* Smarter logrotate (add timestamp, move some old log files to the same directory,…).
* Remove some useless packages.
* Permit root SSH login with password (no standard user…). * Permit root SSH login with password (no standard user…).
* … * …
Specific to Debian Bullseye:
* Add python3-apt (Ansible dependency).
Specific to Debian Stretch and Buster:
* Add python-apt (Ansible dependency).
#### How-to use it #### How-to use it
* First, make an archive of the script and directories: * First, make an archive of the script and directories:
``` ```
@ -69,7 +68,8 @@ tar czvf latecommand.tar.gz latecommand/
``` ```
* Then, it can be use at the end of a Debian preseed file: * Then, it can be use at the end of a Debian preseed file:
``` ```
d-i preseed/late_command string in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.sh
``` ```
@ -86,17 +86,6 @@ in-target /bin/sh /tmp/latecommand/post.sh
* Make a example configuration file. * Make a example configuration file.
* More informations on the [Clonezilla website][clonezilla via pxe server]. * More informations on the [Clonezilla website][clonezilla via pxe server].
## Update
The netboot's installers, at least for Debian, need to be update **after each point realease**. Just think about it if you got any issue during any installation from PXE.
* Debian: `sudo ./scripts/download_debian.sh`
* Debian's initrd with additionnals firmwares: `sudo ./scripts/make_debian_initrd_with_firmware.sh`
* Ubuntu: `sudo ./scripts/download_ubuntu.sh`
Some tools depends of a static version in their script. So this is the list i check to got their new version:
* [Clonezilla download page][clonezilla download]
* [Gparted sourceforge's repository][gparted sourceforge]
* [Memtest86's official website][memtest official website] (quite useless, last update was ~3 years ago ^^)
[memtest official website]: http://www.memtest.org/#downiso "Memtest86+ download" [memtest official website]: http://www.memtest.org/#downiso "Memtest86+ download"
[OSDN url]: https://osdn.jp/projects/clonezilla/ [OSDN url]: https://osdn.jp/projects/clonezilla/
[gparted sourceforge]: https://sourceforge.net/projects/gparted/files/gparted-live-stable/ "Gparted on sourceforge" [gparted sourceforge]: https://sourceforge.net/projects/gparted/files/gparted-live-stable/ "Gparted on sourceforge"

View File

@ -1,249 +1,46 @@
#!/bin/bash #!/bin/bash
# Purpose {{{ # This script do the following:
# This script will download Clonezilla Stable installer for both AMD64 and i368 # Download Clonezilla Stable for amd64 and i686
# and make a sample menu.cfg config file. # Make a PXE's config file (aka menu.cfg)
# }}}
# Vars {{{
readonly PROGNAME=$(basename "${0}")
readonly NBARGS="${#}"
[ -z "${DEBUG}" ] && DEBUG=1
## Export DEBUG for sub-script
export DEBUG
# Default value for TFTP's directory TFTP_ROOT="/var/lib/tftpboot"
if command -v in.tftpd > /dev/null; then
source /etc/default/tftpd-hpa
else
TFTP_DIRECTORY="/srv/tftp"
fi
CZ_INSTALLER_DIR="${TFTP_DIRECTORY}/installer/clonezilla" CZ_INSTALLER_DIR="${TFTP_ROOT}/installer/clonezilla"
CZ_CONFIG_PXE="${CZ_INSTALLER_DIR}/menu.cfg.example" CZ_CONFIG_PXE="${CZ_INSTALLER_DIR}/menu.cfg.example"
# Get latest version from https://clonezilla.org CZ_VERSION="2.4.7-8"
CZ_VERSION_DEFAULT="$(curl --no-progress-meter https://clonezilla.org/downloads.php | sed --silent 's;.*<b>stable</b>.*<font.*>\(.*\)</font>.*;\1;p')"
## Colors
readonly PURPLE='\033[1;35m'
readonly RED='\033[0;31m'
readonly RESET='\033[0m'
readonly COLOR_DEBUG="${PURPLE}"
# }}}
usage() { # {{{
cat <<- EOF
usage: $PROGNAME [-d|-h|-v]
This script will download Clonezilla Stable for both AMD64 and i368 architectures.
EXAMPLES:
- Download Clonezilla's to default place (${TFTP_DIRECTORY}).
${PROGNAME}
- Download a specific version of Clonezilla (default : ${CZ_VERSION_DEFAULT}).
${PROGNAME} --version "2.7.1"
OPTIONS:
-v,--version
Define the version of Clonezilla to download.
-d,--debug
Enable debug messages.
-h,--help
Print this help message.
EOF
}
# }}}
debug_message() { # {{{
local_message="${1}"
## Print message if DEBUG is enable (=0)
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6b\e[m\n' "DEBUG ${PROGNAME}: ${local_message}"
return 0
}
# }}}
error_message() { # {{{
local_error_message="${1}"
local_error_code="${2}"
## Print message
printf '%b\n' "ERROR ${PROGNAME}: ${RED}${local_error_message}${RESET}"
exit "${local_error_code:=66}"
}
# }}}
define_vars() { # {{{
# If cz_version wasn't defined (argument) {{{
if [ -z "${cz_version}" ]; then
## Use default value
cz_version="${CZ_VERSION_DEFAULT}"
fi
# }}}
}
# }}}
is_var_empty() { # {{{
## Return False by default
return_var_empty="1"
## Total number of variables to test
local_total_var="${#}"
loop_count_var_empty="0"
## While it remains a variable to test
while [ "${local_total_var}" -gt "${loop_count_var_empty}" ]; do
debug_message "is_var_empty \
Test var: ${1}."
### Test if this is empty and set return value to True
[ -z "${1}" ] && return_var_empty="0"
### Increase the number of tested variables
loop_count_var_empty=$((loop_count_var_empty+1))
### Shift to the next variable
shift
done
return "${return_var_empty}"
}
# }}}
is_file_absent() { # {{{
local_file_absent="${1}"
## File exists by default
return_is_file_absent="1"
### Check if the file exists
# shellcheck disable=SC2086
if find ${local_file_absent} > /dev/null 2>&1; then
return_is_file_absent="1"
debug_message "is_file_absent \
The file ${RED}${local_file_absent}${COLOR_DEBUG} exists."
else
return_is_file_absent="0"
debug_message "is_file_absent \
The file ${RED}${local_file_absent}${COLOR_DEBUG} doesn't exist."
fi
return "${return_is_file_absent}"
}
# }}}
download_file() { # {{{
local_url="${1}"
local_dest_file="${2}"
debug_message "download_file \
Download ${local_url} to ${RED}${local_dest_file}${COLOR_DEBUG} ."
wget --quiet "${local_url}" --output-document="${local_dest_file}"
## Unset variables
unset local_url
unset local_dest_file
}
# }}}
is_file_empty() { # {{{
local_file="${1}"
## File is empty by default
return_is_file_empty="0"
### Check if the file is empty
if [ ! -s "${local_file}" ]; then
return_is_file_empty="0"
debug_message "is_file_empty \
The file ${RED}${local_file}${COLOR_DEBUG} is empty or doesn't exists."
else
return_is_file_empty="1"
debug_message "is_file_empty \
The file ${RED}${local_file}${COLOR_DEBUG} exists and has a size greater than zero."
fi
## Unset variables
unset local_file
return "${return_is_file_empty}"
}
# }}}
main() { # {{{
# Define all vars
define_vars
# If cz_version is empty {{{
# Exit with error
is_var_empty "${cz_version}" \
&& error_message "Clonezilla version variable is empty" 6
# }}}
# Create directories and config file # Create directories and config file
debug_message "Main \ rm -rf "${CZ_INSTALLER_DIR}"
Create ${CZ_INSTALLER_DIR} tree." mkdir -p "${CZ_INSTALLER_DIR}"
mkdir --parents -- "${CZ_INSTALLER_DIR}" \ touch "${CZ_CONFIG_PXE}"
|| error_message "Can't create ${CZ_INSTALLER_DIR}/ directory." 1
true > "${CZ_CONFIG_PXE}"
for ARCH in amd64 i686; do # For available classic architectures for ARCH in amd64 i686; do # For available classic architecture
#CZ_URL="https://osdn.jp/dl/clonezilla/clonezilla-live-${cz_version}-${ARCH}.zip" CZ_URL="https://osdn.jp/dl/clonezilla/clonezilla-live-${CZ_VERSION}-${ARCH}.zip"
CZ_URL="https://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/${cz_version}/clonezilla-live-${cz_version}-${ARCH}.zip/download" CZ_TEMP_FILE="/tmp/clonezilla-live-"${CZ_VERSION}"-"${ARCH}".zip "
CZ_TEMP_FILE="/tmp/clonezilla-live-${cz_version}-${ARCH}.zip"
## If this version is not already present on the system # Create and go into directory
if is_file_absent "${CZ_INSTALLER_DIR}/${ARCH}/${cz_version}"; then mkdir -p ${CZ_INSTALLER_DIR}/${ARCH}
### Recreate directory and go pushd ${CZ_INSTALLER_DIR}/${ARCH}
rm --recursive --force -- "${CZ_INSTALLER_DIR}/${ARCH}"
mkdir --parents -- "${CZ_INSTALLER_DIR}/${ARCH}" \
|| error_message "Can't create ${CZ_INSTALLER_DIR}/${ARCH}/ directory." 1
pushd "${CZ_INSTALLER_DIR}/${ARCH}" > /dev/null \
|| error_message "Can't move to ${CZ_INSTALLER_DIR}/${ARCH} temp directory." 2
### Download and extract only PXE files {{{ # Download and extract only PXE files
download_file "${CZ_URL}" "${CZ_TEMP_FILE}" wget "${CZ_URL}" -O "${CZ_TEMP_FILE}"
is_file_empty "${CZ_TEMP_FILE}" \ unzip -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d .
&& error_message "${CZ_TEMP_FILE} is empty." 3 rm -f "${CZ_TEMP_FILE}"
debug_message "FOR loop ${ARCH} \
Uncompress PXE files from ${CZ_TEMP_FILE} ."
unzip -qq -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d . \
|| error_message "Can't properly extract ${CZ_TEMP_FILE} archive."
### }}}
### Remove temp file popd
rm --force -- "${CZ_TEMP_FILE}" \
|| error_message "Can't remove ${CZ_TEMP_FILE} temp file."
### Add flag file to know that this version is available # Config file
true > "${CZ_INSTALLER_DIR}/${ARCH}/${cz_version}"
popd > /dev/null \
|| error_message "Can't move back from ${CZ_INSTALLER_DIR}/${ARCH}/ directory." 2
fi
## Add informations to sample config file
/bin/cat >> "${CZ_CONFIG_PXE}" << EOF /bin/cat >> "${CZ_CONFIG_PXE}" << EOF
label live${ARCH} label live${ARCH}
menu label Clonezilla Live ^${ARCH} menu label Clonezilla Live ^${ARCH}
kernel installer/clonezilla/${ARCH}/vmlinuz kernel installer/clonezilla/${ARCH}/vmlinuz
APPEND initrd=installer/clonezilla/${ARCH}/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://129.20.203.27/installer/clonezilla/${ARCH}/filesystem.squashfs APPEND initrd=installer/clonezilla/${ARCH}/initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://129.20.27.239/installer/clonezilla/${ARCH}/filesystem.squashfs
EOF EOF
done done
# Add separator and menu to sample config file # Config file
/bin/cat >> "${CZ_CONFIG_PXE}" << EOF /bin/cat >> "${CZ_CONFIG_PXE}" << EOF
label separator label separator
menu label ----- menu label -----
@ -252,71 +49,4 @@ EOF
menu exit menu exit
EOF EOF
}
# }}}
# Manage arguments # {{{
# This code can't be in a function due to argument management
if [ ! "${NBARGS}" -eq "0" ]; then
manage_arg="0"
## If the first argument is not an option
if ! printf -- '%s' "${1}" | grep -q -E -- "^-+";
then
## Print help message and exit
printf '%b\n' "${RED}Invalid option: ${1}${RESET}"
printf '%b\n' "---"
usage
exit 1
fi
# Parse all options (start with a "-") one by one
while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do
case "${1}" in
-v|--version ) ## Define cz_version
## Move to the next argument
shift
## Define var
readonly cz_version="${1}"
;;
-d|--debug ) ## debug
DEBUG=0
;;
-h|--help ) ## help
usage
## Exit after help informations
exit 0
;;
* ) ## unknow option
printf '%b\n' "${RED}Invalid option: ${1}${RESET}"
printf '%b\n' "---"
usage
exit 1
;;
esac
debug_message "Arguments management \
${RED}${1}${COLOR_DEBUG} option managed."
## Move to the next argument
shift
manage_arg=$((manage_arg+1))
done
debug_message "Arguments management \
${RED}${manage_arg}${COLOR_DEBUG} argument(s) successfully managed."
else
debug_message "Arguments management \
No arguments/options to manage."
fi
# }}}
main
exit 0 exit 0

View File

@ -1,161 +1,33 @@
#!/bin/bash #!/bin/bash
# Purpose {{{ # This script do the following:
# This script will download Debian netboot installer for both AMD64 and i368 # Download Debian Stable (jessie)
# 1. Debian oldStable (Bookworm) # Download Debian Testing (stretch)
# 2. Debian oldStable (Bullseye) # Download Debian Unstable (sid)
# 3. Debian Unstable (Sid) # Make an PXE's config file (aka menu.cfg)
# and make a sample menu.cfg config file.
# }}}
# Vars {{{
readonly PROGNAME=$(basename "${0}")
readonly NBARGS="${#}"
[ -z "${DEBUG}" ] && DEBUG=1
## Export DEBUG for sub-script
export DEBUG
# Default value for TFTP's directory TFTP_ROOT="/var/lib/tftpboot"
if command -v in.tftpd > /dev/null; then
source /etc/default/tftpd-hpa
else
TFTP_DIRECTORY="/srv/tftp"
fi
# Where to store Debian's installers # Config file
DEBIAN_INSTALLER_DIR="${TFTP_DIRECTORY}/installer/debian" CONFIG_PXE="${TFTP_ROOT}/installer/debian/menu.cfg.example"
# tftp sample config file rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE}
DEBIAN_CONFIG_PXE="${DEBIAN_INSTALLER_DIR}/menu.cfg.example"
## Colors for DISTRO in jessie stretch sid; do # For ALL Debian's version
readonly PURPLE='\033[1;35m'
readonly RED='\033[0;31m'
readonly RESET='\033[0m'
readonly COLOR_DEBUG="${PURPLE}"
# }}}
usage() { # {{{
cat <<- EOF
usage: $PROGNAME [-d|-h]
This script will download "all" Debian's netboot installer for
tftp server for both AMD64 and i368 architectures.
EXAMPLES:
- Download Debian's installers to default place (${TFTP_DIRECTORY})
${PROGNAME}
OPTIONS:
-d,--debug
Enable debug messages.
-h,--help
Print this help message.
EOF
}
# }}}
debug_message() { # {{{
local_message="${1}"
## Print message if DEBUG is enable (=0)
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6b\e[m\n' "DEBUG ${PROGNAME}: ${local_message}"
return 0
}
# }}}
error_message() { # {{{
local_error_message="${1}"
local_error_code="${2}"
## Print message
printf '%b\n' "ERROR ${PROGNAME}: ${RED}${local_error_message}${RESET}"
exit "${local_error_code:=66}"
}
# }}}
download_file() { # {{{
local_url="${1}"
local_dest_file="${2}"
debug_message "download_file \
Download ${local_url} to ${RED}${local_dest_file}${COLOR_DEBUG} ."
wget --quiet "${local_url}" --output-document="${local_dest_file}"
## Unset variables
unset local_url
unset local_dest_file
}
# }}}
is_file_empty() { # {{{
local_file="${1}"
## File is empty by default
return_is_file_empty="0"
### Check if the file is empty
if [ ! -s "${local_file}" ]; then
return_is_file_empty="0"
debug_message "is_file_empty \
The file ${RED}${local_file}${COLOR_DEBUG} is empty or doesn't exists."
else
return_is_file_empty="1"
debug_message "is_file_empty \
The file ${RED}${local_file}${COLOR_DEBUG} exists and has a size greater than zero."
fi
## Unset variables
unset local_file
return "${return_is_file_empty}"
}
# }}}
main() { # {{{
# Create directories and config file
debug_message "Main \
Create ${DEBIAN_INSTALLER_DIR} tree."
mkdir --parents -- "${DEBIAN_INSTALLER_DIR}" \
|| error_message "Can't create ${DEBIAN_INSTALLER_DIR} directory." "1"
debug_message "Main \
(re)Create ${DEBIAN_CONFIG_PXE} sample config file."
true > "${DEBIAN_CONFIG_PXE}"
# Parse all Debian's distribution
for DISTRO in bookworm bullseye sid; do # For "all" Debian's version
## Then parse architecture
for ARCH in amd64 i386; do # For all classic architecture for ARCH in amd64 i386; do # For all classic architecture
debug_message "Main FOR loop \ # Config file
Manage ${RED}${DISTRO}${COLOR_DEBUG} release with ${RED}${ARCH}${COLOR_DEBUG} architecture." echo "label install" >> "${CONFIG_PXE}"
### Create destination directory # Create and go into directory
mkdir --parents -- ${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH} \ mkdir -p ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH}
|| error_message "Can't create ${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH} tree." "1" pushd ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH}
### Download linux file # Download files
download_file "http://deb.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux" \ wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux
"${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}/linux" wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz
is_file_empty "${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}/linux" \ popd
&& error_message "${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}/linux is empty !" "2"
### Download initrd.gz # Config file
download_file "http://deb.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz" \ /bin/cat >> "${CONFIG_PXE}" << EOF
"${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}/initrd.gz"
is_file_empty "${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}/initrd.gz" \
&& error_message "${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}/initrd.gz is empty !" "2"
### Config file
debug_message "Main FOR loop \
Add tftp config sample."
/bin/cat >> "${DEBIAN_CONFIG_PXE}" << EOF
label ${DISTRO}${ARCH}
menu label Debian GNU/Linux ${DISTRO} ^${ARCH} bits menu label Debian GNU/Linux ${DISTRO} ^${ARCH} bits
kernel installer/debian/${DISTRO}/${ARCH}/linux kernel installer/debian/${DISTRO}/${ARCH}/linux
append vga=normal initrd=installer/debian/${DISTRO}/${ARCH}/initrd.gz -- quiet append vga=normal initrd=installer/debian/${DISTRO}/${ARCH}/initrd.gz -- quiet
@ -163,77 +35,17 @@ EOF
done done
# Config file # Config file
/bin/cat >> "${DEBIAN_CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
label separator label separator
menu label --- menu label ---
EOF EOF
done done
# Config file # Config file
/bin/cat >> "${DEBIAN_CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
label mainmenu label mainmenu
menu label ^Back... menu label ^Back..
menu exit menu exit
EOF EOF
}
# }}}
# Manage arguments # {{{
# This code can't be in a function due to argument management
if [ ! "${NBARGS}" -eq "0" ]; then
manage_arg="0"
## If the first argument is not an option
if ! printf -- '%s' "${1}" | grep -q -E -- "^-+";
then
## Print help message and exit
printf '%b\n' "${RED}Invalid option: ${1}${RESET}"
printf '%b\n' "---"
usage
exit 1
fi
# Parse all options (start with a "-") one by one
while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do
case "${1}" in
-d|--debug ) ## debug
DEBUG=0
;;
-h|--help ) ## help
usage
## Exit after help informations
exit 0
;;
* ) ## unknow option
printf '%b\n' "${RED}Invalid option: ${1}${RESET}"
printf '%b\n' "---"
usage
exit 1
;;
esac
debug_message "Arguments management \
${RED}${1}${COLOR_DEBUG} option managed."
## Move to the next argument
shift
manage_arg=$((manage_arg+1))
done
debug_message "Arguments management \
${RED}${manage_arg}${COLOR_DEBUG} argument(s) successfully managed."
else
debug_message "Arguments management \
No arguments/options to manage."
fi
# }}}
main
exit 0 exit 0

View File

@ -1,253 +1,29 @@
#!/bin/bash #!/bin/bash
# Purpose {{{ # This script do the following:
# This script will download some diagnostic tools. # Download Memtest
# 1. Memtest
# 2. Gparted
# and make a sample menu.cfg config file.
# }}}
# Vars {{{
readonly PROGNAME=$(basename "${0}")
readonly NBARGS="${#}"
[ -z "${DEBUG}" ] && DEBUG=1
## Export DEBUG for sub-script
export DEBUG
# Default value for TFTP's directory TFTP_ROOT="/var/lib/tftpboot"
if command -v in.tftpd > /dev/null; then
source /etc/default/tftpd-hpa
else
TFTP_DIRECTORY="/srv/tftp"
fi
# Tools versions # Config file
MEMTEST_VERSION_DEFAULT="$(curl --no-progress-meter http://memtest.org/ \ CONFIG_PXE="${TFTP_ROOT}/installer/menu.cfg.diag.example"
| sed --silent 's;.*VERSION : \([[:alnum:]]*.[[:alnum:]]*\).*</font>.*;\1;p')" rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE}
GPARTED_VERSION_DEFAULT="$(curl --no-progress-meter https://gparted.org/ \
| sed --silent 's;.*<a href.*sourceforge.net.*>Live \(.*\)</a>.*;\1;p')"
# TFTP tree ### Memtest {{{
DIAG_INSTALLER_DIR="${TFTP_DIRECTORY}/installer" MEMTEST_VERSION="5.01"
CONFIG_PXE="${DIAG_INSTALLER_DIR}/menu.cfg.diag.example" MEMTEST_URL="http://www.memtest.org/download/${MEMTEST_VERSION}/memtest86+-${MEMTEST_VERSION}.bin.gz"
MEMTEST_INSTALLER_DIR="${DIAG_INSTALLER_DIR}/memtest" MEMTEST_INSTALLER_DIR="${TFTP_ROOT}/installer/memtest/"
GPARTED_INSTALLER_DIR="${DIAG_INSTALLER_DIR}/gparted"
## Colors # (re)Create the installer directory
readonly PURPLE='\033[1;35m' rm -rf ${MEMTEST_INSTALLER_DIR}
readonly RED='\033[0;31m' mkdir -p ${MEMTEST_INSTALLER_DIR}
readonly RESET='\033[0m' pushd ${MEMTEST_INSTALLER_DIR}
readonly COLOR_DEBUG="${PURPLE}"
# }}}
usage() { # {{{
cat <<- EOF # Download the last version and set simpler name (without the **.bin** extension!)
usage: $PROGNAME [-d|-h|-m] wget ${MEMTEST_URL} -O - | gzip -d > memtest86+-${MEMTEST_VERSION}.bin
ln -s memtest86+-${MEMTEST_VERSION}.bin memtest86+
This script will download some diagnostic tools (eg. Memtest, Gparted,…). popd
EXAMPLES:
- Download default diagnostic tools.
${PROGNAME}
- Download a specific version of Gparted (default : ${GPARTED_VERSION_DEFAULT}).
${PROGNAME} --gparted "1.0.0-5"
- Download a specific version of Memtest (default : ${MEMTEST_VERSION_DEFAULT}).
${PROGNAME} --memtest "3.01"
OPTIONS:
-g,--gparted
Set the version of Gparted to download.
-m,--memtest
Set the version of Memtest to download.
-d,--debug
Enable debug messages.
-h,--help
Print this help message.
EOF
}
# }}}
debug_message() { # {{{
local_message="${1}"
## Print message if DEBUG is enable (=0)
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6b\e[m\n' "DEBUG ${PROGNAME}: ${local_message}"
return 0
}
# }}}
error_message() { # {{{
local_error_message="${1}"
local_error_code="${2}"
## Print message
printf '%b\n' "ERROR ${PROGNAME}: ${RED}${local_error_message}${RESET}"
exit "${local_error_code:=66}"
}
# }}}
define_vars() { # {{{
# If memtest_version wasn't defined (argument) {{{
if [ -z "${memtest_version}" ]; then
## Use default value
memtest_version="${MEMTEST_VERSION_DEFAULT}"
fi
# }}}
# If gparted_version wasn't defined (argument) {{{
if [ -z "${gparted_version}" ]; then
## Use default value
gparted_version="${GPARTED_VERSION_DEFAULT}"
fi
# }}}
}
# }}}
is_var_empty() { # {{{
## Return False by default
return_var_empty="1"
## Total number of variables to test
local_total_var="${#}"
loop_count_var_empty="0"
## While it remains a variable to test
while [ "${local_total_var}" -gt "${loop_count_var_empty}" ]; do
debug_message "is_var_empty \
Test var: ${1}."
### Test if this is empty and set return value to True
[ -z "${1}" ] && return_var_empty="0"
### Increase the number of tested variables
loop_count_var_empty=$((loop_count_var_empty+1))
### Shift to the next variable
shift
done
return "${return_var_empty}"
}
# }}}
is_file_absent() { # {{{
local_file_absent="${1}"
## File exists by default
return_is_file_absent="1"
### Check if the file exists
# shellcheck disable=SC2086
if find ${local_file_absent} > /dev/null 2>&1; then
return_is_file_absent="1"
debug_message "is_file_absent \
The file ${RED}${local_file_absent}${COLOR_DEBUG} exists."
else
return_is_file_absent="0"
debug_message "is_file_absent \
The file ${RED}${local_file_absent}${COLOR_DEBUG} doesn't exist."
fi
return "${return_is_file_absent}"
}
# }}}
download_file() { # {{{
local_url="${1}"
local_dest_file="${2}"
debug_message "download_file \
Download ${local_url} to ${RED}${local_dest_file}${COLOR_DEBUG} ."
wget --quiet "${local_url}" --output-document="${local_dest_file}"
## Unset variables
unset local_url
unset local_dest_file
}
# }}}
is_file_empty() { # {{{
local_file="${1}"
## File is empty by default
return_is_file_empty="0"
### Check if the file is empty
if [ ! -s "${local_file}" ]; then
return_is_file_empty="0"
debug_message "is_file_empty \
The file ${RED}${local_file}${COLOR_DEBUG} is empty or doesn't exists."
else
return_is_file_empty="1"
debug_message "is_file_empty \
The file ${RED}${local_file}${COLOR_DEBUG} exists and has a size greater than zero."
fi
## Unset variables
unset local_file
return "${return_is_file_empty}"
}
# }}}
main() { # {{{
# Define all vars
define_vars
# If memtest_version is empty {{{
# Exit with error
is_var_empty "${memtest_version}" \
&& error_message "Memtest version variable is empty" 6
# }}}
# If gparted_version is empty {{{
# Exit with error
is_var_empty "${gparted_version}" \
&& error_message "Gparted version variable is empty" 6
# }}}
# Create diagnostic tools directory and config file
mkdir --parents -- "${DIAG_INSTALLER_DIR}" \
|| error_message "Can't create ${DIAG_INSTALLER_DIR}/ directory." 1
true > ${CONFIG_PXE}
# Memtest {{{
MEMTEST_URL="http://www.memtest.org/download/${memtest_version}/memtest86+-${memtest_version}.bin.gz"
MEMTEST_BIN="memtest86+-${memtest_version}.bin"
# If this version is not already present on the system
if is_file_absent "${MEMTEST_INSTALLER_DIR}/${memtest_version}"; then
## (re)Create the installer directory
rm --recursive --force -- "${MEMTEST_INSTALLER_DIR}"
mkdir --parents -- "${MEMTEST_INSTALLER_DIR}"
pushd "${MEMTEST_INSTALLER_DIR}" > /dev/null \
|| error_message "Can't move to ${MEMTEST_INSTALLER_DIR} directory." 2
## Download and extract the last version
wget --quiet "${MEMTEST_URL}" -O - | gzip --decompress > "${MEMTEST_BIN}"
is_file_empty "${MEMTEST_BIN}" \
&& error_message "${MEMTEST_BIN} is empty." 3
## Set simpler name (without the **.bin** extension!)
ln --symbolic -- "${MEMTEST_BIN}" memtest86+
### Add flag file to know that this version is available
true > "${MEMTEST_INSTALLER_DIR}/${memtest_version}"
popd > /dev/null \
|| error_message "Can't move back from ${MEMTEST_INSTALLER_DIR}/ directory." 2
fi
# Config file # Config file
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
@ -256,49 +32,41 @@ label memtest
kernel installer/memtest/memtest86+ kernel installer/memtest/memtest86+
EOF EOF
# }}} ### }}}
# Gparted {{{ ### Gparted {{{
GPARTED_VERSION="0.26.1-3"
GPARTED_INSTALLER_DIR="${TFTP_ROOT}/installer/gparted"
# For available classic architecture # (re)Create the installer directory
for ARCH in amd64 i686; do rm -rf ${GPARTED_INSTALLER_DIR}
GPARTED_URL="http://downloads.sourceforge.net/project/gparted/gparted-live-stable/${gparted_version}/gparted-live-${gparted_version}-${ARCH}.zip" mkdir -p ${GPARTED_INSTALLER_DIR}
GPARTED_TEMP_FILE="gparted-live-${gparted_version}-${ARCH}.zip"
# If this version is not already present on the system for ARCH in amd64 i686; do # For available classic architecture
if is_file_absent "${GPARTED_INSTALLER_DIR}/${ARCH}/${gparted_version}"; then GPARTED_URL="http://downloads.sourceforge.net/project/gparted/gparted-live-stable/${GPARTED_VERSION}/gparted-live-${GPARTED_VERSION}-${ARCH}.zip"
GPARTED_TEMP_FILE="gparted-live-${GPARTED_VERSION}-${ARCH}.zip"
## (re)Create the installer directory for this architecture # Create and go into directory
rm --recursive --force -- "${GPARTED_INSTALLER_DIR}/${ARCH}" mkdir -p ${GPARTED_INSTALLER_DIR}/${ARCH}
mkdir --parents -- "${GPARTED_INSTALLER_DIR}/${ARCH}" pushd ${GPARTED_INSTALLER_DIR}/${ARCH}
pushd "${GPARTED_INSTALLER_DIR}/${ARCH}" > /dev/null \
|| error_message "Can't move to ${GPARTED_INSTALLER_DIR}/${ARCH} directory." 2
## Download and extract the last version # Download and extract only PXE files
download_file "${GPARTED_URL}" "${GPARTED_TEMP_FILE}" wget "${GPARTED_URL}" -O "${GPARTED_TEMP_FILE}"
is_file_empty "${GPARTED_TEMP_FILE}" \ unzip -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d .
&& error_message "${GPARTED_TEMP_FILE} is empty." 3 rm -f "${GPARTED_TEMP_FILE}"
unzip -qq -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d . \
|| error_message "Can't properly extract ${GPARTED_TEMP_FILE} archive."
rm --force -- "${GPARTED_TEMP_FILE}" popd
### Add flag file to know that this version is available
true > "${GPARTED_INSTALLER_DIR}/${ARCH}/${gparted_version}"
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
label gpartedlive${ARCH} label gpartedlive${ARCH}
menu label Partiton Manager ${ARCH} (^Gparted) menu label Partiton Manager ${ARCH} (^Gparted)
kernel installer/gparted/${ARCH}/vmlinuz kernel installer/gparted/${ARCH}/vmlinuz
append initrd=installer/gparted/${ARCH}/initrd.img boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=tftp://129.20.203.27/installer/gparted/${ARCH}/filesystem.squashfs append initrd=installer/gparted/${ARCH}/initrd.img boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=tftp://129.20.27.239/installer/gparted/${ARCH}/filesystem.squashfs
EOF EOF
popd > /dev/null \
|| error_message "Can't move back from ${GPARTED_INSTALLER_DIR}/${ARCH}/ directory." 2
fi
done done
### }}} ### }}}
# Config file # Config file
@ -309,77 +77,5 @@ label mainmenu
menu label ^Back.. menu label ^Back..
menu exit menu exit
EOF EOF
}
# }}}
# Manage arguments # {{{
# This code can't be in a function due to argument management
if [ ! "${NBARGS}" -eq "0" ]; then
manage_arg="0"
## If the first argument is not an option
if ! printf -- '%s' "${1}" | grep -q -E -- "^-+";
then
## Print help message and exit
printf '%b\n' "${RED}Invalid option: ${1}${RESET}"
printf '%b\n' "---"
usage
exit 1
fi
# Parse all options (start with a "-") one by one
while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do
case "${1}" in
-g|--gparted ) ## Define gparted_version
## Move to the next argument
shift
## Define var
readonly gparted_version="${1}"
;;
-m|--memtest ) ## Define memtest_version
## Move to the next argument
shift
## Define var
readonly memtest_version="${1}"
;;
-d|--debug ) ## debug
DEBUG=0
;;
-h|--help ) ## help
usage
## Exit after help informations
exit 0
;;
* ) ## unknow option
printf '%b\n' "${RED}Invalid option: ${1}${RESET}"
printf '%b\n' "---"
usage
exit 1
;;
esac
debug_message "Arguments management \
${RED}${1}${COLOR_DEBUG} option managed."
## Move to the next argument
shift
manage_arg=$((manage_arg+1))
done
debug_message "Arguments management \
${RED}${manage_arg}${COLOR_DEBUG} argument(s) successfully managed."
else
debug_message "Arguments management \
No arguments/options to manage."
fi
# }}}
main
exit 0 exit 0

27
scripts/download_ubuntu.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# This script do the following:
# Download last Ubuntu LTS 16.04 (xenial)
# Download Ubuntu 15.10 (wily)
# Make a symlink to access to the last LTS
TFTP_ROOT="/var/lib/tftpboot"
# last Long Term Support distribution name
LTS="xenial"
for DISTRO in wily ${LTS}; do
for ARCH in amd64 i386; do
mkdir -p ${TFTP_ROOT}/installer/ubuntu/${DISTRO}/${ARCH}
pushd ${TFTP_ROOT}/installer/ubuntu/${DISTRO}/${ARCH}
wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/linux -O linux
wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/initrd.gz -O initrd.gz
popd
done
done
# Link the LTS distribution name to lts
unlink ${TFTP_ROOT}/installer/ubuntu/lts
ln -s ${LTS} ${TFTP_ROOT}/installer/ubuntu/lts
exit 0

Binary file not shown.

View File

@ -1,7 +0,0 @@
// Should APT install recommended or suggested packages?
APT::Install-Recommends "false";
APT::Install-Suggests "false";
// APT should not consider recommended or suggested packages to be unused
APT::AutoRemove::RecommendsImportant "true";
APT::AutoRemove::SuggestsImportant "true";

Some files were not shown because too many files have changed in this diff Show More