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.
This commit is contained in:
Anton Midyukov 2021-04-23 22:09:22 +07:00
parent d36acb28b9
commit b9bbd4c38e
2 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -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