summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/contrib/mkefidisk.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index b7db0a9134..40203ee9cc 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -250,8 +250,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=$TARGET_ROOTFS rw $ROOTWAIT quiet@" $GRUBCFG
+# Replace the ramdisk root (if any) with the install device and include other
+# kernel parameters
+sed -i "s@ root=[^ ]*@ @" $GRUBCFG
+sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw $ROOTWAIT quiet @" $GRUBCFG
# Provide a startup.nsh script for older firmware with non-standard boot
# directories and paths.