Improve --vm and --vmfile usage instructions
[grml-debootstrap.git] / grml-debootstrap
index a3db195..d15849d 100755 (executable)
@@ -116,10 +116,12 @@ Bootstrap options:
 
 Options for Virtual Machine deployment:
 
 
 Options for Virtual Machine deployment:
 
-      --vm               Set up a Virtual Machine, instead of plainly installing
-                         to a partition or directory, to be combined with --target,
-                         like: --vm --target /dev/mapper/your-vm-disk
-      --vmfile           Like --vm, but install into a file (raw format).
+      --vm               Set up a Virtual Machine on an existing block device
+                         instead of plainly installing to a partition or
+                         directory. Needs to be combined with --target.
+                         Example: --vm --target /dev/mapper/your-vm-disk
+      --vmfile           Like --vm, but install into a regular file (created by
+                         'qemu-img create -f raw ...') instead.
                          Example: --vmfile --target /mnt/sda1/qemu.img
       --vmsize <size>    Use specified size for size of VM file (default: 2G).
                          Syntax as supported by qemu-img, like: --vmsize 3G
                          Example: --vmfile --target /mnt/sda1/qemu.img
       --vmsize <size>    Use specified size for size of VM file (default: 2G).
                          Syntax as supported by qemu-img, like: --vmsize 3G
@@ -1121,8 +1123,6 @@ prepare_vm() {
   LOOP_PART="$(echo "${DEVINFO##add map }" | sed 's/ .*//')" # 'loop1p1'
   export TARGET="/dev/mapper/$LOOP_PART" # '/dev/mapper/loop1p1'
 
   LOOP_PART="$(echo "${DEVINFO##add map }" | sed 's/ .*//')" # 'loop1p1'
   export TARGET="/dev/mapper/$LOOP_PART" # '/dev/mapper/loop1p1'
 
-  blockdev --rereadpt "${LOOP}"
-
   if [ -z "$TARGET" ] ; then
      eerror "Error: target could not be set to according /dev/mapper/* device." ; eend 1
      bailout 1
   if [ -z "$TARGET" ] ; then
      eerror "Error: target could not be set to according /dev/mapper/* device." ; eend 1
      bailout 1
@@ -1176,6 +1176,14 @@ fi
   chroot "${MNTPOINT}" update-grub
 
   case "$RELEASE" in
   chroot "${MNTPOINT}" update-grub
 
   case "$RELEASE" in
+    jessie)
+      einfo "Applying workaround for GRUB font path bug in jessie (Debian #787685)."
+      mkdir -p "${MNTPOINT}/boot/grub/fonts/"
+      cp "${MNTPOINT}/usr/share/grub/unicode.pf2" "${MNTPOINT}/boot/grub/fonts/"
+      ;;
+  esac
+
+  case "$RELEASE" in
     lenny|squeeze|wheezy)
       einfo "Adjusting grub.cfg for successful boot sequence."
       sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg
     lenny|squeeze|wheezy)
       einfo "Adjusting grub.cfg for successful boot sequence."
       sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg