Skip to content

Instantly share code, notes, and snippets.

@imccie
Forked from eldondev/cmd
Created August 13, 2020 08:57
Show Gist options
  • Select an option

  • Save imccie/411b2dc2ddeffd43a9ed82b27eb5c957 to your computer and use it in GitHub Desktop.

Select an option

Save imccie/411b2dc2ddeffd43a9ed82b27eb5c957 to your computer and use it in GitHub Desktop.
Because everyone needs a good preseed
qemu-system-x86_64 -machine accel=kvm -m 4G -smp 2 -kernel linux -initrd initrd.gz -net nic -net user,tftp=. -hda /mnt/out/preseed-min.img -append "blacklist=vga16fb fb=false video=false vga=normal auto=true priority=high locale=en_US.UTF-8 kdb-chooser/method=us netcfg/choose_interface=auto hostname=otto domain=example.com url=tftp://10.0.2.2/preseed.cfg" -curses
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string otto
d-i netcfg/get_domain string example.pvt
d-i netcfg/wireless_wep string
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string http://10.0.2.2:3142/
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern
d-i clock-setup/ntp boolean true
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
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
d-i partman-auto-lvm/new_vg_name string system
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-lvm/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman-auto/expert_recipe string \
boot-root :: \
40 300 300 ext4 \
$primary{ } \
$bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
2000 10000 10000 ext4 \
$lvmok{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.\
2000 10000 100000000 ext4 \
$lvmok{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /srv } \
. \
d-i partman-lvm/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman-basicfilesystems/no_swap boolean false
d-i passwd/root-login boolean true
d-i passwd/make-user boolean false
d-i passwd/root-password password r00tme
d-i passwd/root-password-again password r00tme
d-i user-setup/allow-password-weak boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i pkgsel/update-policy select none
tasksel tasksel/first multiselect openssh-server
d-i preseed/late_command string \
in-target sed -i 's/PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config ; \
in-target sh -c "echo GRUB_TERMINAL=console | tee -a /etc/default/grub" ; \
in-target sh -c "grub-install /dev/sda && grub-mkconfig >/boot/grub/grub.cfg"
d-i finish-install/reboot_in_progress note
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string ubuntu
d-i netcfg/get_domain string example.com
d-i netcfg/wireless_wep string
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string http://10.0.2.2:3142/
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern
d-i clock-setup/ntp boolean true
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i passwd/root-login boolean true
d-i passwd/make-user boolean false
d-i passwd/root-password password r00tme
d-i passwd/root-password-again password r00tme
d-i user-setup/allow-password-weak boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i pkgsel/update-policy select none
tasksel tasksel/first multiselect openssh-server
d-i preseed/late_command string \
in-target sed -i 's/PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
d-i finish-install/reboot_in_progress note
d-i debian-installer/exit/poweroff boolean true
qemu-system-x86_64 -machine accel=kvm -m 4G -smp 2 -redir :8024::22 -hda /mnt/out/preseed.img -curses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment