grub-devel
[Top][All Lists]
Advanced

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

Re: grub2 and hybrid MBR booting


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: grub2 and hybrid MBR booting
Date: Thu, 01 Jul 2010 21:42:35 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4

On 06/29/2010 08:37 PM, Elliott, Robert (Server Storage) wrote:
> I successfully ran ubuntu 10.04 (which uses grub2) on a 4 TB drive 
> (presented by a RAID controller) on a system with legacy BIOS.  The 
> drive got partitioned as GPT; a BIOS boot partition was installed; 
> and grub stage 1 contains the 8-byte LBA of the BIOS boot partition 
> hardcoded into its 440 bytes of x86 boot code, so it can load the 
> code in that BIOS boot partition.
>
> That works pretty well, but requires any program that moves the BIOS 
> boot partition to know that grub is pointing to it and also adjust 
> that 8-byte LBA value stored in LBA 0.
>
>   
After moving of partitions containing it's recommended to reinstall
bootloader
> In the UEFI Working Group (which defines GPT) and the T13 (ATA) standards 
> bodies, we defined a slightly different method:  the GPT partition record 
> now includes a Legacy BIOS Bootable bit that can be set for a partition 
> like the BIOS boot partition,   The algorithm is documented in 
> T13 EDD-4 revision 2 and later (see
> http://t13.org/Documents/MinutesDefault.aspx?DocumentType=4&DocumentStage=1).
>
>   
At last. It's refreshing from the usual lie that you need EFI to boot
from GPT-partitioned disk.
But I don't see the need to standartise the interface between MBR code
and the rest. Standartisation is good only for interoperability between
different software. But in this case both parts are from the same
bootloader so it will only reduce flexibility.

> and the x86 boot code in LBA 0 can search 
> through the GPT partition table for a partition with that bit set to 1 
> (rather than contain a hardcoded LBA).
It's closedly modeled after msdos. It annihilates most of advantages of GPT. I 
suppose you want to put filesystem on bootable partition too.
When we added GPT support virtually unlimited embedding zone was the great 
plus. Switching to msdos-like scheme would be a huge step backwards (especially 
that you have no MBR gap). It's a repetion of old mistakes under new sauce. 
MSDOS scheme already forced anti-patterns and any new scheme must be based on 
saner pattern. 

> Would grub2 consider switching to that modified algorithm?
>
> H Peter Anvin has implemented it in syslinux-4.00-pre48 (see
> http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project). 
>   
Syslinux is known for hanging on the old protocol no matter the price.
> The boot code 
> doesn't have enough room to verify the GPT CRC and perform all the possible 
> GPT verification checks, but it can definitely walk through the structure 
> and find the boot partition.
>
>   
Which contradicts your spec. Unimplementable spec only forces devs to
code undefined behaviour.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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