Hyperv Debian + UEFI
This commit is contained in:
@@ -5,12 +5,17 @@ iso = {
|
||||
checksum = "64d727dd5785ae5fcfd3ae8ffbede5f40cca96f1580aaa2820e8b99dae989d94"
|
||||
}
|
||||
boot_command = [
|
||||
"<esc><wait>",
|
||||
"auto ",
|
||||
"DEBIAN_FRONTEND=text ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"console=tty0 ",
|
||||
"--- net.ifnames=0 biosdevnames=0 <wait>",
|
||||
"<enter>"
|
||||
"<down>e<wait><down><down><down><end><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
||||
"auto ",
|
||||
"preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ",
|
||||
"ipv6.disable=1 ",
|
||||
"debian-installer=en_US locale=en_US kbd-chooser/method=us ",
|
||||
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
||||
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
||||
"keyboard-configuration/xkb-keymap=us ",
|
||||
"debconf/frontend=noninteractive ",
|
||||
"hostname={{.Name}} ",
|
||||
"domain=vagrant ",
|
||||
"<f10>"
|
||||
]
|
||||
http_directory = "distros/debian/12/http/"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt autoremove -y
|
||||
# 5 minute timeout for the package lock to arrive
|
||||
apt-get -o DPkg::Lock::Timeout=600 autoremove -y
|
||||
|
||||
# Configure sshd to be faster
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
@@ -14,8 +15,8 @@ apt-get clean
|
||||
|
||||
virt="$(systemd-detect-virt)"
|
||||
if [ "${virt}" == "microsoft" ]; then
|
||||
yum install -y hyperv-daemons
|
||||
systemctl enable hpervfcopyd
|
||||
systemctl enable hypervkvpd
|
||||
systemctl enable hypervvssd
|
||||
apt-get install -y hyperv-daemons
|
||||
systemctl enable hv-fcopy-daemon
|
||||
systemctl enable hv-kvp-daemon
|
||||
systemctl enable hv-vss-daemon
|
||||
fi
|
||||
@@ -1,5 +1,3 @@
|
||||
d-i auto-install/enable boolean true
|
||||
d-i apt-setup/disable-cdrom-entries boolean true
|
||||
d-i debian-installer/locale string en_US
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
|
||||
@@ -15,14 +13,12 @@ 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 \
|
||||
512 50 512 fat32 \
|
||||
$primary{ } \
|
||||
$bootable{ } \
|
||||
method{ format } \
|
||||
method{ efi } \
|
||||
format{ } \
|
||||
use_filesystem{ } \
|
||||
filesystem{ ext4 } \
|
||||
mountpoint{ /boot } . \
|
||||
mountpoint{ /boot/efi } . \
|
||||
200% 0 200% linux-swap \
|
||||
$primary{ } \
|
||||
method{ swap } \
|
||||
@@ -39,13 +35,24 @@ d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
# Settings for package manager
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/cdrom/set-first boolean false
|
||||
d-i apt-setup/cdrom/set-next boolean false
|
||||
d-i apt-setup/cdrom/set-failed boolean false
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/http/hostname string httpredir.debian.org
|
||||
d-i mirror/http/directory string /debian
|
||||
d-i mirror/http/proxy string
|
||||
|
||||
# Package selection
|
||||
tasksel tasksel/first multiselect
|
||||
d-i pkgsel/include string curl openssh-server sudo python3
|
||||
d-i pkgsel/include string curl openssh-server sudo python3 network-manager
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
d-i grub-installer/bootdev string default
|
||||
d-i grub-installer/force-efi-extra-removable boolean true
|
||||
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
@@ -55,8 +62,9 @@ d-i preseed/early_command string
|
||||
-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 !nrequiretty' > /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; \
|
||||
chmod 440 /target/etc/sudoers.d/vagrant; \
|
||||
sed -i -e 's/ens3/ens5/g' /target/etc/network/interfaces; \
|
||||
in-target apt-get update; \
|
||||
in-target apt-get upgrade -y
|
||||
in-target apt-get upgrade -y
|
||||
Reference in New Issue
Block a user