Re: more hybrid MBR bugs
Re: more hybrid MBR bugs
- Subject: Re: more hybrid MBR bugs
- From: Chris Murphy <email@hidden>
- Date: Tue, 29 Oct 2013 09:30:10 -0600
On Oct 29, 2013, at 4:29 AM, Quinn The Eskimo! <email@hidden> wrote:
>
> On 28 Oct 2013, at 17:40, Chris Murphy <email@hidden> wrote:
>
>> I'm seeing evidence of two kinds of really bad behaviors on the part of the installer:
>
> Do you have bug numbers for each of these?
No. There is the instigating bug 11980880 which would be the parent of the two bugs I'm referring to.
And forums are full of such messages, both Apple's and the various other user forums. The typical form of the most common case, mentioned first, is an MBR and GPT post 10.9 installation that looks like this example from today:
gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: disk0: Suspicious MBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 1953525167
start size index contents
0 1 MBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 1701278816 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1701688456 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1702957992 1846360
1704804352 248002560 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
1952806912 718223
1953525135 32 Sec GPT table
1953525167 1 Sec GPT header
Disk: /dev/rdisk0 geometry: 121601/255/63 [1953525168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
2: AF 1023 254 63 - 1023 254 63 [ 409640 - 1701278816] HFS+
3: AB 1023 254 63 - 1023 254 63 [1701688456 - 1269536] Darwin Boot
4: 0C 1023 254 63 - 1023 254 63 [1704804352 - 248002560] HPFS/QNX/AUX
GPT is obviously still in a state after Disk Utility allowed the user to shrink the OS X volume, contrary to TN2166's proscription: "If block 0 contains any other form of MBR, [GPT-aware programs] should refuse to manipulate the disk." That's the first part of bug 11980880. The 2nd part, creating a 5th partition in Disk Utility doesn't apply here, but the user is already setup for subsequent problems that will reveal themselves when they upgrade OS X.
Once in Windows, they grow the NTFS volume, and the MBR would have indicated partition 4 start at 1702959104, with type code 07 and active bit set. Functioning but not in sync with the GPT. It is completely normal and expected for Windows booted in CSM-BIOS mode to behave this way, as they have no concept of hybrid MBRs.
At this point there are two working OS's.
Immediately after a 10.7, 10.8, or 10.9 upgrade, the 2nd system becomes unbootable, and inspection of the MBR shows something like what you see above. It matches the GPT, has the wrong fs type code, and isn't flagged bootable. So it's unsurprising Windows doesn't boot, everything that can be wrong about the MBR is wrong, but it matches the GPT when based on events to date, it shouldn't.
What the installer is doing, I'm not precisely sure, I only suspect it's calling diskutil repair. When I setup a mismatching MBR and GPT manually and run diskutil repair, it always considers this something that needs to be fixed, albeit at least it has the courtesy to ask before doing so. The installer, however, doesn't ask, it just changes the MBR to match the wrong information in the GPT.
Realistically what needs to happen is once a hybrid MBR is no longer sync'd with information in the GPT, TN2166 should apply and the disk should not be manipulatable other than wholesale obliteration of everything on it with a commensurate warning, but no piecemeal changes should be allowed. Especially the MBR should not be changed because it's the only partition with correct information in it at this point. Practically, the GPT probably shouldn't be changed either or the confusion just gets worse.
Chris Murphy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden