Add Debian (#11)

* Add Debian

Add work for Debian 9, 10, 11 - which are the only ones still under
maintenance at this time

* Remove Virtualbox ISO file after install

* Fix Ubuntu 18.04 virtualbox
This commit is contained in:
Greg Hellings
2022-06-20 14:45:24 -05:00
committed by GitHub
parent cfd9ea5d56
commit 291ebbf82c
12 changed files with 272 additions and 27 deletions
+5
View File
@@ -54,3 +54,8 @@
ansible.builtin.package: ansible.builtin.package:
name: "{{ virtualbox_remove_packages | default([]) }}" name: "{{ virtualbox_remove_packages | default([]) }}"
state: absent state: absent
- name: Remove file
ansible.builtin.file:
path: "{{ virtualbox_iso_location }}"
state: absent
+5
View File
@@ -0,0 +1,5 @@
virtualbox_packages:
- linux-image-amd64
virtualbox_services: []
virtualbox_from_iso: false
virtualbox_iso_location: "{{ ansible_user_dir }}/VBoxGuestAdditions.iso"
@@ -0,0 +1,8 @@
virtualbox_packages:
- dkms
- bzip2
- linux-headers-amd64
- make
virtualbox_services: []
virtualbox_from_iso: true
virtualbox_iso_location: "{{ ansible_user_dir }}/VBoxGuestAdditions.iso"
@@ -0,0 +1,8 @@
virtualbox_packages:
- dkms
- bzip2
- linux-headers-amd64
- make
virtualbox_services: []
virtualbox_from_iso: true
virtualbox_iso_location: "{{ ansible_user_dir }}/VBoxGuestAdditions.iso"
+16
View File
@@ -0,0 +1,16 @@
distro = "debian"
version = "10"
iso = {
url = "https://cdimage.debian.org/cdimage/archive/10.11.0/amd64/iso-cd/debian-10.11.0-amd64-netinst.iso"
checksum = "133430141272d8bf96cfb10b6bfd1c945f5a59ea0efc2bcb56d1033c7f2866ea"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"net.ifnames=0 ",
"biosdevnames=0 ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/debian/10-preseed.cfg ",
"console=ttyS0 ",
"<enter>"
]
+16
View File
@@ -0,0 +1,16 @@
distro = "debian"
version = "11"
iso = {
url = "https://cdimage.debian.org/cdimage/archive/11.2.0/amd64/iso-cd/debian-11.2.0-amd64-netinst.iso"
checksum = "45c9feabba213bdc6d72e7469de71ea5aeff73faea6bfb109ab5bad37c3b43bd"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"net.ifnames=0 ",
"biosdevnames=0 ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/debian/11-preseed.cfg ",
"console=ttyS0 ",
"<enter>"
]
+16
View File
@@ -0,0 +1,16 @@
distro = "debian"
version = "9"
iso = {
url = "https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-netinst.iso"
checksum = "71c7e9eb292acc880f84605b1ca2b997f25737fe0a43fc9586f61d35cd2eb43b"
}
boot_command = [
"<esc><wait>",
"auto ",
"DEBIAN_FRONTEND=text ",
"net.ifnames=0 ",
"biosdevnames=0 ",
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/debian/9-preseed.cfg ",
"console=ttyS0 ",
"<enter>"
]
+2 -1
View File
@@ -10,7 +10,8 @@ boot_command = [
"<esc><wait1>", "<esc><wait1>",
"<f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", "<f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"auto=true priority=critical ", "auto=true priority=critical ",
"DEBIAN_FRONTEND=noninteractive ", "locale=en_US.UTF-8 ",
"DEBIAN_FRONTEND=text ",
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/18.04/preseed.cfg ", "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/18.04/preseed.cfg ",
"fsck.mode=skip ", "fsck.mode=skip ",
"console=ttyS0 ", "console=ttyS0 ",
@@ -1,12 +1,14 @@
d-i debian-installer/locale string en_US d-i debian-installer/locale string en_US
d-i time/zone string UTC
d-i keyboard-configuration/xkb-keymap select us d-i keyboard-configuration/xkb-keymap select us
d-i clock-setup/utc boolean true d-i passwd/root-password-again password vagrant
d-i clock-setup/utc-auto boolean true d-i passwd/root-password password vagrant
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i debian-installer/missing-provide select ${DEFAULT} d-i time/zone string UTC
d-i partman-auto/method string regular d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \ d-i partman-auto/expert_recipe string \
@@ -35,26 +37,22 @@ d-i partman/choose_partition select finish
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
d-i base-installer/excludes string laptop-detect d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i passwd/root-password-again password vagrant tasksel tasksel/first multiselect
d-i passwd/root-password password vagrant d-i pkgsel/include string curl openssh-server sudo python3
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i user-setup/allow-password-weak boolean true
d-i pkgsel/include string curl openssh-server sudo d-i grub-installer/bootdev string default
d-i pkgsel/language-packs multiselect
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/update-policy select none
tasksel tasksel/first multiselect ubuntu-server
d-i finish-install/reboot_in_progress note d-i finish-install/reboot_in_progress note
d-i preseed/late_command string \ d-i preseed/early_command string \
sed -i \
-e "/in-target/i echo 'd() { /sbin/discover \"\$@\" | grep -v virtualbox; }' > /target/etc/discover-pkginstall.conf" \
-e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \
/usr/lib/pre-pkgsel.d/20install-hwpackages
d-i preseed/late_command string \
echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
chmod 440 /target/etc/sudoers.d/vagrant; \ chmod 440 /target/etc/sudoers.d/vagrant
in-target update-initramfs -u
+58
View File
@@ -0,0 +1,58 @@
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
d-i passwd/root-password-again password vagrant
d-i passwd/root-password password vagrant
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i time/zone string UTC
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \
scheme :: \
200 0 200 ext4 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /boot } . \
200% 0 200% linux-swap \
$primary{ } \
method{ swap } \
format{ } . \
1 0 -1 ext4 \
$primary{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } .
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 apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
tasksel tasksel/first multiselect
d-i pkgsel/include string curl openssh-server sudo python3
d-i grub-installer/bootdev string default
d-i finish-install/reboot_in_progress note
d-i preseed/early_command string \
sed -i \
-e "/in-target/i echo 'd() { /sbin/discover \"\$@\" | grep -v virtualbox; }' > /target/etc/discover-pkginstall.conf" \
-e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \
/usr/lib/pre-pkgsel.d/20install-hwpackages
d-i preseed/late_command string \
echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
chmod 440 /target/etc/sudoers.d/vagrant
+58
View File
@@ -0,0 +1,58 @@
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
d-i passwd/root-password-again password vagrant
d-i passwd/root-password password vagrant
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i time/zone string UTC
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \
scheme :: \
200 0 200 ext4 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /boot } . \
200% 0 200% linux-swap \
$primary{ } \
method{ swap } \
format{ } . \
1 0 -1 ext4 \
$primary{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } .
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 apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
tasksel tasksel/first multiselect
d-i pkgsel/include string curl openssh-server sudo python3
d-i grub-installer/bootdev string default
d-i finish-install/reboot_in_progress note
d-i preseed/early_command string \
sed -i \
-e "/in-target/i echo 'd() { /sbin/discover \"\$@\" | grep -v virtualbox; }' > /target/etc/discover-pkginstall.conf" \
-e "/in-target/i echo 'discover=d' >> /target/etc/discover-pkginstall.conf" \
/usr/lib/pre-pkgsel.d/20install-hwpackages
d-i preseed/late_command string \
echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
chmod 440 /target/etc/sudoers.d/vagrant
+61 -5
View File
@@ -1,9 +1,6 @@
d-i debian-installer/locale string en_US.UTF-8 d-i debian-installer/locale string C.UTF-8
d-i debian-installer/language string en d-i keyboard-configuration/xkb-keymap select us
d-i debian-installer/country string US
d-i preseed/include string /preseed/ubuntu-server-minimalvm.seed
d-i preseed/include string ../preseed.cfg
d-i console-setup/ask_detect boolean false d-i console-setup/ask_detect boolean false
@@ -11,9 +8,68 @@ d-i keyboard-configuration/model select USA
d-i keyboard-configuration/layout select USA d-i keyboard-configuration/layout select USA
d-i keyboard-configuration/variant select USA d-i keyboard-configuration/variant select USA
d-i preseed/early_command string ln -s /dev/sda /dev/vda || :
d-i grub-installer/bootdev string /dev/vda d-i grub-installer/bootdev string /dev/vda
d-i netcfg/choose_interface select auto d-i netcfg/choose_interface select auto
d-i mirror/http/mirror select us.archive.ubuntu.com d-i mirror/http/mirror select us.archive.ubuntu.com
d-i mirror/http/proxy string d-i mirror/http/proxy string
d-i time/zone string UTC
d-i clock-setup/utc boolean true
d-i clock-setup/utc-auto boolean true
d-i debian-installer/missing-provide select ${DEFAULT}
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \
scheme :: \
200 0 200 ext4 \
$primary{ } \
$bootable{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ /boot } . \
200% 0 200% linux-swap \
$primary{ } \
method{ swap } \
format{ } . \
1 0 -1 ext4 \
$primary{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } .
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 base-installer/excludes string laptop-detect
d-i passwd/root-password-again password vagrant
d-i passwd/root-password password vagrant
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i user-setup/allow-password-weak boolean true
d-i pkgsel/include string curl openssh-server sudo
d-i pkgsel/language-packs multiselect
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/update-policy select none
tasksel tasksel/first multiselect ubuntu-server
d-i finish-install/reboot_in_progress note
d-i preseed/late_command string \
echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
chmod 440 /target/etc/sudoers.d/vagrant; \
in-target update-initramfs -u