]> gitweb.fluxo.info Git - kvm-manager.git/commitdiff
try to automate booting to d-i
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 6 Aug 2017 21:05:57 +0000 (17:05 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 6 Aug 2017 21:05:57 +0000 (17:05 -0400)
README.md
kvm-manager

index b27080c2b12437458b5b62f3d917767a9971f58c..d60e284a9ac17cf9fa5571207574fbf1c644f579 100644 (file)
--- a/README.md
+++ b/README.md
@@ -37,7 +37,8 @@ Recommendations
 +++++++++++++++
 
  * `openssh-server` : i've been using ssh to access the vm's serial console
-
+ * `debian-installer-netboot` : having one of the d-i netboot packages installed makes guest installation easier
 INSTALLATION
 ------------
 
@@ -101,19 +102,31 @@ additional access to other users.
 At this point, your virtual server is created, however, it has no
 operating system and it has not been started.
 
-There are two options for installing debian onto the virtual server:
+There are three options for installing debian onto the virtual server:
 
+ * debian-installer
  * netboot
  * iso (like a CD install)
 
-To use netboot, make sure you have a working DHCP server running on your
-host server and offering addresses over your bridge interface.
+
+"debian-installer" is the simplest, but it requires that you have one
+of the debian-installer-netboot packages installed
+(e.g. `debian-installer-9-netboot-amd64`):
+
+    touch /home/$GUESTNAME/vms/$GUESTNAME/debian-installer
+
+Once the guest starts with the installer, you can remove this file to
+avoid booting back into the installer.
+
+To use the "netboot" method, make sure you have a working DHCP server
+running on your host server and offering addresses over your bridge
+interface.
 
 Then, indicate that the server should boot via the network with:
 
     touch /home/$GUESTNAME/vms/$GUESTNAME/netboot
 
-Alternatively, you can make a debian boot ISO image:
+Finally, you can make a debian boot ISO image:
 
  *  Make the directory /usr/local/share/ISOs
  *  Create a serial console enabled debian installer.
index a46f26a1d0bc7c2f0269127aab695c55c4c33abb..800bf92d64f5cc4d64bdb17a487397b0102e8bcd 100755 (executable)
@@ -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