Le 25/11/2016 à 19:31, Jan Bakuwel a écrit :
For reasons beyond my understanding grub complains about being
installed in a partition instead of the MBR ("embedding is not
supported and a BAD idea", yet it works fine).
The GRUB BIOS boot loader is split off in three main parts :
- the boot image stored in the MBR or in a partition boot sector (PBR)
- the core image stored in a special area outside a filesystem (called
"embedding") or as a regular file in a filesystem
- modules, config files and so on stored in /boot/grub/
The only purpose of the boot image is to load the core image. The boot
image is a very small program which must fit into a single sector, so it
does not understand any partition table or filesystem format. It reads a
hardcoded list of physical sectors ranges ("blocklists") which contain
the core image.
Embedding of the core image is only (but not always) possible when the
boot image is in the MBR and there is a big enough "embedded area"
between the MBR and the first partition on a DOS/MBR partition table or
a "BIOS boot" partition on a GPT partition table, or when the boot image
is in a partition boot sector and the partition format contains a
suitable area for embedding.
I have yet to find such a partition format, so when installing the boot
image in the PBR of a partition with any usual contents type (ext4, LVM
physical volume, RAID member...), embedding is not possible.
When embedding is not possible, the core image is stored as a regular
file in /boot/grub. Then /boot/grub must be on the same drive as the
boot image. However blocklists are not reliable with files, because the
filesystem may move blocks containing a file around.