Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ay0503

macrumors newbie
Dec 8, 2013
4
0
reply

gpt show: disk0: mediasize=250059350016; sectorsize=512; blocks=488397168
gpt show: disk0: PMBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 488397167
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 486717952 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
487127592 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
488397128 7
488397135 32 Sec GPT table
488397167 1 Sec GPT header
 

murphychris

macrumors 6502a
Mar 19, 2012
661
2
Hello guys, I'm new here and I've googled and read and read to no avail.. I couldn't find anything to help me.. Any advice would be much appreciated

I don't think I was notified of this post or I'm pretty sure I would have replied. Anyway, let me know if you're still having the problem or if you just went ahead and blew everything away and restored from backups. The GPT and MBR in your case look in sync, so chances are you'd have to go down the testdisk path to find the true start/end sector value for Bootcamp.

----------

gpt show: disk0: mediasize=250059350016;

Do you have a question? The partition map doesn't imply one by itself.
 

audaciousnomad

macrumors newbie
Feb 2, 2014
3
0
Same problem as someone earlier: bootcamp disappeared after power failure

Hi Chris,

Thanks so much for being a lifesaver to so many users here. I too have unfortunately encountered the deadly "disappearing bootcamp partition" issue.

I'm not sure how it happened, although there was a recent Windows Update applied, and also a spontaneous reboot.

I compared my gpt outputs with others you have helped, and it all seems alright(you're probably a better judge) other than somehow the bootcamp partition went from being formatted as FAT32 to now HPFS?

Could you kindly take a look and let me know what your trained eyes tell you about my forlorn installation? (And what my options are to recover)
:rolleyes:

Code:
marvmac:~ marvin$ sudo gpt -r -vv show disk0
Password:
gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752
gpt show: disk0: Suspicious MBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 490234751
      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  332031264      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  332440904    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  333710440        920         
  333711360  156522496      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  490233856        863         
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header
marvmac:~ marvin$ sudo gdisk -l /dev/disk0
sudo: gdisk: command not found
marvmac:~ marvin$ sudo fdisk/dev/disk0
sudo: fdisk/dev/disk0: command not found
marvmac:~ marvin$ sudo gdisk -l /dev/disk0
GPT fdisk (gdisk) version 0.8.8

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/disk0: 490234752 sectors, 233.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4B78CACD-199A-4A26-B8EE-F56F01F02914
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 1789 sectors (894.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       332440903   158.3 GiB   AF00  Customer
   3       332440904       333710439   619.9 MiB   AB00  Recovery HD
   4       333711360       490233855   74.6 GiB    0700  BOOTCAMP
marvmac:~ marvin$ sudo fdisk/dev/disk0
sudo: fdisk/dev/disk0: command not found
marvmac:~ marvin$ sudo fdisk /dev/disk0
Disk: /dev/disk0	geometry: 30515/255/63 [490234752 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 -  332031264] HFS+        
 3: AB 1023 254  63 - 1023 254  63 [ 332440904 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 333711360 -  156522496] HPFS/QNX/AUX
marvmac:~ marvin$ sudo gpt -r -vv show disk0
Password:
gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752
gpt show: disk0: Suspicious MBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 490234751
      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  332031264      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  332440904    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  333710440        920         
  333711360  156522496      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  490233856        863         
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header
marvmac:~ marvin$ sudo gdisk -l /dev/disk0
GPT fdisk (gdisk) version 0.8.8

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/disk0: 490234752 sectors, 233.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4B78CACD-199A-4A26-B8EE-F56F01F02914
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 1789 sectors (894.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       332440903   158.3 GiB   AF00  Customer
   3       332440904       333710439   619.9 MiB   AB00  Recovery HD
   4       333711360       490233855   74.6 GiB    0700  BOOTCAMP
marvmac:~ marvin$ sudo fdisk /dev/disk0
Disk: /dev/disk0	geometry: 30515/255/63 [490234752 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 -  332031264] HFS+        
 3: AB 1023 254  63 - 1023 254  63 [ 332440904 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 333711360 -  156522496] HPFS/QNX/AUX
marvmac:~ marvin$
 
Last edited:

murphychris

macrumors 6502a
Mar 19, 2012
661
2
I'm not sure how it happened, although there was a recent Windows Update applied, and also a spontaneous reboot.

If the filesystem is dirty it may not be mountable by OS X's limited NTFS support. I'd try booting Windows. Merely booting should clean it up, do a normal reboot back to OS X and it should then be visible again.

I compared my gpt outputs with others you have helped, and it all seems alright(you're probably a better judge) other than somehow the bootcamp partition went from being formatted as FAT32 to now HPFS?

Boot Camp Assistant uses partition type code 0x0C and formats it FAT32. When you install Windows, its installer changes the type code to 0x07 and formats it NTFS. So the partition type code is correct and the GPT and MBR look in sync. So your problem is elsewhere.

The 0x07 partition type code is used by multiple volume formats including NTFS, exFAT, QNX and HPFS. The partition type code doesn't really indicate the volume format, it's just a filter so utilities don't look at everything on the disk for something it recognizes.
 

audaciousnomad

macrumors newbie
Feb 2, 2014
3
0
If the filesystem is dirty it may not be mountable by OS X's limited NTFS support. I'd try booting Windows. Merely booting should clean it up, do a normal reboot back to OS X and it should then be visible again.

Boot Camp Assistant uses partition type code 0x0C and formats it FAT32. When you install Windows, its installer changes the type code to 0x07 and formats it NTFS. So the partition type code is correct and the GPT and MBR look in sync. So your problem is elsewhere.

The 0x07 partition type code is used by multiple volume formats including NTFS, exFAT, QNX and HPFS. The partition type code doesn't really indicate the volume format, it's just a filter so utilities don't look at everything on the disk for something it recognizes.

Thanks for the tip Chris. I'm glad to hear my partition and boot information look ok. My dilemma is that neither the windows(bootcamp) partition, nor the recovery partition appear in the startup disk options in sys preferences. Hence, I don't even get the chance to boot windows even when I hold alt/option key while booting.

I thought of maybe installing a third party bootmgr such as rEFInd, but not sure if that's the right tool or if there are simpler options for my case.

What do you think?
 

murphychris

macrumors 6502a
Mar 19, 2012
661
2
I don't even get the chance to boot windows even when I hold alt/option key while booting.

The firmware requires three things to be true to show a Windows boot option at the option key startup menu: A hybrid MBR, i.e. one that contains more than one entry; one of the MBR entries other than the first must have active bit set; there must be code in the first 440 bytes of the MBR.

Two of these things are clearly true from your fdisk results. There's no good reason why the first 440 bytes have been zero'd. Is an SSD involved?


I thought of maybe installing a third party bootmgr such as rEFInd, but not sure if that's the right tool or if there are simpler options for my case.

I believe rEFInd skips the first 440 bytes boot strap code, and directly executes ntloader in the first sectors of the NTFS volume. So this might be a work around if the only problem is that the MBR bootstrape code is missing or damaged for some reason. But that's a really far work around without knowing what the actual problem is. I'd sooner boot a Windows DVD (or prepared USB stick), and use Windows Startup Repair, or get down and dirty with bootrec.exe which is faster because it skips the scan. It has separate commands to replace the various parts of the boot process, so the first one to try in this case is /FixMbr.
 

audaciousnomad

macrumors newbie
Feb 2, 2014
3
0
The firmware requires three things to be true to show a Windows boot option at the option key startup menu: A hybrid MBR, i.e. one that contains more than one entry; one of the MBR entries other than the first must have active bit set; there must be code in the first 440 bytes of the MBR.

Two of these things are clearly true from your fdisk results. There's no good reason why the first 440 bytes have been zero'd. Is an SSD involved?




I believe rEFInd skips the first 440 bytes boot strap code, and directly executes ntloader in the first sectors of the NTFS volume. So this might be a work around if the only problem is that the MBR bootstrape code is missing or damaged for some reason. But that's a really far work around without knowing what the actual problem is. I'd sooner boot a Windows DVD (or prepared USB stick), and use Windows Startup Repair, or get down and dirty with bootrec.exe which is faster because it skips the scan. It has separate commands to replace the various parts of the boot process, so the first one to try in this case is /FixMbr.

Thanks again Chris. Yes, a SSD drive is indeed installed. This is a Macbook Air mid-2011 edition, running OS X Lion 10.7.5.

Is it correct to say that a windows boot dvd/usbstick loaded by holding C-key down on Mac powerup will load and then recognize only the bootcamp partition on my SSD? Following that, the next step would be to choose option R to repair said partition?

I can try this, just want to make sure I understand your instructions. BTW...Bootcamp Assistant in OS X offers a utility to prepare a Windows Install disk. Do you or do you not recommend using this for the repair?
 

murphychris

macrumors 6502a
Mar 19, 2012
661
2
Yes, a SSD drive is indeed installed.

It's rare but there are firmware bugs floating around that fit this description, although it's not specific enough to just hosting the MBR boot code. Usually other data is also corrupted or missing.


Is it correct to say that a windows boot dvd/usbstick loaded by holding C-key down on Mac powerup will load and then recognize only the bootcamp partition on my SSD?

Well, doing that merely boots the DVD. The recognition aspect is done either by Windows Startup Repair, or bootrec.exe. You need to choose one of those options.

Following that, the next step would be to choose option R to repair said partition?

No. Don't do this. There's nothing wrong with the partitions based on what you've posted. OS X Disk Utility cannot repair NTFS volumes. And more often than not when it tries to repair partition maps it makes things worse so longer the pole you touch Disk Utility with the safer your data will be.

Bootcamp Assistant in OS X offers a utility to prepare a Windows Install disk. Do you or do you not recommend using this for the repair?

If it'll let you do that without modifying the partition layout, yes. But I've never tried this. My understanding is that when there's a Boot Camp volume present, Boot Camp Assistant only offers the option to remove the Boot Camp volume which is definitely not what you want to do. I don't have a suggestion for how to create a Windnows bootable USB stick for a Mac if Boot Camp Assistant doesn't provide it exclusively and separate from removing the Boot Camp volume.
 

elgrecomac

macrumors 65816
Jan 15, 2008
1,163
162
San Diego
A suggestion for the future

Like others on this thread I have a critically needed bootcamp partition to run MS Project and MS Visio. The smartest thing I've ever done with this environment is to purchase Winclone and backup the bootcamp image with it and store it on an external drive. If anything were to happen with the partition AND I created regular images of the partition, it is a relatively simple process to reformat the bootcamp partition and restore the bootcamp image. Best money I've spent on Windows in many years. I encourage all who use bootcamp to do some investigating about this product.
 

kcjones391

macrumors newbie
Mar 3, 2014
1
0
I too have fallen to the Bootcamp - Windows 7 – NTFS disk space issue and wish I had seen this forum before I dug such a deep hole. Before I completely start from scratch in reloading everything and losing some important files I hope someone can help. I am new to this level of sophistication working with GPT and MBR so please forgive my inabilities.

My issues started when someone gave me a computer – no wait that is too far back. Last night I was running low on disk space for the WIN 7 portion of my dual boot on Bootcamp. I had read a bunch of garbage on how you could adjust the partitions in the native OS – first OS X then adjust Windows through disk management. With the new update on OS X (10.9.2) I had lost my rEFInd boot manager and new I needed to reinstall it. So I thought (second mistake) I would adjust the disk partitions before doing that. I have plenty of space on my OS X partition. Well things went from bad to worse and I should have stopped but didn’t and now I am here hoping someone can bail me out. And yes I know I should have backed up the Windows portion but somehow got in my head that the Time Machine function backed up the Bootcamp windows portion also. Needles to say I am in a hurt for some of the files on the windows partition.

I have read most of the threads on this topic and posting just the start of information that murphychris and PerceptorC5 talked about. I am hoping that someone can help direct me; I can push the keys but don’t know the details behind them. So here it goes. In my case OS X works fine but have lost the Windows 7 side.

OS X Partition:

Mount Point : / Capacity : 875.53 GB (875,527,491,584 Bytes)
Format : Mac OS Extended (Journaled) Available : 516.21 GB (516,212,191,232 Bytes)
Owners Enabled : Yes Used : 359.32 GB (359,315,300,352 Bytes)
Number of Folders : 313,455 Number of Files : 1,330,511

NTFS Partition:

Mount Point : Not mounted Capacity : 107.71 GB (107,713,921,024 Bytes)
Format : MS-DOS (FAT) Available : -
Owners Enabled : - Used : -
Number of Folders : - Number of Files : -

Code:
sudo gpt -r -vv show disk0

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  1710014632      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  1710424272     1126880      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  1711551152    31593808         
  1743144960   210378752      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header

Code:
sudo fdisk /dev/disk0

Disk: /dev/disk0	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 - 1710014632] HFS+        
 3: AB 1023 254  63 - 1023 254  63 [1710424272 -    1126880] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [1743144960 -  210378752] HPFS/QNX/AUX

Code:
sudo gdisk -l /dev/disk0

GPT fdisk (gdisk) version 0.8.9

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/disk0: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 90409A5B-8155-4F62-9015-AAD5E8333F34
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 31595237 sectors (15.1 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640      1710424271   815.4 GiB   AF00  Untitled
   3      1710424272      1711551151   550.2 MiB   AB00  Recovery HD
   4      1743144960      1953523711   100.3 GiB   0700  Untitled

Please help if at all possible.:confused:
 

aseatosufferin

macrumors newbie
Mar 17, 2014
1
0
Unmountable partition

Hello everyone

Once I had a mac partition+bootcamp partition+ a partition which i could see in windows.
I deleted my bootcamp partition and added it to mac partition. Now I have a mac partition and the third partition. third partition is not mountable in disk utility, Its greyed out in the list.
I could recover some of my data from that drive using disk drill but , I still think there would be a way to see the files in original arrangement and folders.

Im not familiar with mac os, its just one week im working with that, and Im not that much expert to use gptdisk or other utilities. I guess partition map of this drive is still MBR as it once was recognizable by windows. it would be great if anybody could help me.
Here I attached screen shots.
 

Attachments

  • Screen shot 2014-03-17 at 7.57.38 PM.png
    Screen shot 2014-03-17 at 7.57.38 PM.png
    42.5 KB · Views: 275
  • Screen shot 2014-03-17 at 7.57.21 PM.png
    Screen shot 2014-03-17 at 7.57.21 PM.png
    33.9 KB · Views: 604
  • Screen shot 2014-03-17 at 7.55.44 PM.png
    Screen shot 2014-03-17 at 7.55.44 PM.png
    60.4 KB · Views: 405

Mithrill

macrumors newbie
Dec 4, 2014
1
0
40 Gt gone after migrating error

Hi everyone.

Found this threat and posting my problem, which is really similar to others. Except mine happened during bootcamp assistant error. So I planned to delete bootcamp partition and install windows7 from scratch.
I launched bootcamp assistant and hit the migrate -button. At this point, I went to prepare some coffee. I came back and there was a error message, something about error while migrating, I don't remember word by word sentence but anyway. Point is, there was a error message on screen. I relaunched bootcamp assistant to re-migrate the bootcamp partition. Program started to run. I waited about 15 min but progress bar never moved. After an hour of waiting, progress bar still hasn't moved, I decided to close bootcamp assistant and restart mac. After reboot, I realized bootcamp partition was gone. I launched disk utility and here is result:

Disk%20utility%20copy.jpg


HD capacity is 320 Gt but lower right corner clearly says 284 Gt. So 36 Gt are gone. If I remember correctly, bootcamp size was 40 Gt so that is about the right size.

here are results after doing those sudo-commands:

Code:
sudo gpt -r -vv show disk0

gpt show: disk0: mediasize=320072933376; sectorsize=512; blocks=625142448
gpt show: disk0: PMBR at sector 0
gpt show: disk0: Pri GPT at sector 1
gpt show: disk0: Sec GPT at sector 625142447
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  555103856      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  555513496    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  556783032   68359383         
  625142415         32         Sec GPT table
  625142447          1         Sec GPT header

Code:
sudo fdisk /dev/disk0

Disk: /dev/disk0	geometry: 38913/255/63 [625142448 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -  625142447] <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

Code:
sudo gdisk -l /dev/disk0

GPT fdisk (gdisk) version 0.8.10

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/disk0: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 5D7BE9C8-CF7C-4BE9-B5C3-9FFC33857E9B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Partitions will be aligned on 8-sector boundaries
Total free space is 68359389 sectors (32.6 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       555513495   264.7 GiB   AF00  Untitled
   3       555513496       556783031   619.9 MiB   AB00  Recovery HD

If someone can help me to fix this, I would really appreciate that.
 

jrgmisery

macrumors newbie
Apr 23, 2015
2
0
a dilemma and personal request for help...

Chris (or anyone),

I really appreciate your knowledge and expertise. I have read through the information here and have a very similar story. Though I do have a back up of both partitions, they are not as recent as I'd like.

My story: went to load the Windows partition with BOOTCAMP and got the message: Missing Operating System.

Loaded back into the Mac OS X 10.5.8 and the previously mounted disk was now unmounted and greyed out and renamed disk0s3.

Here is the information on my system, I was hoping you could walk me through this as I only use my mac for video and picture and the windows 7 partition via bootcamp for software and work...

MACPC:~ jrgmisery$ sudo fdisk /dev/disk0
Disk: /dev/disk0 geometry: 91201/255/63 [1465149168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 0 0 2 - 25 127 14 [ 1 - 409639] <Unknown ID>
2: AF 25 127 15 - 1023 254 63 [ 409640 - 154927104] HFS+
*3: 07 1023 254 63 - 1023 254 63 [ 155600896 - 731598848] HPFS/QNX/AUX
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
___________________________
MACPC:~ jrgmisery$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *698.6 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS WD_Mac 348.9 Gi disk0s2
3: Microsoft Basic Data 349.4 Gi disk0s3
____________________________

*I am having a difficult time getting gpt fdisk to work (sudo gdisk –l /dev/disk0). Maybe I didn’t install correctly?

What, if anything, could I do to access some simple documents from the Windows partition? I'm not necessarily bent on booting the windows os again...only saving (if possible) the last couple weeks of work.

Thanks in advance…
 

doynton

macrumors 6502
Oct 19, 2014
299
17
*I am having a difficult time getting gpt fdisk to work (sudo gdisk –l /dev/disk0). Maybe I didn’t install correctly?
I can't answer your question but your syntax for gdisk is wrong. I think you don't want the -l switch.

Try like this:

Code:
adams-mbp:~ adam$ [COLOR="Red"]sudo gdisk /dev/disk0[/COLOR]
Password:
GPT fdisk (gdisk) version 0.8.10

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): [COLOR="Red"]p[/COLOR]
Disk /dev/disk0: 236978176 sectors, 113.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 9730D1EA-8014-43FD-A713-9AB93CD62EBE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 236978142
Partitions will be aligned on 8-sector boundaries
Total free space is 3093 sectors (1.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       106802351   50.7 GiB    AF00  Yosemite
   3       106802352       108071887   619.9 MiB   AB00  Recovery HD
   4       108072960       236976127   61.5 GiB    0700  Windows10

Command (? for help):
 

jrgmisery

macrumors newbie
Apr 23, 2015
2
0
Aha! Thanks!

:~ jrgmisery$ sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0 geometry: 91201/255/63 [1465149168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 0 0 2 - 25 127 14 [ 1 - 409639] <Unknown ID>
2: AF 25 127 15 - 1023 254 63 [ 409640 - 731643904] HFS+
*3: 07 1023 254 63 - 1023 254 63 [ 732317696 - 732829696] HPFS/QNX/AUX
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

:~ jrgmisery$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *698.6 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS WD_Mac 348.9 Gi disk0s2
3: Microsoft Basic Data 349.4 Gi disk0s3

:~ jrgmisery$ sudo gdisk /dev/disk0
GPT fdisk (gdisk) version 0.7.1

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

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/disk0: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): F719010E-013A-499D-9BA9-E8A220C2741E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149132
Partitions will be aligned on 8-sector boundaries
Total free space is 265899 sectors (129.8 MiB)

Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 732053543 348.9 GiB AF00 Untitled
3 732317696 1465147391 349.4 GiB 0700 Linux/Windows data
 

Jack Dan

macrumors newbie
May 16, 2015
2
0
Windows 7 partition won`t boot - not bootcamp

Hello everyone!
First of all, i`m impressed by the nohow of the users and admins of macrumors.
I had always come here to check for answers, but this time, it became to confusing. Would appreciate your help.
Problem:

Partitioned a 500GB hard drive (slim HGST drive) in my macbook pro 5.1.
Two visible partitions were created.
Windows 7 Professional 64bits was installed (NTFS) over second partition, of ±450GB.
After installing Windows 7, installed OS X Leopard (HFS+)to the first partition ± 50GB.
They were working ok.
After installing the infamous hfs+ paragon driver on windows, things have changed.

Well, I can't boot windows since then. Because Leopard is a weak system, I erased it and Installed Yosemite as a clean install from a USB (entire procedure with the apple disk utility). Now I have the Windows partition that I can see the greyed disk0s4 (was disk0s3) and the working Yosemite partition.

So here is my data:

Last login: Sat May 16 10:16:29 on console
Jacks-MacBook-Pro:~ jackdaniel$ sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0 geometry: 60801/255/63 [976773168 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 [ 411648 - 103590112] HFS+
3: AB 1023 254 63 - 1023 254 63 [ 104001760 - 1269536] Darwin Boot
4: 0C 1023 254 63 - 1023 254 63 [ 105271296 - 871501824] Win95 FAT32L

Jacks-MacBook-Pro:~ jackdaniel$ sudo gdisk -l /dev/disk0

GPT fdisk (gdisk) version 1.0.0
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!

Partition table scan:

MBR: hybrid
BSD: not present
APM: not present
GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/disk0: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 5646FAF4-E9C6-4E5D-AAF3-2F03B78B31F3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number Start (sector) End (sector) Size Code Name

1 40 409639 200.0 MiB EF00 EFI System Partition
2 411648 104001759 49.4 GiB AF00 Apple_HFS_Untitled_2
3 104001760 105271295 619.9 MiB AB00 Recovery HD
4 105271296 976773119 415.6 GiB 0700

The "hold option" function brings me Recovery HD and Yosemite options.
The rEFInd brings me Recovery HD, Yosemite and Windows options, but Windows stops probably when trying to call the boot loader, so stays black screen. From the beginning boot over Windows was always weak, sometimes didn't boot, I had to restart the machine several times.

Anyway, I will need that data that was into Windows. Never would assume paragon hfs+ would harm my boot sectors.

Anyone?
 

scionwest

macrumors newbie
Nov 29, 2012
2
0
OK based on the MBR data and this GPT data, I'm confident that partitions 1 through 4 have the correct values. Best practices suggests you go to the recovery menu and issue the c command to load the backup partition table, and issue the p command to display it. Then compare the backup and primary. The thing is, the backup CRC is known to be bad, so I don't know that the backup table will tell us anything we don't already know.

So if you want, go to the recovery/transform menu by typing r <enter>, then switch to the backup GPT with c <enter> and then p <enter> to display. Copy paste that.

Otherwise your next step is to make sure you have backups of your most important data on the Mac side, if you haven't already, and then do the following. IF YOU GET CONFUSED OR GET ANY ERROR MESSAGES, STOP. You can use CONTROL-C to quit gdisk at any time, it does not work on the on-disk partition data, only on an in-memory copy, unless and until you use the w command to write it to the disk. So you can bail out at any time until then.

I'm not sure if you're quitting out of gdisk each time or staying put so I'll start from the beginning. First column is the command, and the 2nd column is the description of what it does.
Code:
sudo gdisk /dev/disk0
2 <enter>           choose GPT
d 17 <enter>        delete partition 17
d 18 <enter>        delete partition 18
r <enter>           recovery menu
v <enter>           verify disk
h <enter>           create new hybrid MBR
2 3 4 <enter>       add partitions 2 3 4 to the MBR
y <enter>           yes, place EFI GPT first
<enter>             accept default value for partition 2
n <enter>           do not make it bootable
<enter>             accept default value for partition 3
n <enter>           do not make it bootable
<enter>             accept default value for partition 4
y <enter>           do make it bootable
o <enter>           display the MBR to confirm it's correct, should have three entries, last one has a * under the boot column.
w <enter>           write out the new partitions to disk

This will write out repaired GPT primary and secondary headers and tables, and a new (hybrid) MBR. You should now be able to boot either OS X or Windows.

I've spent the last two days trying to fix a botched boot partition record caused by Parallels failing while creating a VM off my Bootcamp partition. After 6 different exchanges with Parallels support, I was about to give up and just reinstall Windows 10, and then I discovered this. This solution worked awesome! I wish I could buy you a beer.

Cheers!
 

smokeysailor

macrumors newbie
Oct 5, 2015
1
0
Hello

I am a sailor and due to report to my ship & sail out this coming Saturday 10/10/2015.

I have a mid-2009 13" silver MBP which also has win10 loaded using boot camp. The Win 10 side has all my USCG certifications, professional licenses, email exchanges with USCG, accounts, etc.

I downloaded and installed El Capitan and when rebooting, I noticed the option of booting up in Win 10 gone. Pressing the Option key gave me 2 options of booting up either in El Capitan or the Recovery Disk. A friend put in the following sudo command, "sudo nvram boot-args="kext-dev-mode=1 rootless=0” and now the boot select screen does not show that option (Recovery disk) either.

This is what diskutil list shows:

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *250.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Xxxx Xxxxxxxxx 154.1 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data 75.2 GB disk0s4



When I type diskutil cs list into Terminal, I get No CoreStorage logical volume groups found.

Typing sudo gpt -vv -r show /dev/disk0 got

gpt show: disk0: mediasize=250059350016; sectorsize=512; blocks=488397168

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 488397167

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 301020320 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

301429960 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

302699496 38824984

341524480 146872320 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

488396800 335

488397135 32 Sec GPT table

488397167 1 Sec GPT header

Typing sudo fdisk /dev/disk0 got:

Disk: /dev/disk0 geometry: 30401/255/63 [488397168 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 - 301020320] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 301429960 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 341524480 - 146872320] Win95 FAT32L

Typing sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null / hexdump -C got me nothing

Typing diskutil info /dev/disk0s4 got me the following:

Device Identifier: disk0s4

Device Node: /dev/disk0s4

Whole: No

Part of Whole: disk0

Device / Media Name: BOOTCAMP

Volume Name:

Mounted: No

File System Personality: MS-DOS

Type (Bundle): msdos

Name (User Visible): MS-DOS (FAT)

Partition Type: Microsoft Basic Data

OS Can Be Installed: No

Media Type: Generic

Protocol: SATA

SMART Status: Verified

Disk / Partition UUID: 26E51FF2-1C10-406A-8099-D2DD8ADBC1A8

Total Size: 75.2 GB (75198627840 Bytes) (exactly 146872320 512-Byte-Units)

Volume Free Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)

Device Block Size: 512 Bytes

Read-Only Media: No

Read-Only Volume: Not applicable (not mounted)

Device Location: Internal

Removable Media: No

Solid State: No

------------------------------------------------------------------------------------------

Also, a few months back I had re-partitioned the hard disk with both Yosemite and Win 7 on it, to make space for Win 10.

How can I undo the sudo command and get back the Win 10 partition? I can't see the Boot Camp/Win 10 partition neither in Start up Disk and Disk Utility.

Somebody has suggested that I use sudo bless –folder /System/Library/CoreServices –setBoot Should I?

PLEASE HELP. I need to get access to my documents, accounts and co email before Saturday.

Thank you in advance.



Thanks in advance.
 

doynton

macrumors 6502
Oct 19, 2014
299
17
You can reset the change to NVRAM by holding the 4 keys "command" "option" "P" "R" at startup until it beeps a couple of times. https://support.apple.com/en-us/HT204063

I've never blessed anything to get 10 to work so no I'd not do that. Most likely your windows partition isn't marked bootable. Please show results of sudo fdisk /dev /disk0.

When you post results here please put [xCODE] . .whatever text you want to post.. [x/CODE] tags around your text (deleting the x after the [ in both cases) as it makes it much easier to read - like this:

Code:
adams-mbp:~ adam$ sudo fdisk /dev/disk0
.
   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 -  106392712] HFS+
 3: AB 1023 254  63 - 1023 254  63 [ 106802352 -  1269536] Darwin Boot
*4: 0C 1023 254  63 - 1023 254  63 [ 108072960 -  128903168] Win95 FAT32L

You should see an asterisk ("*") next to your 10 partition.

Have a look here https://forums.macrumors.com/threads/windows-10-boot-drive-vanished.1914761/#post-21829011
 
Last edited:

puagardian

macrumors newbie
Feb 9, 2016
1
0
Ukraine
Hello fellas. I got a related issue with my Mac. Accidentally I deleted Windows boot partition (Protective Master Boot Record?) and now can't boot to Windows. How can I restore it safely?
 

r0bly0ns

macrumors newbie
Jun 18, 2013
2
0
OK based on the MBR data and this GPT data, I'm confident that partitions 1 through 4 have the correct values. Best practices suggests you go to the recovery menu and issue the c command to load the backup partition table, and issue the p command to display it. Then compare the backup and primary. The thing is, the backup CRC is known to be bad, so I don't know that the backup table will tell us anything we don't already know.

So if you want, go to the recovery/transform menu by typing r <enter>, then switch to the backup GPT with c <enter> and then p <enter> to display. Copy paste that.

Otherwise your next step is to make sure you have backups of your most important data on the Mac side, if you haven't already, and then do the following. IF YOU GET CONFUSED OR GET ANY ERROR MESSAGES, STOP. You can use CONTROL-C to quit gdisk at any time, it does not work on the on-disk partition data, only on an in-memory copy, unless and until you use the w command to write it to the disk. So you can bail out at any time until then.

I'm not sure if you're quitting out of gdisk each time or staying put so I'll start from the beginning. First column is the command, and the 2nd column is the description of what it does.
Code:
sudo gdisk /dev/disk0
2 <enter>           choose GPT
d 17 <enter>        delete partition 17
d 18 <enter>        delete partition 18
r <enter>           recovery menu
v <enter>           verify disk
h <enter>           create new hybrid MBR
2 3 4 <enter>       add partitions 2 3 4 to the MBR
y <enter>           yes, place EFI GPT first
<enter>             accept default value for partition 2
n <enter>           do not make it bootable
<enter>             accept default value for partition 3
n <enter>           do not make it bootable
<enter>             accept default value for partition 4
y <enter>           do make it bootable
o <enter>           display the MBR to confirm it's correct, should have three entries, last one has a * under the boot column.
w <enter>           write out the new partitions to disk

This will write out repaired GPT primary and secondary headers and tables, and a new (hybrid) MBR. You should now be able to boot either OS X or Windows.


You sir, are a certified star.
 

rtfmoz

macrumors newbie
Feb 25, 2014
18
0
Lost bootcamp partition. Was it the recent update from Apple? No idea. OSX Version is 10.11.4. Bootcamp is Windows 10. Was using Windows when it was installed. Then eventually switched back to OSX. Installed 10.11.4 update today. Tried to switch back to Windows 10 but no options available. Even boot with option button pressed doesnt give me anything. This is the first time I have tried to switch back to Windows so not sure whats happened.

Code:
MacBook-Pro-2:~ kevin$ sudo gpt -r -vv show disk0
gpt show: disk0: mediasize=1000555581440; sectorsize=512; blocks=1954210120
gpt show: disk0: PMBR 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         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6       
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640  1785811592      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  1786221232     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  1787490768        1584       
  1787492352   165795840      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953288192      921600      5  GPT part - DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
  1954209792         295       
  1954210087          32         Sec GPT table
  1954210119           1         Sec GPT header

[MacBook-Pro-2:~ kevin$ 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 1023 254  63 - 1023 254  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     

[MacBook-Pro-2:~ kevin$ sudo gdisk -l /dev/disk0
GPT fdisk (gdisk) version 1.0.1

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/disk0: 1954210120 sectors, 931.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): BECDFAE0-D888-4325-BC76-7A7BC7EC2D3E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1954210086
Partitions will be aligned on 8-sector boundaries
Total free space is 1885 sectors (942.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640      1786221231   851.5 GiB   AF05  Macintosh SSD
   3      1786221232      1787490767   619.9 MiB   AB00  Recovery HD
   4      1787492352      1953288191   79.1 GiB    0700  BOOTCAMP
   5      1953288192      1954209791   450.0 MiB   2700

Any advice would be appreciated.
 

rtfmoz

macrumors newbie
Feb 25, 2014
18
0
Lost bootcamp partition. Was it the recent update from Apple? No idea. OSX Version is 10.11.4. Bootcamp is Windows 10. Was using Windows when it was installed. Then eventually switched back to OSX. Installed 10.11.4 update today. Tried to switch back to Windows 10 but no options available. Even boot with option button pressed doesnt give me anything. This is the first time I have tried to switch back to Windows so not sure whats happened.

Any advice would be appreciated.

Solved. Turns out NTFS for Max OSX by Paragon Software recognizes the boot partition of Windows 10 and takes control of it. As a result it no longer appear as a boot option if you press the option key when booting. You just need to go to System Preferences -> NTFS for Mac, then choose the boot location there. If you don't like this you can disable the NTFS driver in the same window. Then the OS will recognize the Windows 10 partition again on boot.
 

aidanpendragon

macrumors 6502a
Jul 26, 2005
928
8
My 2011 Mac Mini stopped booting. I feared it was a hardware problem (full details in this thread in the Mini subforum), but I stumbled on this thread and now I'm wondering if my recent addition of the Paragon NTFS and HFS+ drivers in my OS X and Windows partitions screwed up my ability to boot either of those partitions. If I boot from my external backup, I can access all my data--just can't boot. Would any of the solutions above help? I have zero experience with Terminal.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.