Skip to content

Instantly share code, notes, and snippets.

@disaster123
Created August 11, 2020 08:50
Show Gist options
  • Save disaster123/d57adba4e3917ebbbb7dfbd812ec43f0 to your computer and use it in GitHub Desktop.
Save disaster123/d57adba4e3917ebbbb7dfbd812ec43f0 to your computer and use it in GitHub Desktop.
tt
# The following is useful for preseed installing to a machine with multiple drives. Otherwise, uncomment the line ending in /dev/sda.
d-i partman/early_command string debconf-set partman-auto/disk
"$(list-devices disk | head -n1)"
# d-i partman-auto/disk string /dev/sda
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/method string crypto
# d-i partman-crypto/passphrase password
# d-i partman-crypto/passphrase-again password
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman/default_filesystem string ext4
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/early_command string \
USBDEV=$(list-devices usb-partition | sed "s/\(.*\)./\1/");\
BOOTDEV=$(list-devices disk | grep -v "$USBDEV" | head -1);\
debconf-set partman-auto/disk $BOOTDEV;\
debconf-set grub-installer/bootdev $BOOTDEV; \
umount /media;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment