alexsb92

Q: Repair bootcamp after installing Linux

Hi,

 

So prior to all this I had Windows 10 running in parallel with OS X which worked fine. I had to install Ubuntu though, so I shrank the OS X partition and proceeded to install Ubuntu. During that process I created two partitions (the main Ubuntu one and a swap). Anyway, once I was done with all this and wanted to go back to the Windows partition, Windows gave me error 0xc000000e. This seems to be related to the MBR and I've attempted to fix it by following the instructions in this thread https://discussions.apple.com/thread/4144252?start=0&tstart=0 but that didn't really work. I fully admit that I don't understand all that happened in that thread so I did just wrongly assume that it might work for me too.

 

Based on what was asked of the poster in the link above, i'm attaching the output to a couple of commands.

 

sudo gpt -r -vv show disk0

gpt show: disk0: mediasize=1000555581440; sectorsize=512; blocks=1954210120
gpt show: disk0: Suspicious MBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 1954210119
       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  1078638336      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  1079047976     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  1080317512         440         
  1080317952    32000000      4  GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
  1112317952   259184640      7  GPT part - 0FC63DAF-8483-4772-8E79-3D69D8477DE4
  1371502592   581785600      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953288192      921600      6  GPT part - DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
  1954209792         295         
  1954210087          32         Sec GPT table
  1954210119           1         Sec GPT header


sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 121643/255/63 [1954210120 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 - 1023 254  63 [         1 - 1371502591] <Unknown ID>
*2: 07 1023 254  63 - 1023 254  63 [1371502592 -  581785600] HPFS/QNX/AUX
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused     

This is the modified output after attempting the instructions in the link above. The original output (and I hope I didn't screw it up much) is below.

Disk: /dev/disk0 geometry: 121643/255/63 [1954210120 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   1 - 1023 254  63 [         1 -     409639] <Unknown ID>
*2: DA 1023 254  63 - 1023 254  63 [    409640 - 1078638336] <Unknown ID>
 3: AF 1023 254  63 - 1023 254  63 [1079047976 -    1269536] HFS+        
 4: 82 1023 254  63 - 1023 254  63 [1080317952 -   32000000] Linux swap  

 

Anyone has any advice to help me get out of this? It will be very appreciated!

MacBook Pro with Retina display, OS X El Capitan (10.11.6)

Posted on Sep 13, 2016 8:04 PM

Close

Q: Repair bootcamp after installing Linux

  • All replies
  • Helpful answers

Previous Page 2
  • by Loner T,

    Loner T Loner T Sep 15, 2016 7:54 PM in response to alexsb92
    Level 7 (24,227 points)
    Safari
    Sep 15, 2016 7:54 PM in response to alexsb92

    What is the output of

     

    sudo fdisk /dev/disk0

  • by alexsb92,

    alexsb92 alexsb92 Sep 16, 2016 12:40 PM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 16, 2016 12:40 PM in response to Loner T

    Well I had already done the installation. Figured worst case I'll reinstall the freshly installed Linux. Now all 3 OSes work great, so i'm just writing this up in case other people have the same issue in the future.

     

    Following the installation of Ubuntu, I had issues with Bootcamp not wanting to go ahead with its installation since the partitions weren't all of the Apple format (due to the Ubuntu installed), so I decided to just install Windows as I would on a normal computer by booting from the installation USB (which I did create through Bootcamp Assistant).

     

    The issue at this point was that Windows wouldn't let me select any of the partitions that I had created for it, telling me that "Windows cannot be installed on this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only installed on GPT disks." Running "sudo gdisk /dev/disk0" on OSX i'd get the following:


    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    

     

    A quick Google search later, I came across http://superuser.com/questions/508026/windows-detects-gpt-disk-as-mbr-in-efi-boo t which attributed my problem to having used Apple's Disk Utility to create a FAT filesystem, which I did when I was breaking up my disk and planning the partition sizes. So i followed the steps described in the answer (except sudo gdisk /dev/disk0 instead of disk1) and then booted the Windows USB whee I could now access the partition I had saved for Windows and I proceeded with the installation.

     

    To switch between the different boot loaders, i'm using this tool http://www.rodsbooks.com/refind/ which sometimes needs a quick reinstall after certain updates.

     

    For what it's worth, Loner T, this is the output now:

    Disk: /dev/disk0 geometry: 121643/255/63 [1954210120 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE    0   0   2 - 1023 255  63 [         1 - 1954210119] <Unknown ID>
     2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused  
    

     

    Thanks for the help along the way! Really appreciate the guidance.

  • by Loner T,

    Loner T Loner T Sep 16, 2016 1:00 PM in response to alexsb92
    Level 7 (24,227 points)
    Safari
    Sep 16, 2016 1:00 PM in response to alexsb92

    The MBR looks the same as if you had two/three OSes installed using EFI. Good to see it working. Please remember to back up all your OSes and create a Windows System Restore point.

Previous Page 2