From e78a59cc65a3f6a85c8e7bd5d3932fc5f864a978 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Wed, 24 Apr 2024 10:31:12 +0000 Subject: [PATCH] grub_install: Use hd0,gpt1 as a hint when searching for root In the context of load.cfg in the memdisk, root is set to memdisk, so passing it as a hint to search is not helpful. While we don't know for sure whether hd0 is the boot disk, it's a safe hint for most situations. Signed-off-by: Jeremi Piotrowski --- build_library/grub_install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_library/grub_install.sh b/build_library/grub_install.sh index db83d614a1..9190f6ec10 100755 --- a/build_library/grub_install.sh +++ b/build_library/grub_install.sh @@ -141,10 +141,11 @@ done info "Generating ${GRUB_DIR}/load.cfg" # Include a small initial config in the core image to search for the ESP # by filesystem ID in case the platform doesn't provide the boot disk. -# The existing $root value is given as a hint so it is searched first. +# $root points to memdisk here so instead use hd0,gpt1 as a hint so it is +# searched first. ESP_FSID=$(sudo grub-probe -t fs_uuid -d "${LOOP_DEV}p1") sudo_clobber "${ESP_DIR}/${GRUB_DIR}/load.cfg" <