* hybrid DOS/GPT and BIOS Boot Partition
@ 2010-07-02 12:39 Robert Millan
2011-01-23 20:39 ` walt
0 siblings, 1 reply; 4+ messages in thread
From: Robert Millan @ 2010-07-02 12:39 UTC (permalink / raw)
To: grub-devel; +Cc: Elliott
Hi,
Sorry for breaking the thread, but I just stepped in because I
participated in the standarisation of the BIOS Boot Partition
mechanism, and in early discussions about this hybrid DOS/GPT protocol
which led to the standard being discussed, and I want to clarify
something.
GRUB implements the BIOS Boot Partition, and SYSLINUX implements the
hybrid DOS/GPT protocol [1]. It is too easy to get the impression
that both protocols are somehow overlapping, or that they are
different ways to solve the same problem. This is NOT TRUE. They're
actually two solutions for two very different problems.
The first problem is, if we have more than one OS, how do we select
which one to boot?
GRUB implements the obvious solution (ask the user!). But in the old
days, MSDOS implemented an awkward scheme [2], designed with
proprietary boot protocols in mind: multiple bootloaders can be
installed; each bootloader can "chainload" another bootloader, so that
even if the boot protocols are secret, it is possible to install more
than one OS in the same PC. I believe current MBR used with SYSLINUX
goes a step further and allows user to select an entry, but still with
the constraints of 440 bytes, the user interface becomes very
unfriendly and limited.
Note that GRUB implements part of this "chainload" mechanism as well,
for the sake of compatibility with Microsoft Windows. It ignores the
"bootable flag", and allows user to chainload to a partition using
this protocol, on request. With GPT, there's currently no point in
implementing it, since Windows doesn't (yet?) follow this scheme [3].
The second problem is, 440 bytes is such a small space, can we do
everything we want with it? Or can we have a bigger MBR? Can we
increase the amount of unmanaged code?
With MSDOS labels, GRUB solved this by using the post-MBR gap as an
extension of the MBR. The idea is that this area is unmanaged, as in,
whoever owns the MBR also takes ownership of those sectors, and
there's no mechanism to have more than one such area (nor any need for
such mechanism). SYSLINUX solved this by relying on poor, limited MBR
as described earlier.
When it comes to GPT, GRUB solved this by using a new instance of the
same unmanaged extension of the MBR: the BIOS Boot Partition. It's
effectively the same thing, except that with it being a partition,
people tend to think it somehow plays a role in the MSDOS partition
handover protocol, and mix things up.
As described earlier in this list, SYSLINUX "solved" this problem by
implementing a poor, limited MBR which skips parts of the GPT spec
(CRC verification IIRC) in order to squeeze their code in 440 bytes.
There's NO NEED to restrict for this kind of constraint. I would
advice SYSLINUX developers to take advantage of the BIOS Boot
Partition in order to fit whole GPT parser.
I think this makes clear that both protocols aren't exclusive to each
other, it just happens that they solve different problems, with GRUB
and SYSLINUX only interested in one of each, and already having a
solution (or simply not caring) about the other.
[1] I refer to it in generic terms, because the implementation in
SYSLINUX pre-dates the standard; based on my previous discussion with
HPA, I believe he's been involved in the development of this standard,
and the result is modeled after his implementation.
[2] Partitions have a so-called "bootable flag". MBR probes for
bootable flags and automatically selects a partition based on them.
[3] Apparently, Microsoft drank the EFI kool-aid and still hasn't
figured out that one can actually boot from a GPT label on a PC/BIOS
system.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hybrid DOS/GPT and BIOS Boot Partition
2010-07-02 12:39 hybrid DOS/GPT and BIOS Boot Partition Robert Millan
@ 2011-01-23 20:39 ` walt
2011-01-24 0:15 ` Isaac Dupree
0 siblings, 1 reply; 4+ messages in thread
From: walt @ 2011-01-23 20:39 UTC (permalink / raw)
To: grub-devel
On 07/02/2010 05:39 AM, Robert Millan wrote:
> ...
> When it comes to GPT, GRUB solved this by using a new instance of the
> same unmanaged extension of the MBR: the BIOS Boot Partition...
Hi, I'm following grub2 again after a long absence, so I'm way behind,
sorry.
I have grub2 working perfectly (thank you :) on my standard x86 and
x86_64 machines, but only if install grub2 to a DOS-partitioned disk.
When I try to install grub2 to a GPT-partitioned disk, the installer
refuses because there is no BIOS Boot Partition.
Is there a way to make this configuration work? (I've used gdisk to
convert DOS partition tables to GPT, so far.)
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hybrid DOS/GPT and BIOS Boot Partition
2011-01-23 20:39 ` walt
@ 2011-01-24 0:15 ` Isaac Dupree
2011-01-24 13:55 ` walt
0 siblings, 1 reply; 4+ messages in thread
From: Isaac Dupree @ 2011-01-24 0:15 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: walt
On 01/23/11 15:39, walt wrote:
> Is there a way to make this configuration work? (I've used gdisk to
> convert DOS partition tables to GPT, so far.)
Yes... make a BIOS Boot Partition!
Such a partition couldn't hurt with DOS tables, too (I think there isn't
a way to mark the partition table type as such in msdos tables, though?
So maybe it can't be done / done easily.)
Basically, on msdos partitions, there's usually a post-MBR "gap" where
there are no partitions and a part of GRUB is put there. It can't be
put in a filesystem because filesystems can shift their files around,
and it's loaded by the <512 byte MBR, which can't be very smart. GPT
tends to fill up all the space you'd have a post-MBR gap in, so you have
to do the more-explicit-and-reasonable approach of making a partition
for the GRUB data (in GRUB2 we call it core.img).
[if my terminology is wrong, someone correct me]
-Isaac
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hybrid DOS/GPT and BIOS Boot Partition
2011-01-24 0:15 ` Isaac Dupree
@ 2011-01-24 13:55 ` walt
0 siblings, 0 replies; 4+ messages in thread
From: walt @ 2011-01-24 13:55 UTC (permalink / raw)
To: grub-devel
On 01/23/2011 04:15 PM, Isaac Dupree wrote:
> On 01/23/11 15:39, walt wrote:
>> Is there a way to make this configuration work? (I've used gdisk to
>> convert DOS partition tables to GPT, so far.)
>
> Yes... make a BIOS Boot Partition!
Well, that's pretty obvious. The part I missed is that there is actually
is such a partition type ef02, and gdisk knows about it -- but I didn't :)
Thanks for the good info.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-24 13:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-02 12:39 hybrid DOS/GPT and BIOS Boot Partition Robert Millan
2011-01-23 20:39 ` walt
2011-01-24 0:15 ` Isaac Dupree
2011-01-24 13:55 ` walt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).