Grub1 had explicit step for embedding stage1.5(2) and it was possible
to specify exact location of stage1.5(2) (also in form of block list)
when installing bootloader.

I am under impression that in GRUB2 both embedding and installing of
bootloader are performed in single step (correct me if I'm wrong). So
my understanding is

- grub-setup always tries to embed core.img in device given as
argument (grub-setup /dev/foo)
- if device is full disk, it tries to embed core.img in MBR gap (let's
leave GPT and UEFI aside for a moment). Full disk is assumed if
partition table is found.
- if device is partition, it tries to embed core.img in space,
provided by filesystem in partition, assuming it exists and is known
to provide this space
- if there is no space (does not fit in MBR gap, unknown filesystem or
filesystem that does not have space for it) it is using file from boot
filesystem directly as blocklist
- finally, boot.img is always written directly into the first sector
of device given

Is the above correct?

Thank you!

-andrey

_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to