On 14/08/2024 at 03:59, Martin-Éric Racine wrote:
You're welcome to suggest a better recipe.
insmod chain
insmod boot # not sure it is useful
set root=usb0
chainloader +1
But once loaded, the MBR boot code needs to access the USB drive via
BIOS disk services, and it won't work if the BIOS does not expose the
USB drive.
Actually, it turns out that even installing this isn't practical on
anything else than media with a GTP partition. It won't fit into the
start of a DOS partition, whereas GTP always leaves plenty of empty
space at the start.
What are you talking about ? 'grub-install --disk-module=native
/dev/sdX' ? Do you mean "GPT" instead of "GTP" ? Do you mean "DOS
partition table" instead of "DOS partition" ?
By today standards (1-MiB alignment) there is as much unallocated space
after a DOS partition table and a GPT partition table. Only very old
partitioning tools used cylinder alignment with the first partition
starting at sector 63, which leaves ~31 KiB for GRUB core image. A core
image embedding native disk drivers may not fit there. Besides, GRUB can
use the unallocated space after the partition table only on DOS, not on
GPT. GPT must have a "BIOS boot" partition instead.