Date: Wed, 04 Mar 2009 10:11:11 -0800 From: Marcel Moolenaar <xcllnt@mac.com> To: Jaakko Heinonen <jh@saunalahti.fi> Cc: freebsd-geom@FreeBSD.org Subject: Re: gpart probing problem Message-ID: <325ECB30-003C-41BB-A3B3-FC8A684E4F0E@mac.com> In-Reply-To: <20090304151420.GA804@a91-153-125-115.elisa-laajakaista.fi> References: <20090302195126.GA6974@a91-153-125-115.elisa-laajakaista.fi> <6E283F9A-30B1-431E-B6F1-142E17647FB2@mac.com> <20090304151420.GA804@a91-153-125-115.elisa-laajakaista.fi>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 4, 2009, at 7:14 AM, Jaakko Heinonen wrote: > > Thanks for your reply. > > On 2009-03-03, Marcel Moolenaar wrote: >> There's always a MBR in front of a GPT and a corrupted GPT should not >> be tossed aside and ignored. > > I see the point. However this could cause problems for people moving > disks between operating systems (as it caused for me) because some > popular operating systems show MBR partition(s) in this case. That's a mistake IMO. > I tested these operating systems: > > Mac OS X 10.4 > Linux (Ubuntu kernel 2.6.27-7-generic) > OpenSolaris (2008.11 release) > Windows XP/2003 > >> Under no circumstance should the kernel use the MBR and pretend >> nothing is wrong. > > Is this behaviour defined in the EFI specification? Are the OSes > listed > above buggy and/or do they violate the specification? The EFI specification has been obsoleted by events to some extend. For one, the MBR in front of a GPT was there *only* for backward compatibility with MBR tools that don't know about GPT. Those tools would see a disk that's entirely in use rather than a disk that's unpartitioned. This is not the case anymore. The MBR now contains valid partitions for use by OSes that don't know anything about GPT. However: the key statement there is "OSes that don't know about GPT". Any OS that knows about GPT should use the GPT. That, if not explicitly stated in the EFI specification, is definitely the intend and is actually current practice: The dual MBR+GPT setup can only work if GPT-aware OSes use the GPT and GPT-unaware OSes use the MBR. A such: if a GPT is found, but corrupted, the OS should *not* silently use the MBR (it can only find a GPT if it's a GPT-aware OS). It should use the GPT if possible (the redundancy has been added by design so that you can recover from the most common forms of corruption), or fail if it's inconsistent to the extend that there's no clear interpretation (i.e. conflicting/ambiguous). So yes, the OSes you listed above are buggy. I can't claim they violate the specification, because the specification is hardly applicable anymore. This, of course, is the root cause the problem... -- Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?325ECB30-003C-41BB-A3B3-FC8A684E4F0E>