mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-11-24 22:16:14 +00:00
1050e66c8f
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>
14 lines
284 B
INI
14 lines
284 B
INI
@SERIAL_CONFIG@
|
|
@TERMINAL_CONFIG@
|
|
|
|
set default="0"
|
|
set timeout="@TIMEOUT@"
|
|
search -l kernel -s root
|
|
|
|
menuentry "@TITLE@" {
|
|
linux /boot/vmlinuz @GPT_ROOTPART@ @CMDLINE@ noinitrd
|
|
}
|
|
menuentry "@TITLE@ (failsafe)" {
|
|
linux /boot/vmlinuz failsafe=true @GPT_ROOTPART@ @CMDLINE@ noinitrd
|
|
}
|