All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: grub2 and hybrid MBR booting
Date: Sat, 03 Jul 2010 21:22:10 +0200	[thread overview]
Message-ID: <4C2F8DE2.2080409@gmail.com> (raw)
In-Reply-To: <63A4C2F2B04E2948B033568534F6C9C578E408CA3E@GVW1095EXB.americas.hpqcorp.net>

[-- Attachment #1: Type: text/plain, Size: 3720 bytes --]

On 07/02/2010 02:13 AM, Elliott, Robert (Server Storage) wrote:
>>> 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&DocumentSta
>>> ge=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.
>>     
> The "handoff" contents are defined to better support MBRs and VBRs that
> aren't tightly coupled.  
Why such schemes are of concern? Someone who wrote the whole bootloader
can write 440 bytes more and doesn't need another company for it. If
it's for loading one bootloader from another multiboot is much more
appropriate. GRUB tries to go away from chainloading as far as possible.
It's now still used only for windows but even this will change soon with
"ntldr" command which is able to load ntldr or bootmgr file.
> The VBR can ignore the data structure if it 
> doesn't need it. Syslinux felt it helpful to support legacy VBRs
> (particularly when they are located < 2.2 TB).
>
>   
Unless VBR itself is designed for this you can't load it this way.
>
>
>> 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.
>>     
> What's an "anti-pattern"?
>
>   
A design decision to avoid.
> The change here would be that the grub MBR code would locate the
> grub VBR code (the BIOS Boot Partition) by looking for the Legacy BIOS 
> Bootable bit in the GPT partition record, rather than have hardcode
> the LBA at some offset in the MBR.
>
>   
This scheme already showed its flaws in the past. Multibooting by
changing this flag is impratical to say the least and over-reliance on
this flag to locate boot partition made it that bootloader must set this
flag before chainloading, so no bootloader other than microsoft one
implements msdos scheme. You would need a flag per bootloader. It boils
back to GUID.
Using GUID in GPT to locate the embedded zone would be good but it has
nothing to do with this standard. Robert made some work in this
direction but never finished (he wrote MBR but not some required changes
to diskboot.img) and nobody picked up his work.
> Although all legacy BIOS boots will fail if LBA 0 goes bad, this allows
> inclusion of more than one legacy bootable partition on the disk to 
> tolerate a failure in those LBAs.
Bad sectors are pretty rare and overwritten boot partition would need
manual clear of bootale flag which requires some environment which would
be able to just reinstall bootloader.
>   It would also tolerate failures of 
> the GPT region (since there's a backup GPT at the end of the disk
> that can be used).
>
>   
Whether or not use GPT to locate embed partition would be a separate
thread and as I said using GUID would be good but noone ever completed
it for GRUB.

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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2010-07-03 19:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 18:37 grub2 and hybrid MBR booting Elliott, Robert (Server Storage)
2010-07-01 19:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-07-02  0:13   ` Elliott, Robert (Server Storage)
2010-07-03 19:22     ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-07-05 10:57       ` Robert Millan
2010-07-02 23:41   ` Isaac Dupree
2010-07-03 19:31     ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-07-04  6:21     ` venkat kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C2F8DE2.2080409@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.