Hyperv Debian + UEFI

This commit is contained in:
Greg Hellings
2023-12-30 05:37:32 +00:00
parent 76abdb9132
commit b11669345e
112 changed files with 468 additions and 850 deletions
+2 -2
View File
@@ -6,13 +6,13 @@ iso = {
}
boot_wait = "3s"
boot_command = [
"<enter><enter><wait1><f6><esc><wait><bs><bs><bs><bs>",
"e<wait><down><down><down><end><bs><bs><bs>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall ds=nocloud<enter><wait>"
"autoinstall ds=nocloud<f10>"
]
cd_files = [
"distros/ubuntu/20.04/disc/*"
+11 -1
View File
@@ -28,12 +28,22 @@ autoinstall:
allow-pw: yes
user-data:
disable_root: false
package_update: false # These will be done by Ansible after install
package_update: false
package_upgrade: false
late-commands:
- 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
- >-
curtin in-target --target=/target --
bash -c 'if [ "$(systemd-detect-virt)" == "microsoft" ]; then
apt-get update;
apt-get install -y linux-azure;
fi'
# There is no efibootmgr in the install CD, so we need in-target to fetch the data first
- |-
TARGET="$(curtin in-target --target=/target -- efibootmgr | grep -i ubuntu | awk '{print $1}' | sed -E 's/[^0-9]//g')"
curtin in-target --target=/target -- efibootmgr --bootnext "${TARGET}"
- curtin in-target --target=/target -- logger "finished late-commands"
packages:
- ca-certificates
-3
View File
@@ -6,9 +6,6 @@ apt remove cloud-init -y
apt update
apt upgrade -y
# Do some magic with init
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
# Make sshd faster
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
+6 -6
View File
@@ -6,12 +6,12 @@ iso = {
}
boot_command = [
"e<down><down><down><end><bs><bs><bs>",
"console=tty0 <wait>",
"fsck.mode=skip <wait>",
"locale=en_US <wait>",
"auto=true <wait>",
"priority=<wait>critical <wait>",
"autoinstall<wait>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall",
"<F10>",
]
cd_files = [
+10
View File
@@ -34,6 +34,16 @@ autoinstall:
- 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
- >-
curtin in-target --target=/target --
bash -c 'if [ "$(systemd-detect-virt)" == "microsoft" ]; then
apt-get update;
apt-get install -y linux-azure;
fi'
# There is no efibootmgr in the install CD, so we need in-target to fetch the data first
- |-
TARGET="$(curtin in-target --target=/target -- efibootmgr | grep -i ubuntu | awk '{print $1}' | sed -E 's/[^0-9]//g')"
curtin in-target --target=/target -- efibootmgr --bootnext "${TARGET}"
- curtin in-target --target=/target -- logger "finished late-commands"
packages:
- ca-certificates
-3
View File
@@ -6,9 +6,6 @@ apt remove cloud-init -y
apt update
apt upgrade -y
# Do some magic with init
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
# Make sshd faster
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
+6 -6
View File
@@ -6,12 +6,12 @@ iso = {
}
boot_command = [
"e<down><down><down><end><bs><bs><bs>",
"console=tty0 <wait>",
"fsck.mode<wait>=skip <wait>",
"locale=<wait>en_US <wait>",
"auto=true <wait>",
"priority<wait>=critical <wait>",
"autoinstall<wait>",
"console=tty0 ",
"fsck.mode=skip ",
"locale=en_US ",
"auto=true ",
"priority=critical ",
"autoinstall",
"<F10>",
]
cd_files = [
+6
View File
@@ -34,6 +34,12 @@ autoinstall:
- 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
- >-
curtin in-target --target=/target --
bash -c 'if [ "$(systemd-detect-virt)" == "microsoft" ]; then
apt-get update;
apt-get install -y linux-azure;
fi'
- curtin in-target --target=/target -- logger "finished late-commands"
packages:
- ca-certificates
-3
View File
@@ -6,9 +6,6 @@ apt remove cloud-init -y
apt update
apt upgrade -y
# Do some magic with init
sed -i -E -e 's,^(ACTIVE_CONSOLES="/dev/tty).*",\11,' /etc/default/console-setup
# Make sshd faster
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
+1
View File
@@ -7,6 +7,7 @@
provider: vmware-iso
- arch: amd64
provider: hyperv-iso
# linux-azure package broken in 20.04
22.04: *supp
"23.10": *supp
#18.04: *supp # EOL