help-grub
[Top][All Lists]
Advanced

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

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


From: Pascal Hambourg
Subject: Re: Fwd: Re: Force location of GRUB's boot and core images ?
Date: Sun, 9 Apr 2017 22:47:48 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.6.0

Le 09/04/2017 à 16:46, Xen a écrit :
I forgot to CC this to you.

Thanks for resending. It makes me easier to reply.

Pascal Hambourg schreef op 09-04-2017 13:44:

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 you mean that boot.img will have (contain) an offset relative to
what it thinks is the entire disk (that was actually a partition
loopback mounted to appear as a single disk) and so upon activation will
not know that it was installed on a partition and will not know how to
use a relative offset from where boot.img was installed?

I guess so.

I guess that proper booting would require that the boot image looks at
the partition offset+1 instead.

Which it can't know because it thought it was sitting on a complete
disk, instead, unless it uses relative offsets.

Well, grub-install could have been smart enough and convert the virtual positions in the loop device into the real sector positions on the underlying disk. After all, this it what it does when installing on a regular partition. A partition is just another kind of virtual device.

But, thinking of it, that would prevent using a loop device to create a bootable image and write that image on a real boot device. I guess we can't have both.



reply via email to

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