Le 09/04/2017 à 16:35, Xen a écrit :
Pascal Hambourg schreef op 09-04-2017 13:52:
Le 09/04/2017 à 12:09, Xen a écrit :
Pascal Hambourg schreef op 09-04-2017 10:14:
In some cases I would need to force installation of GRUB's boot and
core images into a specific location on the drive instead of letting
grub-install decide automatically.
For example :
- install the boot image in the first sector of an unformatted
partition
- install the core image in the second and next sectors of that
partition.
Do you mean that the partition being unformatted makes a difference?
Yes. IME, grub-install refuses embedding on a partition with an
unknown format, e.g. an empty partition. And I need embedding.
Can you tell me what your use case is, out of interest?
My current use case is to install a new GNU/Linux system entirely in an
encrypted (LUKS) partition on a disk which already contains an existing
GNU/Linux system. The existing boot loader is installed in the MBR and
must be left untouched. However it cannot boot the new system because
even /boot is encrypted. So I need to install GRUB with encryption
support as a secondary boot loader. Its boot and core images cannot be
installed in the encrypted partition.
A more general use case is to install multiple instances of GRUB as
independent secondary boot loaders, and not store the core image as a
standard file using blocklists because it is not reliable.
Of course perhaps your partition is very small and you have no intended
use for the partition.
The only intended use for the partition is to install GRUB, and I want
it as small as possible. Boot image + core image take less than 100 kB
and I'd rather avoid allocating a multi-GB btrfs partition for this.
_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub