1
HOW TO RECOVER BOOTCAMP PARTITION 1. Can you check if the NTFS header is intact? sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C 2. If you see "R.NTFS" in the first line try the following steps. The values shown here are from a different machine and may not match what you have. Use default except the boot ability of the last partition which should be 'y' as shown. sudo gdisk /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: hybrid BSD: not present APM: not present GPT: present Found valid GPT with hybrid MBR; using GPT. Command (? for help): p Disk /dev/disk0: 490234752 sectors, 233.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): 59BDFEEB-1EB4-4529-94FE-3CBC2C3CD513 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 2604 sectors (1.3 MiB) Number Start (sector) End (sector) Size Code Name 1 40 409639 200.0 MiB EF00 EF 2 409640 401060383 191.0 GiB AF05 Macintosh HD 3 401060384 402329919 619.9 MiB AB00 Re 4 402331648 490233848 41.9 GiB 0700 Microsoft basic data Command (? for help): r Recovery/transformation command (? for help): h WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one, just hit the Enter key at the below prompt and your MBR partition table will be untouched. Type from one to three GPT partition numbers, separated by spaces, to be added to the hybrid MBR, in sequence: 2 3 4 Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y Creating entry for GPT partition #2 (MBR partition #2) Enter an MBR hex code (default AF): AF Set the bootable flag? (Y/N): n Creating entry for GPT partition #3 (MBR partition #3) Enter an MBR hex code (default AB): AB Set the bootable flag? (Y/N): n Creating entry for GPT partition #4 (MBR partition #4) Enter an MBR hex code (default 07): 07 Set the bootable flag? (Y/N): y Recovery/transformation command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/disk0. Warning: Devices opened with shared lock will not have their partition table automatically reloaded! Warning: The kernel may continue to use old or deleted partitions. You should reboot or remove the drive. The operation has completed successfully. Now Reboot and verify the output of fdisk again. If it is correct, test Windows/Bootcamp.

Bootcamp Fix

Embed Size (px)

DESCRIPTION

Bootcamp Fix

Citation preview

  • HOW TO RECOVER BOOTCAMP PARTITION 1. Can you check if the NTFS header is intact? sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C 2. If you see "R.NTFS" in the first line try the following steps. The values shown here are from a different machine and may not match what you have. Use default except the boot ability of the last partition which should be 'y' as shown. sudo gdisk /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: hybrid BSD: not present APM: not present GPT: present Found valid GPT with hybrid MBR; using GPT. Command (? for help): p Disk /dev/disk0: 490234752 sectors, 233.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): 59BDFEEB-1EB4-4529-94FE-3CBC2C3CD513 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 2604 sectors (1.3 MiB) Number Start (sector) End (sector) Size Code Name 1 40 409639 200.0 MiB EF00 EF 2 409640 401060383 191.0 GiB AF05 Macintosh HD 3 401060384 402329919 619.9 MiB AB00 Re 4 402331648 490233848 41.9 GiB 0700 Microsoft basic data Command (? for help): r Recovery/transformation command (? for help): h WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one, just hit the Enter key at the below prompt and your MBR partition table will be untouched. Type from one to three GPT partition numbers, separated by spaces, to be added to the hybrid MBR, in sequence: 2 3 4 Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y Creating entry for GPT partition #2 (MBR partition #2) Enter an MBR hex code (default AF): AF Set the bootable flag? (Y/N): n Creating entry for GPT partition #3 (MBR partition #3) Enter an MBR hex code (default AB): AB Set the bootable flag? (Y/N): n Creating entry for GPT partition #4 (MBR partition #4) Enter an MBR hex code (default 07): 07 Set the bootable flag? (Y/N): y Recovery/transformation command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/disk0. Warning: Devices opened with shared lock will not have their partition table automatically reloaded! Warning: The kernel may continue to use old or deleted partitions. You should reboot or remove the drive. The operation has completed successfully. Now Reboot and verify the output of fdisk again. If it is correct, test Windows/Bootcamp.