09.04.2017 14:44, Pascal Hambourg пишет:
> Le 09/04/2017 à 10:52, Andrei Borzenkov a écrit :
>> 09.04.2017 11:14, Pascal Hambourg пишет:
>>>
>>> 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.
>>>
>>> Is this possible through any undocumented options or internal commands ?
>>
>> No. The most straightforward workaround is to create loop device on top
>> of partition and create partition table inside with at least one
>> partition and suitable post-MBR gap. Then you will be able to install on
>> /dev/loopX. You may zap partition table afterwards to avoid confusion.
> 
> Thanks for your answer. I did not think that GRUB would support
> installing on a virtual device such as a loop device.
> 
> I just tried it. grub-install executed without any error, but
> chainloading the partition boot sector leaves me with a blank screen
> after the "boot" command. bootinfoscript reports that grub2 is installed
> in the boot sector of the partition and looks at sector 1 of the same
> hard disk (which contains the GPT header) for core.img. I guess that
> proper booting would require that the boot image looks at the partition
> offset+1 instead.

My bad, I did not think about it. So unfortunately I am not aware of any
trick to do it using currently provided tools.

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

Reply via email to