Autoinstallers for Debian Buster and Ubuntu Bionic
[invirt/packages/invirt-web.git] / code / static / preseed / bionic.preseed
1 # Download packages from mirrors.mit.edu
2 d-i mirror/country string manual
3 d-i mirror/http/countries string manual
4 d-i mirror/http/hostname string mirrors.mit.edu
5 d-i mirror/http/directory string /ubuntu/
6 d-i mirror/http/proxy string 
7
8 # Use time.mit.edu for NTP syncing
9 d-i clock-setup/ntp-server string time.mit.edu
10
11 # Guided partitioning with LVM
12 d-i partman-auto/disk string /dev/xvda
13 d-i partman-auto/method string lvm
14
15 # The atomic recipe in Bionic ignores the boot partition when using the
16 # lvm method; our pygrub can't read /boot on LVM, so we get to provide
17 # an entire recipe.  This is the atomic recipe from Debian Buster,
18 # modified to avoid name collision and to use Ubuntu's preferred sizes
19 # and filesystem for /boot.
20 d-i partman-auto/expert_recipe string \
21 boot-root ::                          \
22                                       \
23 1 1 1 free                            \
24  $iflabel{ gpt }                      \
25  $reusemethod{ }                      \
26  method{ biosgrub } .                 \
27                                       \
28 512 1024 768 ext4                     \
29  $defaultignore{ }                    \
30  method{ format }                     \
31  format{ }                            \
32  use_filesystem{ }                    \
33  filesystem{ ext4 }                   \
34  mountpoint{ /boot } .                \
35                                       \
36 900 10000 -1 $default_filesystem      \
37  $lvmok{ }                            \
38  method{ format }                     \
39  format{ }                            \
40  use_filesystem{ }                    \
41  $default_filesystem{ }               \
42  mountpoint{ / } .                    \
43                                       \
44 100% 512 200% linux-swap              \
45  $lvmok{ }                            \
46  $reusemethod{ }                      \
47  method{ swap }                       \
48  format{ } .                          \
49
50 d-i partman-lvm/device_remove_lvm boolean true
51 d-i partman-lvm/confirm boolean true
52 d-i partman-lvm/confirm_nooverwrite boolean true
53 d-i partman/confirm_write_new_label boolean true
54 d-i partman/choose_partition select finish
55 d-i partman/confirm boolean true
56 d-i partman/confirm_nooverwrite boolean true
57
58 # Use the linux-virtual kernel
59 d-i base-installer/kernel/image string linux-virtual
60
61 # Create just a root account
62 d-i passwd/root-login boolean true
63 d-i passwd/root-password string fake_value
64 d-i passwd/root-password-again string fake_value
65 d-i passwd/make-user boolean false
66
67 # Remove the root password so users can log in on the console
68 # Our pygrub can't read grub2 configs, and grub-legacy isn't in
69 # Ubuntu, but they've provided a tool to help
70 d-i preseed/late_command string in-target passwd -d root; \
71     apt-install pv-grub-menu; \
72     echo "" >>/target/etc/default/grub ; \
73     echo "# Prevent update-menu-lst from prepending /boot to menu.lst kernels and initrds" >>/target/etc/default/grub ; \
74     echo "kernel_dir=" >>/target/etc/default/grub ; \
75     in-target sed -i -e 's/# groot=.*/# groot=(hd0,0)/' /boot/grub/menu.lst; \
76     in-target /usr/sbin/update-menu-lst
77
78 # Avoid that last message about the install being complete.
79 d-i finish-install/reboot_in_progress note