From 0452dadf9b0b523a54d186acfbc9c202b6d7cf85 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 13 May 2012 18:02:57 +0200 Subject: [PATCH] VM feature: improve sed command line to replace root=... kernel option Quoting bugreport: | [...] I found an issue which renders | every preconfigured BOOTPARAMS for vmfiles useless. | | Near the end of grml-debootstrap the grub config is changed to boot in | virtual environments. Unfortunately the whole line is replaced to | root=/dev/sda1 and each parameter that was previously set is gone by | then. | | See attached a diff that just replaces the root device string. Thanks: Conny Seidel for bugreport + patch --- grml-debootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grml-debootstrap b/grml-debootstrap index a30deb9..2a6c683 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1031,7 +1031,7 @@ finalize_vm() { einfo "Adjusting grub.cfg for successful boot sequence." # ugly but needed to boot grub acordingly sed -i "s;set root=.*;set root='(hd0,msdos1)';" "${MNTPOINT}"/boot/grub/grub.cfg - sed -i "s; root=/dev/.*; root=/dev/sda1;" "${MNTPOINT}"/boot/grub/grub.cfg + sed -i "s;root=[^ ]\+;root=/dev/sda1;" "${MNTPOINT}"/boot/grub/grub.cfg umount "${MNTPOINT}" kpartx -d "${ORIG_TARGET}" >/dev/null -- 2.1.4