Compare commits

...

189 Commits

Author SHA1 Message Date
Jeremy Gardais e19f42efd4
Fix preseed filename… 2024-02-26 13:37:51 +01:00
Jeremy Gardais 037f0a1e84
Add an entry "preseed without partitioning"
For more information, see HPE installation :
https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3778
2024-02-26 12:40:35 +01:00
Jeremy Gardais d6784f94e9
Install gpg during Debian install process 2024-02-19 18:45:59 +01:00
Jeremy Gardais c45bcb6d85
Add nonfree-misc firmware for HPE/Intel
During PXE install, missing firmwares:
intel/ice/ddp/ice.pkg
2024-02-08 14:57:41 +01:00
Jeremy Gardais 5083361c4e
Add Cinnamon Bookworm entry 2023-11-27 14:06:42 +01:00
Jeremy Gardais 00d54b1603
Update git.ipr domain 2023-11-09 10:27:01 +01:00
Guillaume Raffy 14de494af2 updated the firmwares to make the network cards QL41132HQRJ-HC (found on hpe gen10+) work
- validated on alambix105.ipr
- work related to https://bugzilla.ipr.univ-rennes1.fr/show_bug.cgi?id=3622
2023-10-03 16:30:48 +02:00
Guillaume Raffy f46103adc4 added the pxe config: Debian Bookworm amd64 for compute node PRESEED
inspired from:
- Debian Bookworm amd64
- Debian Buster amd64 for compute node PRESEED

work related to https://bugzilla.ipr.univ-rennes1.fr/show_bug.cgi?id=3543
2023-09-22 18:45:39 +02:00
Jeremy Gardais 78691ce17c
Fix keyboard layout ! 2023-09-22 12:54:57 +02:00
Jeremy Gardais faf914a423
/usr: Increase size for graphical installations 2023-09-22 10:39:26 +02:00
Jeremy Gardais 27d1522793
Remove unwanted gnome-initial-setup package 2023-09-21 11:35:05 +02:00
Jeremy Gardais 86fd9835da
New Bookworm + UEFI + Gnome entry 2023-09-19 15:54:13 +02:00
Jeremy Gardais 1b62701644
Keep old post-install scripts to old/latecommand 2023-06-13 17:05:42 +02:00
Jeremy Gardais 9b0cb33ff1
Enable post.bookworm script… 2023-06-13 17:03:31 +02:00
Jeremy Gardais 0b55464805
New Bookworm entry with preseed and latecommand 2023-06-13 16:46:44 +02:00
Jeremy Gardais c3bd214609
Fix path to Debian Bookworm… 2023-06-13 11:55:16 +02:00
Jeremy Gardais 8fa53c0840
New release of Debian Bookworm
Remove oldstable entries
Rename stable ➡️ oldstable entries
Add a new basic entry for stable + firmware
2023-06-12 16:30:11 +02:00
Jeremy Gardais 7c00194e7d
Remove/rename everything related to Stretch
As Debian Stretch installer is no longer available for download, the
script and tftpd fail with Stretch.
2023-05-05 14:02:57 +02:00
Jeremy Gardais ee90f59d6c
Update firmware to version 2021 2023-05-04 17:32:22 +02:00
Jeremy Gardais f8d9a1184c
Update comments 2023-02-08 17:02:31 +01:00
Jeremy Gardais df830df28b
Increase /boot size 2023-02-08 15:43:18 +01:00
Jeremy Gardais bea8b94472
Update firmware-iwlwifi URL 2022-11-30 14:12:19 +01:00
Jeremy Gardais 98dbeb8e9f
Fix indentation 2022-11-30 14:12:02 +01:00
Jeremy Gardais 4022e1bfe6
Merge branch 'master' of https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot 2022-09-28 11:51:46 +02:00
Jeremy Gardais 16217f4fc2
Correct comments and indentation 2022-09-28 11:51:28 +02:00
Guillaume Raffy 855c9b9d96 fixed silly error (min value was greater than max value) that caused the / partition to be 25Gb instead of 20Gb max 2022-08-24 11:51:01 +02:00
Guillaume Raffy 8da9a44310 adapted the size of partitions to cope with debian's inflation:
- significantly increased /usr from 20G to 40G because 20G turned out to be too small (see https://bugzilla.ipr.univ-rennes1.fr/show_bug.cgi?id=3410)
- slightly increased /opt from 60G to 80G to allow more room space (that's where big software is installed), as on physix90 it was full at 45% and I suspect this figure would be higher ion bullseye
- reduced the size of / from 30G down to 20G because on physix90, it was only used at 22% so I guess 20G will be still more than enough on bullseye
2022-08-19 19:05:07 +02:00
Jeremy Gardais 856ac7a591
Get Gparted livesystem from HTTP backend 2022-05-11 15:34:44 +02:00
Jeremy Gardais 7fe0e05738
Use nvme0n1 as first disk if available 2022-05-03 10:31:25 +02:00
Jeremy Gardais 755143cc36
Update regexp for Memtest version 2022-04-04 13:23:53 +02:00
Jeremy Gardais 0c188608f9
Add Cinnamon preseed for Bullseye without cipher 2022-03-31 09:38:56 +02:00
Jeremy Gardais a3d5c86ef8
Use SourceForge.net URL to download Clonezilla 2022-02-01 13:36:35 +01:00
Jeremy Gardais bcd40f477f
Ignore cpio errors because LXC hosts produce warnings
eg. cpio: dev/console: Cannot mknod: Operation not permitted
Warning because the initrd.gz content is extracted but provide an exit
code different from 0…
2022-02-01 13:31:17 +01:00
Jeremy Gardais a86359dc4e
Fix gparted error message 2022-02-01 11:22:12 +01:00
Jeremy Gardais 1cb1fc0ff5
Exit with error if new version is empty 2022-02-01 11:19:40 +01:00
Jeremy Gardais 8e7e68c373
Manage error on unzip archive 2022-01-28 20:16:35 +01:00
Jeremy Gardais 8853575109
Improve scripts (debug mode, error,…) 2022-01-28 19:12:54 +01:00
Jeremy Gardais 755dd24873
Upgrade iwlwifi drivers to version 20210818-1
See : http://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/
2022-01-13 16:09:08 +01:00
Jeremy Gardais a2a9aabcf0
Use long format for options 2021-11-12 11:52:36 +01:00
Jeremy Gardais 4835bc811e
Improve cleaning of unwanted X11 packages 2021-11-12 11:27:56 +01:00
Jeremy Gardais 150e198ae8
Preseed: Remove purge_lvm_from_device
This option is no longer available (since Debian Lenny…) [partman-auto
sources].
The LVM configuration need to be manually removed with :
vgremove VG_NAME

[partman-auto sources]: https://salsa.debian.org/installer-team/partman-auto/-/blob/master/debian/partman-auto.templates
2021-11-02 16:05:59 +01:00
Jeremy Gardais fb5f414572
Update security repo for Bullseye
See :
https://ostechnix.com/upgrade-to-debian-11-bullseye-from-debian-10-buster/
2021-09-28 11:50:07 +02:00
Jeremy Gardais ad1afb5d04
Debian Bullseye is the new Stable version 2021-08-19 17:14:01 +02:00
Jeremy Gardais 27448fee7d
Use deb.debian.org fastly instead of ftp.fr.… URL 2021-08-02 18:09:55 +02:00
Jeremy Gardais d519e12ffd
scripts/ Use deb.debian.org fastly instead of ftp.fr 2021-08-02 18:00:29 +02:00
Jeremy Gardais b0d6c5f152
Add preseed for compute node with Bullseye 2021-08-02 16:14:10 +02:00
Jeremy Gardais 50ba3d7a14
Update PXE files to last version from Bullseye 2021-07-28 12:28:14 +02:00
Jeremy Gardais a68631b343
gpxelinux.0 no longer available in deb package 2021-07-28 12:24:08 +02:00
Jeremy Gardais 6327caf838
Manage a correct vim package
Install vim-nox and remove vim-tiny
2021-05-27 07:59:18 +02:00
Jeremy Gardais ac768fe195
Bullseye: Add Gnome3 preseeds (UEFI+LUKS or UEFI) 2021-05-07 09:06:43 +02:00
Jeremy Gardais 8cb2e08a1d
Bullseye: Add Cinnamon preseed (+uefi + LUKS) 2021-05-07 09:06:06 +02:00
Jeremy Gardais ff8c267347
Bullseye: new latecommand script (update packages,…) 2021-05-04 17:33:02 +02:00
Jeremy Gardais 76c6d5b9e1
Bullseye: Basic preseed file 2021-05-04 17:32:53 +02:00
Jeremy Gardais b6914dfe8e
Download Debian Bullseye 2021-05-03 14:45:23 +02:00
Jeremy Gardais 416a6629b3
Upgrade iwlwifi firmware to version 20210315 2021-05-03 10:47:43 +02:00
Jeremy Gardais eeefa08af9
No longer download Wheezy release 2021-05-03 09:17:01 +02:00
Jeremy Gardais c2e3f132c4
Clean some old entries and update readme 2020-04-10 10:18:55 +02:00
Jeremy Gardais 918c75c382
Set Buster as new default (and reorder others) 2020-03-17 19:25:50 +01:00
Jeremy Gardais 76aac83d4c
Remove Wheezy informations 2020-03-17 17:21:29 +01:00
Jeremy Gardais 8b304127be
Buster: Fix preseed to work with LUKS+LVM 2020-03-17 17:14:28 +01:00
Jeremy Gardais 2f47067534
No longer manage Wheezy initrd 2020-03-17 17:07:32 +01:00
Jeremy Gardais b78de6d7b4
Upgrade to use initrd with XZ format 2020-01-10 10:24:59 +01:00
Jeremy Gardais cb819dbc11
Now use xz format to halve the size of initrd 2020-01-10 10:02:54 +01:00
Jeremy Gardais 92876e46d6
Update the version of iwlwifi firmware to Buster 2020-01-10 10:01:40 +01:00
Jeremy Gardais 4fd0b71de8
Add an entry for Debian Cinnamon UEFI with Cipher 2020-01-09 11:26:34 +01:00
Jeremy Gardais 497122a775
Upgrade Gparted to version 1.0.0-5 2019-12-27 07:26:01 +01:00
Jeremy Gardais 6952ff5276
Use ext3 instead of ext2 for /boot 2019-12-20 15:40:18 +01:00
Jeremy Gardais 4fad767821
Stretch: Manage grub-efi installation 2019-03-08 09:07:14 +01:00
Jeremy Gardais 0d52b1b7a1
Add an entry for Stretch + Cipher 2019-03-08 09:05:48 +01:00
Jeremy Gardais b6f422ba74
Fix preseed path for buster + gnome + uefi + luks 2019-03-07 15:22:29 +01:00
Jeremy Gardais 14333faaa0
Add entry for Debian Buster + Gnome + Uefi + LUKS 2019-03-07 14:53:16 +01:00
Jeremy Gardais 01d861ad4e
Remove X11 support if unwanted 2019-03-05 19:09:37 +01:00
Jeremy Gardais 96d1db0a87
Clean Jessie's late_command script config files 2019-01-24 17:27:32 +01:00
Jeremy Gardais 2d9e48c0ba
Rename Stretch's script for late_command 2019-01-24 17:19:33 +01:00
Jeremy Gardais 5f538636e9
Ensure to call Sid's script in late_command 2019-01-24 17:17:08 +01:00
Jeremy Gardais 8e6ad8acef
Create a specific post script for Debian Sid 2019-01-24 17:15:19 +01:00
Jeremy Gardais a324d64f07
Add Unstable entry with Luks, uefi and btrfs 2019-01-24 16:27:03 +01:00
Jeremy Gardais 11ce0521cf
Small fix (indent, ext2 instead of ext4,…) 2019-01-24 16:26:16 +01:00
Jeremy Gardais 96c2d8fc13
Fix header of rsyslog's config files 2019-01-21 14:46:08 +01:00
Jeremy Gardais 2983239fcc
Fix logrotate conf for *tmp logs 2019-01-21 11:51:17 +01:00
Jeremy Gardais 98e3feb911
If nvme is available, choose it first 2019-01-16 15:20:41 +01:00
Jeremy Gardais a3a9399a92
Add preseed for Debian Buster Cinnamon + UEFI 2019-01-10 14:20:43 +01:00
Jeremy Gardais bc7ee25afb
Manage grub-efi installation 2019-01-10 13:33:19 +01:00
Jeremy Gardais 15168cad49
Set to minimum the dhcpv6 timeout
We don't have an IPv6 infrastructure…
Also disable by the default the WEP key question.
2019-01-10 11:23:11 +01:00
Jeremy Gardais 1311f8b8b0
Add a new preseed value for VG size
From Debian Buster, this is asked by the Debian-Installer.
2019-01-10 11:20:38 +01:00
Jeremy Gardais 5ac99225bb
All preseed vars can be found in Debian's sources 2019-01-09 15:13:26 +01:00
Jeremy Gardais caf81c15fa
Don't remove some x11's apps dependancies
And update latecommand archive
2019-01-07 19:29:14 +01:00
Jeremy Gardais 3cac3041f5
Ensure to use a network mirror 2019-01-07 13:26:32 +01:00
Jeremy Gardais 938d69a4ae
Preseed some expert install questions 2019-01-04 15:10:15 +01:00
Jeremy Gardais 50ab78be6f
Update latecommand archive 2019-01-04 15:09:54 +01:00
Jeremy Gardais 749b1cf93b
Set a specific post script for Debian Buster 2019-01-04 15:08:44 +01:00
Jeremy Gardais 960956fa10
Set APT conf and sources.list for Debian Buster 2019-01-04 15:04:51 +01:00
Jeremy Gardais d008fc3355
Set new logrotate conf for Buster
Some configuration needs the new "v6+" directives to be applied.
2019-01-04 15:03:39 +01:00
Jeremy Gardais 5f36a0e9b0
Set rsyslog conf for Buster
Some minor changes might not work with Stretch
2019-01-04 15:03:09 +01:00
Jeremy Gardais 8e7cea8c7b
Start Debian Buster test 2019-01-03 16:55:48 +01:00
Jeremy Gardais 7d958c8976
Add Debian testing/buster preseed 2019-01-03 16:52:39 +01:00
Jeremy Gardais 8f5f8f9a53
Small fix to preseed files 2019-01-03 16:08:28 +01:00
Jeremy Gardais 6d64f11b9d
Add a preseed file for Debian Sid 2018-12-28 11:23:16 +01:00
Jeremy Gardais ac33910591
Avoid the question for additionnal cd/dvd 2018-12-27 21:21:52 +01:00
Guillaume Raffy 0e3b7b558d fixed syntax error that caused the "IPAPPEND 2" option to have no effect
see Bug 2482 - debian stretch dhcp network autoconfiguration fails on physix89
2018-10-23 16:29:34 +02:00
Jeremy Gardais 1585e6f84e Ensure to have systemd basic packages
Such as dbus and libpam-systemd.
Also ensure to purge useless configuration files.
2018-02-15 19:03:12 +01:00
Jeremy Gardais 8b38c181d3 Correct the removal of existing files
Don't remove anymore the debian installer directory ! Some others
scripts might write some data (eg. make_debian_initrd_with_firmware.sh)
Remove the sample menu.cfg.
2018-02-15 16:56:26 +01:00
Jeremy Gardais e73c89c4cd Don't try to unlink lts file if link doesn't exists 2018-02-15 16:52:51 +01:00
Jeremy Gardais 96c4d3ceff Update README.md 2018-02-14 10:58:02 +01:00
Jeremy Gardais 987315a355 Turn to silent some commands 2018-02-14 10:56:23 +01:00
Jeremy Gardais c985da0564 Ensure to install unzip dependancie if not available 2018-02-14 10:28:31 +01:00
Jeremy Gardais a54ecc428c Ensure to use the correct TFTP_ROOT_DIR
If tftpd-hpa is available, ensure to source it's preferences file.
Otherwise, define a default TFTP_DIRECTORY var.
2018-02-14 10:25:14 +01:00
Jeremy Gardais 1654bf7683 Add uefi support for pxe boot
close #15
Add the uefi files in subdir and symlinks to avoid files duplication.
2018-02-12 17:29:08 +01:00
Jeremy Gardais 96b74ca2d9 Avoid "cp cannot stat" issue by moving wildcard outside the variable. 2018-01-30 17:56:26 +01:00
Jeremy Gardais 203f3bb27f Add some default APT configuration and ensure to update repos and packages. 2018-01-30 17:18:47 +01:00
Jeremy Gardais 4dde22c1c2 Move default Rsyslog configuration to multiple files. 2018-01-30 17:08:52 +01:00
Jeremy Gardais d44d9436db Ensure to copy all logrotate configuration files. 2018-01-30 17:04:28 +01:00
Jeremy Gardais e28c606751 Ensure to copy all rsyslogd configuration files. 2018-01-30 17:03:10 +01:00
Jeremy Gardais 10ff11e346 Create a specific tree for Debian Stretch. 2018-01-30 16:53:57 +01:00
Jeremy Gardais 31866bab58 Add a ".d" suffix to all olddir directories for logrotate. 2018-01-30 16:48:12 +01:00
Jeremy Gardais 7436979bb1 Remove tasksel only if no X session was installed (see #17). 2018-01-02 12:25:18 +01:00
Jeremy Gardais 6349f8393e Gnome preseed is now only available with UEFI (see #20). 2018-01-02 11:51:18 +01:00
Jeremy Gardais 4176528451 Do not use wireless interface for installation (see #19). 2018-01-02 11:43:37 +01:00
Jeremy Gardais ec77a644f8 Update latecommand.tar.gz. 2017-12-08 16:44:35 +01:00
Jeremy Gardais 2958b269d8 Ensure to have minimal documentation available on the system. 2017-12-08 16:20:39 +01:00
Jeremy Gardais 4a42dbddd7 task-english is removed (see #18). 2017-12-08 16:19:56 +01:00
Jeremy Gardais 5587546a10 task-french is removed (see #18). 2017-12-08 16:17:05 +01:00
Jeremy Gardais 87c22d65dc task-ssh-server is removed (see #18). 2017-12-08 16:06:42 +01:00
Jeremy Gardais d03c3baad4 Manage packages before managing logs. 2017-12-06 15:52:51 +01:00
Jeremy Gardais 794848eadb Installation of aptitude, puppet, tmux and zsh move to latecommand script (post.sh). 2017-12-06 15:38:04 +01:00
Jeremy Gardais b4f7e65a27 No longer define zsh as default shell for root. 2017-12-06 15:27:20 +01:00
Guillaume Raffy 2f500af760 Bug 2047 - créer un preseed stretch pour les noeuds de calcul
created preseed by injecting the partition recipe of wheezy cluster into a normal stretch amd64 preseed
2017-12-06 12:26:40 +01:00
Jeremy Gardais 4e0a09ce4e Ubuntu: replace wily (15.10) support with artful (17.10). 2017-12-05 15:25:47 +01:00
Jeremy Gardais 5e382af53f The laptop (latitude 7480) needs the last version of firmware-iwlwifi. 2017-12-01 14:50:31 +01:00
Jeremy Gardais 725bb1f978 Add firmware-iwlwifi from Debian Stretch.
Need to support iwlwifi-8265.
2017-12-01 14:17:25 +01:00
Jeremy Gardais 2792fb288e Add an UEFI entry to manage specific partitions (see #16). 2017-11-30 15:09:42 +01:00
Jeremy Gardais 68235772b0 Ensure to not purge tasksel anymore… (see #17). 2017-11-30 15:07:30 +01:00
Jeremy Gardais 7e58a7ffab Rename label to follow the new Debian Stable. 2017-11-27 18:11:41 +01:00
Jeremy Gardais e478cd3c60 Remove old useless jessie entries
Minion, non auto,…
2017-11-27 18:09:19 +01:00
Jeremy Gardais af1c1ab7d1 Remove the "\" for Rsyslog 'messages' definition. 2017-09-11 14:54:45 +02:00
Jeremy Gardais e996af165d Ensure to create olddir (/var/log/messages.d) for 'messages' log (see #12). 2017-09-11 11:05:17 +02:00
Jeremy Gardais 542fa4b286 Ensure to install `python-apt`|Ansible dependencie (fix #14). 2017-09-06 16:12:37 +02:00
Jeremy Gardais 6d28c12b7f Standard task is no longer install for Debian Stretch with preseed (see #14). 2017-09-06 16:08:44 +02:00
Jeremy Gardais 35b324b7b4 version 0.4.0 2017-09-06 12:05:40 +02:00
Jeremy Gardais 7acc0ca6e5 Update doc. 2017-09-06 12:04:23 +02:00
Jeremy Gardais d9f5eedc7d Rsyslog: add empty line (fix #13). 2017-09-06 11:44:34 +02:00
Jeremy Gardais dea007b177 Update latecommand tar. 2017-09-05 17:25:01 +02:00
Jeremy Gardais 4dfa242d07 Correct aptitude logpath… 2017-09-05 17:23:46 +02:00
Jeremy Gardais 281bf45c23 Stretch doesn't need puppet package anymore. 2017-09-05 17:10:11 +02:00
Jeremy Gardais fc15f8ff95 Rsyslog : Don't need to delete log files to create directories. 2017-09-05 17:08:07 +02:00
Jeremy Gardais 0d73ba8b9d Rsyslog : No longer move log to differents directories (#12). 2017-09-05 17:06:46 +02:00
Jeremy Gardais 3300def39a Upgrade rsyslog conf to last Debian Stretch version. 2017-09-05 17:06:15 +02:00
Jeremy Gardais 019e4b32db Set a new logrotate config (#12). 2017-09-05 17:04:52 +02:00
Jeremy Gardais 8c64644a93 Add a copy of post.sh to ensure Debian before Stretch keep launch a working post-install script (see #12). 2017-09-05 16:11:10 +02:00
Jeremy Gardais fa36c470ad Manage to reinstall useful doc/manpages if task-french was installed (#10). 2017-08-20 17:03:39 +02:00
Jeremy Gardais 530e058488 in-target doesn't like the vars… #7 2017-08-20 16:13:15 +02:00
Jeremy Gardais 02e19fdb25 Ensure to have aptitude available. 2017-08-20 16:08:15 +02:00
Jeremy Gardais 901c1e8f82 Add a archive of latecommand scripts for some users which may prefer web
download instead of tftp.
2017-08-20 15:53:36 +02:00
Jeremy Gardais 488f0d406d Remove tasksel #10 2017-08-20 15:51:14 +02:00
Jeremy Gardais 03b1bcd3e1 Ensure to allow root connection with ssh. 2017-06-23 15:05:00 +02:00
Jeremy Gardais 982525a236 Ensure to install aptitude and the default empty size. Update stretch
name in comments.
2017-06-23 14:57:07 +02:00
Jeremy Gardais b39470a49d Update script to adapt to the new Debian Stable. 2017-06-23 14:49:33 +02:00
Jeremy Gardais 3d051297d4 Ensure to use the initrd with additionnals firmwares for Debian Stretch/amd64 2017-04-13 10:54:01 +02:00
Jeremy Gardais 4830a30629 Add an entry to install Debian Stable with Mate environnment for i386 computers. 2017-04-04 10:55:02 +02:00
Jeremy Gardais 7d71a422fd Add a nvme0n1 disk to allow auto-partition from the preseed file for new SSD connection. 2017-04-04 10:51:04 +02:00
Jeremy Gardais 5115132de4 Add information about update netboot installer after each point release (#5). 2017-02-15 11:06:45 +01:00
Jeremy Gardais 439efc750d Remove useless quotes. 2017-02-15 10:29:26 +01:00
Jeremy Gardais c0bbece614 Ensure to ignore temp directory and Debian's packages. 2017-02-15 10:22:24 +01:00
Jeremy Gardais 2338dbcffa List URLs to got latest version of some tools (clonezilla, gparted,…). 2017-02-15 10:15:55 +01:00
Jeremy Gardais 87c5a6a72d Upgrade to latest Gparted version 0.27.0-1 2017-02-15 10:03:15 +01:00
Jeremy Gardais 9b92f3ec39 Upgrade to latest clonezilla version 2.5.0-5 2017-02-15 09:58:08 +01:00
Jeremy Gardais 68de8c8cee Increase the size of lv_tmp for cluster nodes 2016-12-05 16:38:45 +01:00
Jeremy Gardais d727cf2bfa Review logical volumes priority in the recipe see man
partman-auto-recipe.txt
2016-12-01 09:33:49 +01:00
Jeremy Gardais 5bd59c2f05 Increase minimum size for LVM partition for cluster nodes. 2016-11-30 17:02:56 +01:00
Jeremy Gardais e87f9ae6e8 lv_swap is now between 25% of the RAM and 32GB 2016-11-29 14:33:48 +01:00
Jeremy Gardais 0e80552096 size of lv_tmp is now up to 6GB 2016-11-29 14:31:15 +01:00
Jeremy Gardais 9e89be61a5 Remove /home logical volume. 2016-11-29 14:30:01 +01:00
Jeremy Gardais 9626f473e0 Add mountpoint for lv_workl and ensure to remove it from fstab 2016-11-29 09:26:16 +01:00
Jeremy Gardais 5ba9f53b02 Correct the preseed path 2016-11-23 15:05:00 +01:00
Jeremy Gardais 9d300ec2c4 Add a new entry for cluster node with Debian Wheezy 2016-11-23 11:58:36 +01:00
Jeremy Gardais 0087037fec Add a debian preseed for cluster node. 2016-11-23 11:04:34 +01:00
Jeremy Gardais 160b493e8e Ensure to use the NEW IP address ! 2016-09-20 12:13:32 +02:00
Jeremy Gardais e17d700fc0 Ensure to delete the extra LV (lv_free) See #2 2016-09-20 12:05:59 +02:00
Jeremy Gardais b38107d9c4 Add diagnostic tool background 2016-09-19 10:10:46 +02:00
Jeremy Gardais 0c7c9149c4 Add Clonezilla background 2016-09-02 14:22:15 +02:00
Jeremy Gardais 7a07aa8a50 Add an ubuntu background 2016-09-02 13:30:13 +02:00
Jeremy Gardais 3e9e717a16 Add a Debian background #4 2016-09-02 12:12:48 +02:00
Jeremy Gardais d4ecc81659 Update TODO list 2016-09-02 12:12:36 +02:00
Jeremy Gardais e536e257f5 Correct typo 2016-07-29 15:53:20 +02:00
Jeremy Gardais d315aa1236 Debian Stretch's preseed OK (#1) 2016-07-29 15:52:42 +02:00
Jeremy Gardais 974889c4a0 Preseed now use all free space and add a extra locale (fr_FR.UTF-8) 2016-07-29 15:35:24 +02:00
Jeremy Gardais 81bd6ce1fb Update config file for Debian (#1) 2016-07-29 14:55:00 +02:00
Jeremy Gardais fa8a9f0e64 Add preseed for Debian Stretch from Jessie's preseed 2016-07-29 14:09:53 +02:00
Jeremy Gardais 231330fdef scripts now support Debian version since oldStable (wheezy) until it's
LTS
2016-07-29 12:15:03 +02:00
177 changed files with 14311 additions and 717 deletions

2
.gitignore vendored
View File

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

View File

@ -1,3 +1,60 @@
## 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
@ -9,7 +66,6 @@ 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.
@ -48,7 +104,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 firmares for the initrd: **myricom** and **qlogic**. * New firmwares 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

125
README.md
View File

@ -11,7 +11,7 @@
## Overview ## Overview
All needed files to set up a PXE server. All needed files to set up a PXE server for both standard bios and UEFI (32b and 64b).
## Description ## Description
@ -20,24 +20,48 @@ 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
aptitude download pxelinux syslinux-common mkdir bios efi32 efi64
ar p pxelinux*.deb data.tar.xz | tar xJ -C . --strip-components=4 ./usr/lib/PXELINUX/{g,}pxelinux.0 aptitude download pxelinux syslinux-common syslinux-efi
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:
@ -48,21 +72,19 @@ 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 Jessie (Stable) amd64. * Debian Bookworm (Stable) amd64 with additional firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script).
* Debian Jessie (Stable) amd64 with additionnals firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script). * Debian Bookworm (Stable) amd64 with additional firmwares and preseed file.
* Debian Jessie (Stable) amd64 with additionnals firmwares and preseed file. * Debian Bookworm (Stable) amd64 for compute nodes with preseed.
* Debian Jessie (Stable) amd64 for minions with preseed (Mate as default GUI). * 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 (Cinnamon as default GUI). * Debian Bullseye (oldStable) amd64 with additional firmwares and preseed file.
* Debian Jessie (Stable) amd64 for minions with preseed (Gnome 3 as default GUI). * Debian Bullseye (oldStable) amd64 for compute nodes with preseed.
* Debian Jessie (Stable) i386. * Debian Bullseye (oldStable) amd64 + UEFI + LUKS for minions with preseed (Cinnamon 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 + LUKS for minions with preseed (Gnome3 as default GUI).
* Debian Wheezy (oldStable) amd64 with additionnals firmwares and preseed file. * Debian Bullseye (oldStable) amd64 + UEFI for minions with preseed (Gnome3 as default GUI).
* 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 additionnals firmwares (see [make_debian_initrd_with_firmware.sh][debian initrd with firmware script] script). * Debian Sid (unstable) amd64 with additional 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.27.239* 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.203.27* 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:
@ -73,7 +95,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]. 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).
#### Commons configurations #### Commons configurations
* Localization: * Localization:
@ -83,7 +105,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 additionnals firmwares if availables. * Load additional 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
@ -92,7 +114,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 or vda aka virtual hdd) with LVM. * Use the entire first disk (sda, vda aka virtual hdd or nvme0n1) 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:
@ -110,14 +132,12 @@ 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: ftp.fr.debian.org) * Installation from internet (repository: deb.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 additionnals packages: **tmux**, **puppet**, **zsh** and **tftp-hpa** (to be able to download the [latecommand archive from the PXE server][debian latecommand howto]). * Add additional packages: **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.
@ -125,19 +145,35 @@ 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 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. : 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.
#### Specific configurations #### Specific configurations
* You can choose a desktop environment: * You can choose a desktop environment:
* Debian Stable (aka Jessie): Cinnamon, Mate or Gnome3 * Debian Stable (aka Bullseye): Cinnamon 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 |
|---------|-------------|------------------|-------------------------------------------------------------| |---------|-------------|-------------------|-------------------------------------------------------------|
| lv_root | / | 1 - **3** Gb | root partition | | sda1 | /boot/efi | 512 - **1024** Mb | EFI partition (from Buster) |
| lv_home | /home | 2 - **10** Gb | User's home directories (saved files, personnal settings,…) | | lv_root | / | 1 - **3** Gb | root partition |
| lv_srv | NOT PRESENT | NOT PRESENT | | | lv_home | /home | 2 - **10** Gb | User's home directories (saved files, personnal settings,…) |
| 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
@ -146,38 +182,31 @@ 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-rennes1.fr/cellinfo/tftpboot/archive/master.tar.gz` * Download the last archive: `wget https://git.ipr.univ-rennes.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.27.239_: * Set your IP in some files instead of the default one *129.20.203.27*:
* 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 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 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 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 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" {} \;` * 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" {} \;`
* 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 additionnals firmwares: `sudo ./scripts/make_debian_initrd_with_firmware.sh"` * Debian's initrd with additional 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
[preseed jessie]: ./preseed/debian/jessie/preseed.cfg "Debian Jessie preseed" [debian sources]: https://sources.debian.org/
[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 additionnals firmwares" [debian initrd with firmware script]: ./scripts/README.md#make_debian_initrd_with_firmwaresh "informations about the Debian's initrd with additional 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

3
TODO.md Normal file
View File

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

View File

@ -6,7 +6,8 @@
#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
# 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 # 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
@ -23,6 +24,7 @@ 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
@ -48,8 +50,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 myhostname d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string mydomain.fr d-i netcfg/get_domain string unassigned-domain
# 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
@ -77,10 +79,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 ftp.fr.debian.org d-i mirror/http/hostname string deb.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 ftp.fr.debian.org d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -132,7 +134,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 d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -156,35 +158,7 @@ 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 ...
@ -197,7 +171,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 10000000000000000 ext4 \ 16000 100000 -1 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -270,7 +244,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 100000000000 ext4 \ 100 100 -1 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -295,7 +269,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 ftp.fr.debian.org d-i apt-setup/hostname string deb.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
@ -325,7 +299,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 tmux puppet zsh tftp-hpa d-i pkgsel/include string 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
@ -379,9 +353,11 @@ 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 chsh -s /bin/zsh ; \ 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/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.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ 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 tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.jessie.sh

View File

@ -6,7 +6,8 @@
#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
# 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 # 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
@ -23,6 +24,7 @@ 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
@ -48,8 +50,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 myhostname d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string mydomain.fr d-i netcfg/get_domain string unassigned-domain
# 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
@ -77,10 +79,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 ftp.fr.debian.org d-i mirror/http/hostname string deb.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 ftp.fr.debian.org d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -132,7 +134,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 d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -156,35 +158,7 @@ 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 ...
@ -197,7 +171,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 10000000000000000 ext4 \ 16000 100000 -1 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -261,7 +235,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 100000000000 ext4 \ 100 100 -1 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -286,7 +260,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 ftp.fr.debian.org d-i apt-setup/hostname string deb.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
@ -316,7 +290,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 tmux puppet zsh tftp-hpa d-i pkgsel/include string 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
@ -370,9 +344,11 @@ 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 chsh -s /bin/zsh ; \ 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/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.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ 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 tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.jessie.sh

View File

@ -6,7 +6,8 @@
#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
# 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 # 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
@ -23,6 +24,7 @@ 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
@ -48,8 +50,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 myhostname d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string mydomain.fr d-i netcfg/get_domain string unassigned-domain
# 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
@ -77,10 +79,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 ftp.fr.debian.org d-i mirror/http/hostname string deb.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 ftp.fr.debian.org d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -132,7 +134,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 d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -156,35 +158,7 @@ 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 ...
@ -197,7 +171,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 10000000000000000 ext4 \ 16000 100000 -1 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -261,7 +235,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 100000000000 ext4 \ 100 100 -1 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -286,7 +260,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 ftp.fr.debian.org d-i apt-setup/hostname string deb.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
@ -316,7 +290,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 tmux puppet zsh tftp-hpa d-i pkgsel/include string 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
@ -370,9 +344,11 @@ 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 chsh -s /bin/zsh ; \ 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/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.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ 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 tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.jessie.sh

View File

@ -6,7 +6,8 @@
#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
# 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 # 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
@ -23,6 +24,7 @@ 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
@ -48,8 +50,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 myhostname d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string mydomain.fr d-i netcfg/get_domain string unassigned-domain
# 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
@ -77,10 +79,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 ftp.fr.debian.org d-i mirror/http/hostname string deb.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 ftp.fr.debian.org d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -132,7 +134,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 d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -156,35 +158,7 @@ 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 ...
@ -197,7 +171,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 10000000000000000 ext4 \ 16000 100000 -1 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -261,7 +235,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 100000000000 ext4 \ 100 100 -1 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -286,7 +260,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 ftp.fr.debian.org d-i apt-setup/hostname string deb.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
@ -316,7 +290,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 tmux puppet zsh tftp-hpa d-i pkgsel/include string 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
@ -370,9 +344,11 @@ 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 chsh -s /bin/zsh ; \ 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/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.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ 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 tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.jessie.sh

View File

@ -6,9 +6,10 @@
#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
# 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 # 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
@ -23,6 +24,7 @@ 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
@ -48,8 +50,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 myhostname d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string mydomain.fr d-i netcfg/get_domain string unassigned-domain
# 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
@ -77,10 +79,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 ftp.fr.debian.org d-i mirror/http/hostname string deb.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 ftp.fr.debian.org d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -132,7 +134,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 d-i partman-auto/disk string /dev/sda /dev/vda /dev/nvme0n1
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -156,35 +158,7 @@ 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 ...
@ -197,7 +171,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 10000000000000000 ext4 \ 16000 100000 -1 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -270,7 +244,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 100000000000 ext4 \ 16000 100000 -1 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -295,7 +269,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 ftp.fr.debian.org d-i apt-setup/hostname string deb.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
@ -377,8 +351,10 @@ 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.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ 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 tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.jessie.sh

View File

@ -0,0 +1,83 @@
#!/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

BIN
bios/chain.c32 Normal file

Binary file not shown.

1
bios/config Symbolic link
View File

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

1
bios/installer Symbolic link
View File

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

BIN
bios/ldlinux.c32 Normal file

Binary file not shown.

BIN
bios/libcom32.c32 Normal file

Binary file not shown.

BIN
bios/libutil.c32 Normal file

Binary file not shown.

BIN
bios/menu.c32 Normal file

Binary file not shown.

1
bios/preseed Symbolic link
View File

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

BIN
bios/pxelinux.0 Normal file

Binary file not shown.

1
bios/pxelinux.cfg Symbolic link
View File

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

BIN
bios/reboot.c32 Normal file

Binary file not shown.

BIN
bios/vesamenu.c32 Normal file

Binary file not shown.

BIN
chain.c32

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,14 +1,16 @@
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.27.239/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.203.27/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.27.239/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.203.27/installer/clonezilla/i686/filesystem.squashfs
label separator label separator
menu label ----- menu label -----
label mainmenu label mainmenu

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,65 +1,87 @@
label install MENU BACKGROUND /config/debian/debian_background.jpg
menu label Debian jessie ^amd64
kernel installer/debian/jessie/amd64/linux label stableFirmware
append vga=normal initrd=installer/debian/jessie/amd64/initrd.gz -- quiet menu label ^Debian Bookworm amd64 Firmwares
label installFirmware kernel installer/debian/bookworm/amd64/linux
menu label Debian jessie amd64 ^Firmwares append vga=normal initrd=installer/debian/bookworm/amd64/initrd_firm.xz -- quiet
kernel installer/debian/jessie/amd64/linux label stableAuto
append vga=normal initrd=installer/debian/jessie/amd64/initrd_firm.gz -- quiet menu label Debian ^Bookworm amd64 PRESEED
label installAuto kernel installer/debian/bookworm/amd64/linux
menu label Debian jessie 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.cfg
kernel installer/debian/jessie/amd64/linux label stableNoPartitioning
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 menu label Debian Bookworm amd64 Preseed ^WITHOUT Partitioning
label installMate kernel installer/debian/bookworm/amd64/linux
menu label Debian jessie STAGIAIRE ^Mate 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.without.partitioning.cfg
kernel installer/debian/jessie/amd64/linux label stableComputeNode
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 menu label Debian Bookworm amd64 for ^compute node PRESEED
label installCinnamon kernel installer/debian/bookworm/amd64/linux
menu label Debian jessie STAGIAIRE ^Cinnamon 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.computenode.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_cinnamon.cfg IPAPPEND 2 label stableGnome
label installGnome menu label Debian Bookworm ^Gnome3 + UEFI WITH PRESEED
menu label Debian jessie STAGIAIRE ^Gnome amd64 PRESEED kernel installer/debian/bookworm/amd64/linux
kernel installer/debian/jessie/amd64/linux IPAPPEND 2
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 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
label install
menu label Debian jessie ^i386 label stableCinnamon
kernel installer/debian/jessie/i386/linux menu label Debian Bookworm ^Cinnamon + UEFI WITH PRESEED
append vga=normal initrd=installer/debian/jessie/i386/initrd.gz -- quiet kernel installer/debian/bookworm/amd64/linux
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
menu label Debian wheezy amd64 Firmwares label oldstableFirmware
kernel installer/debian/wheezy/amd64/linux menu label Debian Bullseye amd64 Firmwares
append vga=normal initrd=installer/debian/wheezy/amd64/initrd_firm.gz -- quiet kernel installer/debian/bullseye/amd64/linux
label wheezy append vga=normal initrd=installer/debian/bullseye/amd64/initrd_firm.xz -- quiet
menu label Debian ^wheezy amd64 PRESEED label oldstableAuto
kernel installer/debian/wheezy/amd64/linux menu label Debian Bu^llseye amd64 PRESEED
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 kernel installer/debian/bullseye/amd64/linux
label install IPAPPEND 2
menu label Debian wheezy i386 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
kernel installer/debian/wheezy/i386/linux label oldstableComputeNode
append vga=normal initrd=installer/debian/wheezy/i386/initrd.gz -- quiet menu label Debian Bullseye amd64 for compute node PRESEED
label install kernel installer/debian/bullseye/amd64/linux
menu label Debian wheezy STAGIAIRE Gnome amd64 PRESEED IPAPPEND 2
kernel installer/debian/wheezy/amd64/linux 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
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 label oldstableGnomeCrypto
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 install label unstableFirmware
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.gz -- quiet append vga=normal initrd=installer/debian/sid/amd64/initrd_firm.xz -- quiet
label install label unstableCrypt
menu label Debian sid i386 menu label Debian sid amd64 with BTRFS and LUKS
kernel installer/debian/sid/i386/linux kernel installer/debian/sid/amd64/linux
append vga=normal initrd=installer/debian/sid/i386/initrd.gz -- quiet IPAPPEND 2
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.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -1,18 +1,20 @@
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.27.239/installer/sysresccd/sysrcd.dat append scandelay=5 initrd=installer/sysresccd/initram.igz setkeymap=fr boottftp=tftp://129.20.203.27/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 ip= vga=788 fetch=tftp://129.20.27.239/installer/gparted/amd64/filesystem.squashfs 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
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 ip= vga=788 fetch=tftp://129.20.27.239/installer/gparted/i686/filesystem.squashfs 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
label separator label separator
menu label ------ menu label ------
label mainmenu label mainmenu

View File

@ -1,3 +1,5 @@
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
@ -7,13 +9,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 (15.10) GNU/Linux amd64 menu label Ubuntu ^Latest (17.10) GNU/Linux amd64
kernel installer/ubuntu/wily/amd64/linux kernel installer/ubuntu/artful/amd64/linux
append vga=normal initrd=installer/ubuntu/wily/amd64/initrd.gz -- quiet append vga=normal initrd=installer/ubuntu/artful/amd64/initrd.gz -- quiet
label latest86 label latest86
menu label Ubuntu ^Latest (15.10) GNU/Linux i386 menu label Ubuntu ^Latest (17.10) GNU/Linux i386
kernel installer/ubuntu/wily/i386/linux kernel installer/ubuntu/artful/i386/linux
append vga=normal initrd=installer/ubuntu/wily/i386/initrd.gz -- quiet append vga=normal initrd=installer/ubuntu/artful/i386/initrd.gz -- quiet
label separator label separator
menu label ----- menu label -----

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
efi32/chain.c32 Normal file

Binary file not shown.

1
efi32/config Symbolic link
View File

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

1
efi32/installer Symbolic link
View File

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

BIN
efi32/ldlinux.e32 Normal file

Binary file not shown.

BIN
efi32/libcom32.c32 Normal file

Binary file not shown.

BIN
efi32/libutil.c32 Normal file

Binary file not shown.

BIN
efi32/menu.c32 Normal file

Binary file not shown.

1
efi32/preseed Symbolic link
View File

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

1
efi32/pxelinux.cfg Symbolic link
View File

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

BIN
efi32/reboot.c32 Normal file

Binary file not shown.

BIN
efi32/syslinux.efi Normal file

Binary file not shown.

BIN
efi32/vesamenu.c32 Normal file

Binary file not shown.

BIN
efi64/chain.c32 Normal file

Binary file not shown.

1
efi64/config Symbolic link
View File

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

1
efi64/installer Symbolic link
View File

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

BIN
efi64/ldlinux.e64 Normal file

Binary file not shown.

BIN
efi64/libcom32.c32 Normal file

Binary file not shown.

BIN
efi64/libutil.c32 Normal file

Binary file not shown.

BIN
efi64/menu.c32 Normal file

Binary file not shown.

1
efi64/preseed Symbolic link
View File

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

1
efi64/pxelinux.cfg Symbolic link
View File

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

BIN
efi64/reboot.c32 Normal file

Binary file not shown.

BIN
efi64/syslinux.efi Normal file

Binary file not shown.

BIN
efi64/vesamenu.c32 Normal file

Binary file not shown.

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

@ -0,0 +1,421 @@
# .. 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

@ -0,0 +1,429 @@
# .. 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

@ -0,0 +1,400 @@
# .. 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

@ -0,0 +1,429 @@
# .. 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

@ -0,0 +1,423 @@
# .. 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

@ -0,0 +1,381 @@
# .. 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

@ -0,0 +1,392 @@
# .. 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

@ -0,0 +1,384 @@
# .. 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

@ -0,0 +1,359 @@
# .. 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

@ -0,0 +1,392 @@
# .. 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

@ -0,0 +1,385 @@
# .. 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

@ -0,0 +1,380 @@
# .. 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

@ -0,0 +1,353 @@
####################################################################
# 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

@ -0,0 +1,388 @@
# .. 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

@ -0,0 +1,383 @@
# .. 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

@ -0,0 +1,344 @@
####################################################################
# 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

@ -3,10 +3,11 @@
#################################################################### ####################################################################
## With a PXE boot: ## With a PXE boot:
#label wheezy #label buster
# menu label Debian GNU/Linux Wheezy 64 bits WITH ^PRESEED # menu label Debian GNU/Linux ^Buster 64 bits WITH PRESEED
# kernel installer/debian/wheezy/amd64/linux # kernel installer/debian/buster/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 # 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
@ -23,6 +24,7 @@ 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
@ -38,6 +40,9 @@ d-i keyboard-configuration/xkb-keymap select French
## Network configuration ## 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). # To set a different link detection timeout (default is 3 seconds).
# Values are interpreted as seconds. # Values are interpreted as seconds.
d-i netcfg/link_detection_timeout string 20 d-i netcfg/link_detection_timeout string 20
@ -48,8 +53,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 myhostname d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string mydomain.fr d-i netcfg/get_domain string unassigned-domain
# 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
@ -77,10 +82,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 ftp.fr.debian.org d-i mirror/http/hostname string deb.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 ftp.fr.debian.org d-i mirror/http/mirror string deb.debian.org
d-i mirror/suite string d-i mirror/suite string
@ -89,7 +94,7 @@ d-i mirror/suite string
## Account ## Account
##################################################################### #####################################################################
# Allow login as root? # Allow login as root?
user-setup-udeb passwd/root-login boolean true d-i passwd/root-login boolean true
# Root password in clear text # Root password in clear text
#d-i passwd/root-password password r00tme #d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme #d-i passwd/root-password-again password r00tme
@ -97,7 +102,7 @@ user-setup-udeb passwd/root-login boolean true
d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0 d-i passwd/root-password-crypted password $6$ceGTxMxc$gXajYByJna1cfTjaST3TcF0FfrlSAaEcmCiOMq/DBOuD0tlu8VYQosZPgwcFT4bCuODMErU/fgRxZEeu9c10V0
# Create a normal user account now? # Create a normal user account now?
user-setup-udeb passwd/make-user boolean false d-i passwd/make-user boolean false
## User name ## User name
#d-i passwd/user-fullname string bob #d-i passwd/user-fullname string bob
#d-i passwd/username string bob #d-i passwd/username string bob
@ -132,7 +137,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 d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/init_automatically_partition select custom d-i partman-auto/init_automatically_partition select custom
@ -143,53 +148,45 @@ d-i partman-auto/init_automatically_partition select custom
#d-i partman-auto/method string regular #d-i partman-auto/method string regular
d-i partman-auto/method string lvm 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 # It's ok to have /boot in the LVM
d-i partman-auto-lvm/no_boot boolean false d-i partman-auto-lvm/no_boot boolean false
# Remove old LVM configuration # Remove old LVM configuration
d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span 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 # Remove old RAID configuration
#d-i partman-md/device_remove_md boolean true #d-i partman-md/device_remove_md boolean true
# Confirm to write the LVM partitions # Confirm to write the LVM partitions
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: # Keep that one set to true so we end up with a UEFI enabled
# - atomic: all files in one partition # system. If set to false, /var/lib/partman/uefi_ignore will be touched
# - home: separate /home partition d-i partman-efi/non_efi_system boolean true
# - multi: separate /home, /use, /var and /tmp partitions
#partman-auto partman-auto/choose_recipe select multi
# Or provide own recipe # enforce usage of GPT - a must have to use EFI!
# Regular partition d-i partman-basicfilesystems/choose_label string gpt
# limit:: <min size> <priority> <max size> ## In MB ! d-i partman-basicfilesystems/default_label string gpt
#d-i partman-auto/expert_recipe string \ d-i partman-partitioning/choose_label string gpt
#boot-root :: \ d-i partman-partitioning/default_label string gpt
#40 50 100 ext3 \ d-i partman/choose_label string gpt
#$primary{ } $bootable{ } \ d-i partman/default_label string gpt
#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 ...
d-i partman-auto/expert_recipe string \ d-i partman-auto/expert_recipe string \
boot-root :: \ boot-root :: \
538 538 1075 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
200 200000 250 ext3 \ 200 200000 250 ext3 \
$primary{ } $bootable{ } \ $primary{ } $bootable{ } \
method{ format } format{ } \ method{ format } format{ } \
@ -197,7 +194,7 @@ d-i partman-auto/expert_recipe string \
label{ boot } \ label{ boot } \
mountpoint{ /boot } \ mountpoint{ /boot } \
. \ . \
16000 100000 10000000000000000 ext4 \ 16000 100000 -1 ext4 \
$defaultignore{ } \ $defaultignore{ } \
$primary{ } \ $primary{ } \
method{ lvm } \ method{ lvm } \
@ -261,7 +258,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 100000000000 ext4 \ 100 100 -1 ext4 \
$lvmok{ } \ $lvmok{ } \
in_vg{ sys } lv_name{ lv_free } \ in_vg{ sys } lv_name{ lv_free } \
method{ format } format{ } \ method{ format } format{ } \
@ -272,9 +269,13 @@ d-i partman-auto/expert_recipe string \
## Need to put all free space in a temp logical volume/partition ## Need to put all free space in a temp logical volume/partition
# Otherwise it's the last partition which get all free space # 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 # Automatically partition without confirmation
d-i partman/confirm_write_new_label boolean true d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish d-i partman/choose_partition select finish
d-i partman-md/confirm boolean true
d-i partman/confirm boolean true d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true d-i partman/confirm_nooverwrite boolean true
@ -286,7 +287,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 ftp.fr.debian.org d-i apt-setup/hostname string deb.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
@ -294,16 +295,6 @@ d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true d-i apt-setup/contrib boolean true
# Additional repositories, local[0-9] available # 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 # By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that # using a known gpg key. This setting can be used to disable that
@ -316,7 +307,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 tmux puppet zsh tftp-hpa d-i pkgsel/include string 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
@ -324,6 +315,13 @@ d-i pkgsel/upgrade select full-upgrade
# Participate to Popularity Contest (disable for an unconnected server) # Participate to Popularity Contest (disable for an unconnected server)
d-i popularity-contest/participate boolean true 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
##################################################################### #####################################################################
@ -345,6 +343,9 @@ d-i grub-installer/only_debian boolean true
# OS, which is less safe as it might not be able to boot that other OS. # 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/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 d-i grub-installer/bootdev string default
@ -367,9 +368,10 @@ 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 chsh -s /bin/zsh ; \ d-i preseed/late_command string in-target umount /dev/sys/lv_free ; \
in-target /bin/sed -i 's/without-password/yes/g' /etc/ssh/sshd_config ; \ lvremove -f /dev/sys/lv_free ; \
in-target /usr/bin/tftp 129.20.27.239 -c get scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \ 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 tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.sh

View File

@ -0,0 +1,383 @@
# .. 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

@ -0,0 +1,353 @@
####################################################################
# 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

@ -0,0 +1,363 @@
####################################################################
# 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

@ -0,0 +1,377 @@
####################################################################
# 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

@ -0,0 +1,377 @@
####################################################################
# 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

@ -0,0 +1,385 @@
# .. 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

@ -0,0 +1,353 @@
####################################################################
# 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

@ -0,0 +1,344 @@
####################################################################
# 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

@ -0,0 +1,353 @@
####################################################################
# 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

@ -0,0 +1,389 @@
####################################################################
# 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

@ -0,0 +1,334 @@
# .. 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
################################################################## ]]]

Binary file not shown.

View File

@ -1,77 +0,0 @@
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

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

View File

@ -8,6 +8,7 @@
* [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.
@ -15,51 +16,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 (>=Stable) for both **i386** and **amd64**: The script will provide netboot installers for all Debian (>=oldStable) for both **i386** and **amd64**:
* Store the files to **/var/lib/tftpboot** (default). * Store the files to **/srv/tftp** (default).
* Download Debian Linux kernel and initrd files for all Debian distributions (Stable: **Jessie**; Testing: **Stretch**; Unstable: **Sid**) and for **i386** and **amd64** architectures. * 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.
* 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 **/var/lib/tftpboot** (default). * Store the files to **/srv/tftp** (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 (>=Stable) for **amd64** only: The script will provide Debian's netboot installers with **additionnals firmwares** for all Debian (>=oldStable) for **amd64** only:
* Store the files to **/var/lib/tftpboot** (default). * Store the files to **/srv/tftp** (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: **Jessie**; Testing: **Stretch**; Unstable: **Sid**) for **amd64** architecture only. * Download Debian's initrd files for all Debian distributions (Stable: **Bullseye**; oldStable: **Buster**; oldoldStable: **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 rsyslog (more directories and less files in **/var/log**). * Smarter log management (mainly for rotation and old logs).
* Shorter configuration file and use more files from /etc/rsyslog.d/ * Move `rsyslog` default configuration to two files (__/etc/rsyslog.conf__ and __/etc/rsyslog.d/99syslog.conf__).
* Move log files to directory: * `logrotate` now rotate logs to specific directories (such as __/var/log/syslog.d__, __/var/log/mail/__,…) instead of __/var/log/__.
* _kern_ logs from /var/log/kern.log to __/var/log/kernel/kernel.log__ * Create these new directories.
* _user_ logs from /var/log/user.log to __/var/log/security/user.log__ * Packages:
* _mail_ logs from /var/log/mail.… to __/var/log/mail/mail.…__ * Add minimal packages for a working system (aptitude, tmux and zsh).
* _daemon_ logs from /var/log/daemon.log to __/var/log/syslog/daemon.log__ * Remove some useless packages (nfs rpcbind,…).
* _auth_ logs from /var/log/auth.log to __/var/log/security/auth.log__ * Ensure an openssh-server is available.
* _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:
``` ```
@ -68,8 +69,7 @@ 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 chsh -s /bin/zsh ; \ 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 ; \
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,6 +86,17 @@ 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,52 +1,322 @@
#!/bin/bash #!/bin/bash
# This script do the following: # Purpose {{{
# Download Clonezilla Stable for amd64 and i686 # This script will download Clonezilla Stable installer for both AMD64 and i368
# Make a 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
TFTP_ROOT="/var/lib/tftpboot" # Default value for TFTP's directory
if command -v in.tftpd > /dev/null; then
source /etc/default/tftpd-hpa
else
TFTP_DIRECTORY="/srv/tftp"
fi
CZ_INSTALLER_DIR="${TFTP_ROOT}/installer/clonezilla" CZ_INSTALLER_DIR="${TFTP_DIRECTORY}/installer/clonezilla"
CZ_CONFIG_PXE="${CZ_INSTALLER_DIR}/menu.cfg.example" CZ_CONFIG_PXE="${CZ_INSTALLER_DIR}/menu.cfg.example"
CZ_VERSION="2.4.7-8" # Get latest version from https://clonezilla.org
CZ_VERSION_DEFAULT="$(curl --no-progress-meter https://clonezilla.org/downloads.php | sed --silent 's;.*<b>stable</b>.*<font.*>\(.*\)</font>.*;\1;p')"
# Create directories and config file ## Colors
rm -rf "${CZ_INSTALLER_DIR}" readonly PURPLE='\033[1;35m'
mkdir -p "${CZ_INSTALLER_DIR}" readonly RED='\033[0;31m'
touch "${CZ_CONFIG_PXE}" readonly RESET='\033[0m'
readonly COLOR_DEBUG="${PURPLE}"
# }}}
usage() { # {{{
for ARCH in amd64 i686; do # For available classic architecture cat <<- EOF
CZ_URL="https://osdn.jp/dl/clonezilla/clonezilla-live-${CZ_VERSION}-${ARCH}.zip" usage: $PROGNAME [-d|-h|-v]
CZ_TEMP_FILE="/tmp/clonezilla-live-"${CZ_VERSION}"-"${ARCH}".zip "
# Create and go into directory This script will download Clonezilla Stable for both AMD64 and i368 architectures.
mkdir -p ${CZ_INSTALLER_DIR}/${ARCH}
pushd ${CZ_INSTALLER_DIR}/${ARCH}
# Download and extract only PXE files EXAMPLES:
wget "${CZ_URL}" -O "${CZ_TEMP_FILE}" - Download Clonezilla's to default place (${TFTP_DIRECTORY}).
unzip -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d . ${PROGNAME}
rm -f "${CZ_TEMP_FILE}"
popd - Download a specific version of Clonezilla (default : ${CZ_VERSION_DEFAULT}).
${PROGNAME} --version "2.7.1"
# Config file 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
debug_message "Main \
Create ${CZ_INSTALLER_DIR} tree."
mkdir --parents -- "${CZ_INSTALLER_DIR}" \
|| error_message "Can't create ${CZ_INSTALLER_DIR}/ directory." 1
true > "${CZ_CONFIG_PXE}"
for ARCH in amd64 i686; do # For available classic architectures
#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"
## If this version is not already present on the system
if is_file_absent "${CZ_INSTALLER_DIR}/${ARCH}/${cz_version}"; then
### Recreate directory and go
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_file "${CZ_URL}" "${CZ_TEMP_FILE}"
is_file_empty "${CZ_TEMP_FILE}" \
&& error_message "${CZ_TEMP_FILE} is empty." 3
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
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
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
label live${ARCH}
menu label Clonezilla Live ^${ARCH}
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
EOF
done
# Add separator and menu to sample config file
/bin/cat >> "${CZ_CONFIG_PXE}" << EOF /bin/cat >> "${CZ_CONFIG_PXE}" << EOF
label live${ARCH} label separator
menu label Clonezilla Live ^${ARCH} menu label -----
kernel installer/clonezilla/${ARCH}/vmlinuz label mainmenu
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 menu label ^Back..
menu exit
EOF EOF
done }
# }}}
# Config file # Manage arguments # {{{
/bin/cat >> "${CZ_CONFIG_PXE}" << EOF # This code can't be in a function due to argument management
label separator
menu label ----- if [ ! "${NBARGS}" -eq "0" ]; then
label mainmenu
menu label ^Back.. manage_arg="0"
menu exit
EOF ## 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

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