From 536e7ff571614e53702a0f2f8e9e888f8dd87fa5 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 6 Aug 2017 17:05:57 -0400 Subject: try to automate booting to d-i --- kvm-manager | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kvm-manager') diff --git a/kvm-manager b/kvm-manager index a46f26a..800bf92 100755 --- a/kvm-manager +++ b/kvm-manager @@ -98,6 +98,7 @@ up() { CDISO="$OWNERHOME/vms/$VMNAME/cd.iso" NETBOOT="$OWNERHOME/vms/$VMNAME/netboot" + DEBIAN_INSTALLER="$OWNERHOME/vms/$VMNAME/debian-installer" KERNEL="$OWNERHOME/vms/$VMNAME/kernel" INITRD="$OWNERHOME/vms/$VMNAME/initrd" KVMARGS= @@ -110,6 +111,14 @@ up() { if [ "$CMDLINE" ]; then KERNEL_CMDLINE="$CMDLINE" fi + elif [ -e "$DEBIAN_INSTALLER" ] ; then + # FIXME: this should be generalized to pick the version and + # the architecture -- perhaps an empty $DEBIAN_INSTALLER would + # default to the latest sensible version, but its contents + # could otherwise select the version (and the arch if + # specified) + KVMARGS="-kernel /usr/lib/debian-installer/images/9/amd64/text/debian-installer/amd64/linux -initrd /usr/lib/debian-installer/images/9/amd64/text/debian-installer/amd64/initrd.gz -no-reboot" + KERNEL_CMDLINE="console=ttyS0,115200n8 -- console=ttyS0,115200n8" elif [ -e "$NETBOOT" ] ; then BOOTCHOICE=n elif [ -e "$CDISO" ] && [ -e $(readlink -f "$CDISO") ] ; then -- cgit v1.2.3