|
From: | Pascal Hambourg |
Subject: | Re: Force location of GRUB's boot and core images ? |
Date: | Sun, 9 Apr 2017 13:44:09 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |