[Top][All Lists]

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

Re: Force location of GRUB's boot and core images ?

From: Andrei Borzenkov
Subject: Re: Force location of GRUB's boot and core images ?
Date: Mon, 10 Apr 2017 05:55:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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.

reply via email to

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