Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Mar 2010 15:31:30 -0800
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: another gpt vs mbr (sanity) check
Message-ID:  <530847A8-D9F7-4A9F-9578-6A9282688EC1@mac.com>
In-Reply-To: <4B940018.5050809@icyb.net.ua>
References:  <4B9389C1.9000102@icyb.net.ua> <E336C0C7-C92F-4F30-A091-E3B3517E9B54@mac.com> <4B940018.5050809@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mar 7, 2010, at 11:35 AM, Andriy Gapon wrote:

> on 07/03/2010 21:13 Marcel Moolenaar said the following:
>> On Mar 7, 2010, at 3:10 AM, Andriy Gapon wrote:
>> 
>> 
>>> Please consider the following scenario:
>>> - GPT scheme is used on a disk
>>> - the disk changes hands
>>> - the disk is repartitioned with MBR without explicitly wiping out any of old
>>> data and thus GPT
>>> - GPT data survives undamaged
>>> 
>>> So now we have the valid GPT but it points to wrong offsets and we have the
>>> valid and correct MBR.
>>> Currently FreeBSD would pick GPT scheme over MBR scheme when presented which
>>> such a disk.  I think that this is incorrect.
>> 
>> Sorry. That ship has sailed. Originally GEOM_GPT at the time checked
>> for the protective MBR before accepting the GPT. This was changed to
>> support Apple setups. There's no turning back now. People just need
>> to learn to wipe out old partitioning information before writing
>> select sectors in order to create a new one.
> 
> Hmm, I probably wasn't there when the ship was sailing out :)
> What is the 'Apple setup'?  Is it a some sort of a hybrid scheme?  Don't they
> still use a protective type for the first partition in MBR?

It's a hybrid setup. I can't recall if there's a slice of type 0xEE
or not in all cases, but we stopped checking for that...

> Can we perhaps have the best of all words and do some smart autodetection?
> Or, at least, have some manual lever to control such things?

The best of all worlds doesn't exist anymore. It was how it
was designed to be and not how it's used at this time.

-- 
Marcel Moolenaar
xcllnt@mac.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?530847A8-D9F7-4A9F-9578-6A9282688EC1>