summaryrefslogtreecommitdiff
path: root/roles/installer
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-09-21 17:35:44 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-09-21 17:35:44 +0200
commit67ca7366ede4021500c470d0f61ab52866c186f3 (patch)
tree4431c90b00ea38a56ad2a8cd99d6138e2b32bb8e /roles/installer
parentch-prometheus-legacy has been moved now (diff)
fix ubuntu kernel selection for VMs
Diffstat (limited to 'roles/installer')
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j27
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j27
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j27
3 files changed, 9 insertions, 12 deletions
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
index 019e9fcb..893c94e2 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
@@ -57,6 +57,9 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_virtual_machine %}
+d-i base-installer/kernel/image string linux-virtual
+{% endif %}
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.path }}
@@ -79,10 +82,6 @@ d-i preseed/late_command string \
in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \
in-target bash -c "sed -e 's/^\(GRUB_CMDLINE_LINUX_DEFAULT=.*\)splash/\1/' -i /etc/default/grub"; \
in-target bash -c "update-grub"; \
-{% if preseed_virtual_machine %}
- in-target bash -c "apt-get install -y -q --no-install-recommends linux-image-virtual"; \
- in-target bash -c "apt-get purge -y -q linux-image-generic intel-microcode amd64-microcode iucode-tool linux-firmware"; \
-{% endif %}
{% if preseed_no_netplan %}
in-target bash -c "apt-get purge -y -q netplan.io && apt-get autoremove -y -q && rm -rf /etc/netplan"; \
{% endif %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
index 59bb5282..5a5d9ef9 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
@@ -57,6 +57,9 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_virtual_machine %}
+d-i base-installer/kernel/image string linux-virtual
+{% endif %}
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.path }}
@@ -79,10 +82,6 @@ d-i preseed/late_command string \
in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \
in-target bash -c "sed -e 's/^\(GRUB_CMDLINE_LINUX_DEFAULT=.*\)splash/\1/' -i /etc/default/grub"; \
in-target bash -c "update-grub"; \
-{% if preseed_virtual_machine %}
- in-target bash -c "apt-get install -y -q --no-install-recommends linux-image-virtual"; \
- in-target bash -c "apt-get purge -y -q linux-image-generic intel-microcode amd64-microcode iucode-tool linux-firmware"; \
-{% endif %}
{% if preseed_no_netplan %}
in-target bash -c "apt-get purge -y -q netplan.io && apt-get autoremove -y -q && rm -rf /etc/netplan"; \
{% endif %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
index 4b144cef..1fdad6d2 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
@@ -54,6 +54,9 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_virtual_machine %}
+d-i base-installer/kernel/image string linux-virtual
+{% endif %}
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.path }}
@@ -75,10 +78,6 @@ d-i preseed/late_command string \
in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \
in-target bash -c "sed -e 's/^\(GRUB_CMDLINE_LINUX_DEFAULT=.*\)splash/\1/' -i /etc/default/grub"; \
in-target bash -c "update-grub"; \
-{% if preseed_virtual_machine %}
- in-target bash -c "apt-get install -y -q --no-install-recommends linux-image-virtual"; \
- in-target bash -c "apt-get purge -y -q linux-image-generic intel-microcode amd64-microcode iucode-tool linux-firmware"; \
-{% endif %}
in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \
{% if preseed_force_net_ifnames_policy is defined %}
mkdir -p /target/etc/systemd/network; \