Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Mar 2010 21:35:52 +0200
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: another gpt vs mbr (sanity) check
Message-ID:  <4B940018.5050809@icyb.net.ua>
In-Reply-To: <E336C0C7-C92F-4F30-A091-E3B3517E9B54@mac.com>
References:  <4B9389C1.9000102@icyb.net.ua> <E336C0C7-C92F-4F30-A091-E3B3517E9B54@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?
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?

When a friend gives me his SDHC card to copy some files out of it, he wouldn't
want me to perform some non-readonly magic with it and he wouldn't bother to
listen my explanations because the card works nice for him with Windows.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B940018.5050809>