aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorJax Jiang <jax.jiang.007@gmail.com>2022-02-11 01:46:55 +0800
committerChristian Lamparter <chunkeey@gmail.com>2022-02-24 20:45:12 +0100
commit1050e66c8f7c67ab8b3d1895e2559f03baeb2345 (patch)
treebbb5471d905e7163bc6905bd3f0e5d0b4ee6081e /package/boot
parent83f2f1ad5840eae4bd265ffc46f1982571514123 (diff)
downloadupstream-1050e66c8f7c67ab8b3d1895e2559f03baeb2345.tar.gz
upstream-1050e66c8f7c67ab8b3d1895e2559f03baeb2345.tar.bz2
upstream-1050e66c8f7c67ab8b3d1895e2559f03baeb2345.zip
x86: grub2: search for the "kernel" filesystem on all disks
Previously, grub2 was hardcoded to always look on "hd0" for the kernel. This works well when the system only had a single disk. But if there was a second disk/stick present, it may have look on the wrong drive because of enumeration races. This patch utilizes grub2 search function to look for a filesystem with the label "kernel". This works thanks to existing setup in scripts/gen_image_generic.sh. Which sets the "kernel" label on both the fat and ext4 filesystem variants. Signed-off-by: Jax Jiang <jax.jiang.007@gmail.com> Suggested-by: Alberto Bursi <bobafetthotmail@gmail.com> (MX100 WA) (word wrapped, slightly rewritten commit message, removed MX100 WA) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/grub2/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index 9c67ff589b..67b36842ec 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -120,28 +120,28 @@ define Package/grub2/install
-O i386-pc \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
- at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot serial vga
+ at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
- at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
+ at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/eltorito.img \
- at_keyboard biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial test vga
+ at_keyboard biosdisk boot chain configfile iso9660 linux ls part_msdos reboot search serial test vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/legacy-core.img \
- biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
+ biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial vga
endef
define Package/grub2-efi/install