I have a working triple-boot system on a MacBook Air (Mac OS X + Windows 7 + Ubuntu) that I achieved some time ago by following various tutorials.
Now I'd like to spice it up a bit by reinstalling Ubuntu with full disk encryption (using this great tutorial) and removing Mac OS X entirely, since I never use it anymore.
But I'm hitting a roadblock: as soon as I touch the GPT, no matter how little I change, Windows becomes unbootable!
Here is the current, working partition table (Linux gdisk command p)
Disk /dev/sda: 490234752 sectors, 233.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DC542B27-E782-479A-B17F-AAB05FACFA6C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 490234718
Partitions will be aligned on 8-sector boundaries
Total free space is 2877 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 411648 160409599 76.3 GiB 8300
3 160409600 168409087 3.8 GiB 8200
4 168409088 244826335 36.4 GiB AF00 Apple_HFS_Untitled_2
5 244826336 246095871 619.9 MiB AB00 Recovery HD
6 246095872 490233855 116.4 GiB 0700 BOOTCAMP
Partitions 2 and 3 are Linux root and swap respectively.
This is the protective MBR (command: r o)
Disk size is 490234752 sectors (233.8 GiB)
MBR disk identifier: 0x4B9CA30C
MBR partitions:
Number Boot Start Sector End Sector Status Code
1 1 246095871 primary 0xEE
2 * 246095872 490233855 primary 0x07
What I'd like to do is to remove GPT partitions 2 to 4 (not to be confused with MBR partition 2 above), replacing them with a 256MB Linux boot and a LUKS partition holding everything else. (I'll keep the Mac OS X recovery just in case I need some utility to write to nvram or something.)
I can easily do it with commands: d 2, d 3, d 4, n 2 default +256M, n 3 default default. The result is thus:
...
Total free space is 869 sectors (434.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 933927 256.0 MiB 8300 Linux filesystem
3 933928 244826335 116.3 GiB 8300 Linux filesystem
5 244826336 246095871 619.9 MiB AB00 Recovery HD
6 246095872 490233855 116.4 GiB 0700 BOOTCAMP
Printing the protective MBR shows the exact same table as before.
And yet, if I write this to disk and reboot, Windows won't boot anymore! even though I haven't changed its partition, nor the protective MBR.
If I hold Alt during boot and choose Windows, I get a weird sequence of screens that end in a Grub command prompt! Where is that Grub coming from, is a mystery.
Luckily I had a foreboding that something like this might happen, so I made a complete Clonezilla backup before touching anything. Now I can easily restore the system to the working triple boot state and try again. But no matter what I try, I break it!
How can I modify these partitions without borking Windows?
Edit—here are the weird Grub screens when I try to boot Windows after changing the GPT:
In the second screen it mentions 3 partitions of type 0xEE. Where are they coming from? Where is this Grub coming from in the first place??
0 Answers