X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=d15849d660952f457f68c7a0c77527867a242520;hp=a3db19539bfd1ae10327cdad7dda9e122c29c67a;hb=928819975c9429237971613e8e00e756a02606b5;hpb=3814da0657651b293b7e3ef81ef581ca493e1f7d diff --git a/grml-debootstrap b/grml-debootstrap index a3db195..d15849d 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -116,10 +116,12 @@ Bootstrap options: 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 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' - blockdev --rereadpt "${LOOP}" - 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 + 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