diff --git a/preseed_debian_12_cinnamon.txt b/preseed_debian_12_cinnamon.txt index 42ee1ab..34e5b6d 100644 --- a/preseed_debian_12_cinnamon.txt +++ b/preseed_debian_12_cinnamon.txt @@ -37,9 +37,25 @@ d-i time/zone string Europe/Zurich d-i clock-setup/ntp boolean true ### Partitionnement +# Auto-detect the first available disk +d-i partman/early_command string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" d-i partman-auto/method string regular -d-i partman-auto/disk string /dev/sda -d-i partman-auto/choose_recipe select atomic + +# Custom recipe with Btrfs - EFI + Btrfs root partition +d-i partman-auto/expert_recipe string \ + btrfs-root :: \ + 512 512 512 free \ + $iflabel{ gpt } \ + $reusemethod{ } \ + method{ efi } \ + format{ } \ + . \ + 500 10000 -1 btrfs \ + $primary{ } $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ btrfs } \ + mountpoint{ / } \ + . # Confirmer le partitionnement d-i partman-partitioning/confirm_write_new_label boolean true @@ -83,7 +99,9 @@ d-i pkgsel/include string \ flatpak \ firmware-linux-nonfree \ printer-driver-all \ - cups + cups \ + btrfs-progs \ + timeshift # Mise à jour automatique d-i pkgsel/update-policy select install-security-updates @@ -123,6 +141,13 @@ d-i preseed/late_command string \ in-target gsettings set org.cinnamon.desktop.interface icon-theme 'Mint-Y' ; \ in-target gsettings set org.cinnamon.desktop.wm.preferences theme 'Mint-Y' ; \ in-target gsettings set org.cinnamon.theme name 'Mint-Y' ; \ + in-target btrfs subvolume create /@home ; \ + in-target btrfs subvolume create /@snapshots ; \ + in-target mkdir -p /home /snapshots ; \ + in-target mount -o subvol=@home /dev/$(lsblk -nr -o NAME,MOUNTPOINT | grep ' /$' | head -1 | cut -d' ' -f1) /home ; \ + in-target mount -o subvol=@snapshots /dev/$(lsblk -nr -o NAME,MOUNTPOINT | grep ' /$' | head -1 | cut -d' ' -f1) /snapshots ; \ + in-target timeshift --create --comments "Installation initiale" --tags D ; \ + in-target systemctl enable cronie ; \ in-target update-grub # Ne pas demander de confirmation pour les packages diff --git a/preseed_debian_12_standard_ssh.txt b/preseed_debian_12_standard_ssh.txt index b5cfd20..2d85e44 100644 --- a/preseed_debian_12_standard_ssh.txt +++ b/preseed_debian_12_standard_ssh.txt @@ -167,8 +167,8 @@ d-i clock-setup/ntp boolean true # one disk the installer will default to using that, but otherwise the device # name must be given in traditional, non-devfs format (so e.g. /dev/sda # and not e.g. /dev/discs/disc0/disc). -# For example, to use the first SCSI/SATA hard disk: -#d-i partman-auto/disk string /dev/sda +# Auto-detect the first available disk +d-i partman/early_command string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" # In addition, you'll need to specify the method to use. # The presently available methods are: # - regular: use the usual partition types for your architecture @@ -202,25 +202,21 @@ d-i partman-auto/choose_recipe select atomic # just point at it. #d-i partman-auto/expert_recipe_file string /hd-media/recipe -# If not, you can put an entire recipe into the preconfiguration file in one -# (logical) line. This example creates a small /boot partition, suitable -# swap, and uses the rest of the space for the root partition: -#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 1000000000 ext3 \ -# method{ format } format{ } \ -# use_filesystem{ } filesystem{ ext3 } \ -# mountpoint{ / } \ -# . \ -# 64 512 300% linux-swap \ -# method{ swap } format{ } \ -# . +# Custom recipe without swap - use entire disk for root partition +d-i partman-auto/expert_recipe string \ + no-swap :: \ + 1 1 1 free \ + $iflabel{ gpt } \ + $reusemethod{ } \ + method{ efi } \ + format{ } \ + . \ + 500 10000 -1 ext4 \ + $primary{ } $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . # The full recipe format is documented in the file partman-auto-recipe.txt # included in the 'debian-installer' package or available from D-I source