Patchwork [1/2] init-install-efi.sh: Fix root= specification

login
register
mail settings
Submitter Darren Hart
Date Sept. 23, 2013, 8:54 p.m.
Message ID <718a56d2550d5c22a4b35ac8385b1b2a67c2d8e2.1379969542.git.dvhart@linux.intel.com>
Download mbox | patch
Permalink /patch/58619/
State Accepted
Commit e42fefe717b242eed68d1ba7e7ee05d4aa3c4016
Headers show

Comments

Darren Hart - Sept. 23, 2013, 8:54 p.m.
Fixes [YOCTO #5237]

The current grub.cfg manipulation depends on an existing root=
parameter. If this doesn't exist, the correct root= parameter will not
be added.

Instead, remove any existing root= parameters and add the correct one
explicitly.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: mihaix.lindner@linux.intel.com
---
 .../initrdscripts/files/init-install-efi.sh        |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 23228c9..574966e 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -161,8 +161,10 @@  sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
 sed -i "/initrd /d" $GRUBCFG
 # Delete any LABEL= strings
 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
-# Replace the ramdisk root with the install device and include other options
-sed -i "s@ root=[^ ]*@ root=$rootfs rw $rootwait quiet@" $GRUBCFG
+# Delete any root= strings
+sed -i "s/ root=[^ ]*/ /" $GRUBCFG
+# Add the root= and other standard boot options
+sed -i "s@linux /vmlinuz *@linux /vmlinuz root=$rootfs rw $rootwait quiet @" $GRUBCFG
 
 umount /ssd
 sync