From b9bbd4c38e3882bb8feb961ffddef3204742fc4f Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Fri, 23 Apr 2021 22:09:22 +0700 Subject: [PATCH] grub: Add items boot with local drive for grub-pc (iso) use/grub/localboot, use/grub/sdab similar to use/syslinux/localboot, use/syslinux/sdab. --- features.in/grub/cfg.in/10localboot_bios.cfg | 13 +++++++++++++ features.in/grub/cfg.in/95sdab_bios.cfg | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 features.in/grub/cfg.in/10localboot_bios.cfg create mode 100644 features.in/grub/cfg.in/95sdab_bios.cfg diff --git a/features.in/grub/cfg.in/10localboot_bios.cfg b/features.in/grub/cfg.in/10localboot_bios.cfg new file mode 100644 index 00000000..1443cfd9 --- /dev/null +++ b/features.in/grub/cfg.in/10localboot_bios.cfg @@ -0,0 +1,13 @@ +if [ "$grub_platform" = "pc" ]; then + menuentry "Boot from hard drive" { + insmod part_msdos + insmod chain + set oldroot="$root" + if [ "$root" = hd0 ] + then set root=(hd1) + else set root=(hd0) + fi + chainloader +1 + set root="$oldroot" + } +fi diff --git a/features.in/grub/cfg.in/95sdab_bios.cfg b/features.in/grub/cfg.in/95sdab_bios.cfg new file mode 100644 index 00000000..43b4a6d8 --- /dev/null +++ b/features.in/grub/cfg.in/95sdab_bios.cfg @@ -0,0 +1,19 @@ +if [ "$grub_platform" = "pc" ]; then + menuentry "Boot from 1st hard/flash drive" { + insmod part_msdos + insmod chain + set oldroot="$root" + set root=(hd0) + chainloader +1 + set root="$oldroot" + } + + menuentry "Boot from 2st hard/flash drive" { + insmod part_msdos + insmod chain + set oldroot="$root" + set root=(hd1) + chainloader +1 + set root="$oldroot" + } +fi