3

On my Mac Mini 2014 I tried to repair GPT table (MBR.. ?) with an answer given on Trying to rebuild my partition map (using GPT fdisk, SIP disabled) for my issue of Windows 10 not booting itself but by going through the Option menu on each boot. And, it's messed up now.

I can't boot to any of the OS now. I even can't reinstall the MacOS. I have tried to take screenshots of the output with the reference of the thread. Please help me to recover my OSs.

Disk Utility

Disk List

Show Disk

Mount Disk

fdisk

HUM

MacOSWindows 10

New screenshots:

  1. DiskUtil New DiskUtil

Additional information:

Hums-Mac-mini:~ humgurung$ ls /Volumes/BOOTCAMP/boot/bcd
ls: /Volumes/BOOTCAMP/boot/bcd: No such file or directory
Hums-Mac-mini:~ humgurung$ sudo diskutil mount disk0s1
Volume EFI on disk0s1 mounted
Hums-Mac-mini:~ humgurung$ ls /Volumes/EFI/EFI/Microsoft/Boot/bcd
ls: /Volumes/EFI/EFI/Microsoft/Boot/bcd: No such file or directory
Hums-Mac-mini:~ humgurung$ diskutil unmount disk0s1
Volume EFI on disk0s1 unmounted

Hums-Mac-mini:~ humgurung$ 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 0 0 2 - 25 127 14 [ 1 - 409639] <Unknown ID> 2: AF 25 127 15 - 1023 254 63 [ 409640 - 195312496] HFS+
*3: F7 1023 254 63 - 1023 254 63 [ 195723264 - 781049856] <Unknown ID> 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
Hums-Mac-mini:~ humgurung$

UPDATE 2 RESULT: fdisk disk0

  • 1
    What exactly did you boot to when you made the screenshots? Do you know which versions of macOS and Windows you have installed? Can you provide a screenshot of fdisk /dev/disk0? – David Anderson Mar 02 '23 at 08:42
  • I pressed Command+R key then the power button for recovery mode, then used Terminal. It's Monterey (100gb) and Windows 10 (400gb). Screenshots were added to the question above. – Hum Gurung Mar 02 '23 at 09:10
  • Why is there an image of a Windows PC? I don't quite get it – Thinkr Mar 02 '23 at 12:12
  • The Windows PC image is while trying to boot to bootcamp and elaborate on the issue. – Hum Gurung Mar 02 '23 at 12:19

1 Answers1

3

This answer is only intended make macOS bootable. There may be further repairs which need to be made.

You should be able to use the following command to make macOS bootable.

fdisk -e /dev/disk0

This command is interactive. Enter the values in the order given in the first column of the table below.

Entry Type Comment
e 4 command Edit given table entry 4
0 parameter Partition id ('0' to disable)
q command Quit edit of current MBR, saving current changes

Update 1:

If the Boot Camp Assistant is used to install Windows 10 on your 2014 Mac, Windows 10 is installed to UEFI boot. From what you have posted so far, it would appear Windows 10 is installed to BIOS boot. This could happen if you upgraded from a previous Windows install (such as Windows 7). The existence of a BCD file in the /Volumes/BOOTCAMP/boot folder would indicate BIOS booting. In other words, the output from the command below can be used to help determined is Windows BIOS boots.

ls /Volumes/BOOTCAMP/boot/bcd

The existence of a BCD file in the /Volumes/EFI/EFI/Microsoft/Boot folder would indicate UEFI booting. In other words, the output from the commands below can be used to help determined is Windows UEFI boots.

sudo diskutil mount disk0s1
ls /Volumes/EFI/EFI/Microsoft/Boot/bcd
diskutil unmount disk0s1

Could you enter the above commands while booted to macOS and post the output?


Update 2:

The id the MBR table for the third partition should be 07. This can be changed by entering the following command while booted to recovery mode.

fdisk -e /dev/disk0

The interactive entries can be taken from the first column of the table below.

Entry Type Comment
s 3 command Set the identifier of table entry 3
7 parameter Partition id
q command Quit edit of current MBR, saving current changes
y parameter (Optional) Enter if asked for OK

Note: In the MBR table, the id of the second partition currently is AF, which represents a HFS+ type partition. Actually, your second partition is APFS, but since there is no official id assigned to APFS, you might as well leave the id as AF.

  • Thank you, David. It is much appreciated. It worked like a charm. I can boot to MacOS now. I would be grateful if you could send me the instructions on further repairs to be made. – Hum Gurung Mar 02 '23 at 10:51
  • Post the current output for diskutil list and fdisk /dev/disk0. – David Anderson Mar 02 '23 at 10:57
  • diskutil list - screenshot added to the question above as I can't post in the comment here.
  • fdisk result:
  • fdisk: /dev/disk0: Permission denied

    – Hum Gurung Mar 02 '23 at 11:20
  • 1
    I assumed you would be entering the fdisk /dev/disk0 command from recovery, as you did when you first posted the output. You might be able to from macOS, but you would need to use sudo fdisk /dev/disk0 and have disabled SIP. – David Anderson Mar 02 '23 at 11:46
  • I entered the 'fdisk /dev/disk0' from macOS
  • Yes, the bootcamp was upgraded from Windows 7 to Windows 10
  • Additional/updated output is added to the original quesion
  • – Hum Gurung Mar 02 '23 at 12:11
  • Thank you again, David. After the Update 2 command, I can access Windows 10 by pressing 'Option' key while booting, otherwise, it boots to macOS even if I target restart 'Bootcamp'. fdisk command screenshot is posted above. – Hum Gurung Mar 02 '23 at 16:20
  • Furthermore, I had an additional partition within Windows 10 with Drive letter E: and it's missing now. – Hum Gurung Mar 02 '23 at 17:27
  • After pressing 'Option' key while booting, you have to hold down the 'Control' key when targeting restart 'Bootcamp' in order to make Boot Camp the default. – David Anderson Mar 03 '23 at 01:14
  • According to the values in the partition tables, there is no space for an additional drive E:. Perhaps the some of the values are wrong. Is the BOOTCAMP volume suppose to be 400 GB in size? – David Anderson Mar 03 '23 at 01:17
  • Yes, the BOOTCAMP volume is 400 GB in the size. – Hum Gurung Mar 03 '23 at 01:27