help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about grub-setup embedding logic


From: Andrey Borzenkov
Subject: Question about grub-setup embedding logic
Date: Fri, 28 Sep 2012 15:43:32 +0400

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]