grub-devel
[Top][All Lists]
Advanced

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

How to make a GRUB image file that can be chainloaded and will not read


From: Basin Ilya
Subject: How to make a GRUB image file that can be chainloaded and will not read the MBR gap?
Date: Thu, 30 Jun 2016 16:34:44 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Hi.

I want to make my grub image file independent from the data in the MBR
gap, i.e. I want to embed the generated core.img into my custom image file.

I have some questions:

- Does the grub2 command "chainloader /foo.img" load the whole file or
just the 1st 512 bytes?

- Does a BOOTSECTOR entry in Windows boot manager load the whole file or
just the 1st 512 bytes?

If the answer to both questions is "yes", then a custom image can be
made that will include core.img and a very simple boot sector, that will
assume that core.img is already loaded. To my knowledge, neither of the
images that ship with grub2 does that.

What preparations should the custom boot sector do? At what offset
should core.img be loaded and jumped to?



reply via email to

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