TransWikia.com

Repairing Boot Camp on a secondary hard drive

Super User Asked by Jolin M on November 21, 2020

I managed to install Windows on a partition of a secondary hard drive with Winclone, but I am unable to boot on it.
Now when i choose windows as startup device i get the “No bootable device — insert boot disk and press any key” error.

I played a lot with eFit, rEFind, gptsync and friends, but I did not manage to fix it yet.

I found a similar thread, but I did not find anything about fixing the MBR for two drives.
(https://discussions.apple.com/thread/4144252?start=600&tstart=0)

Here is the last code I tried; I chicken’d out at the end…

Last login: Sat May 11 09:02:53 on console
Jolin-M:~ JolinM$ sudo gdisk /dev/disk0
GPT fdisk (gdisk) version 0.8.6

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

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/disk0: 125045424 sectors, 59.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 5AB6E84E-2E88-4DE1-9931-03182B67EABE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 125045390
Partitions will be aligned on 8-sector boundaries
Total free space is 13 sectors (6.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       123775847   58.8 GiB    AF00  SSD
   3       123775848       125045383   619.9 MiB   AB00  Recovery HD

Command (? for help): q   

Jolin-M:~ JolinM$ sudo gdisk /dev/disk1
GPT fdisk (gdisk) version 0.8.6

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/disk1: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0E0A8E5C-5CA7-4C12-AAA9-C454E9E6ABF1
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 8-sector boundaries
Total free space is 1271309 sectors (620.8 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       438299463   208.8 GiB   AF00  Untitled
   3       439570432       488396799   23.3 GiB    0700  BOOTCAMP

Command (? for help): w

Warning! Mismatched GPT and MBR partition! MBR partition 4, of type 0x07,
has no corresponding GPT partition! You may continue, but this condition
might cause data loss in the future!

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): n
Aborting write of new partition table.

Command (? for help): q

And here is the new code after a failed attempt to fix the mismatched.

Jolin-M:~ JolinM$ sudo gdisk /dev/disk1
GPT fdisk (gdisk) version 0.8.6

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


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************


Command (? for help): p
Disk /dev/disk1: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C9DD6E4E-F901-43E8-BFE6-56E0FD8A3E47
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 8-sector boundaries
Total free space is 1271309 sectors (620.8 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System
   2          409640       438299463   208.8 GiB   AF00  Apple HFS/HFS+
   3       439570432       488396799   23.3 GiB    0700  Microsoft basic data

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 488397168 sectors (232.9 GiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1    488397167   primary     0xEE

Recovery/transformation command (? for help): 

One Answer

First, heed gdisk's warning about mismatched GPT and MBR partition tables!!!! A common cause of this warning is that you've modified the MBR partition table using a GPT-unaware tool. This can happen if you use a Windows tool to repartition the disk. The problem is that the GPT is the real partition table, and sooner or later, the mismatch will cause problems because either the hybrid MBR will be overwritten (which will probably block access to the mis-matched partition it now contains) or the mis-matched partitions will cause Windows to write into a GPT partition that it should not be accessing. Chances are you want to find the start and end points of the mis-matched MBR partition and create a new GPT partition with the same start and end points (assuming this is possible; it might not be). You'll then need to re-create the hybrid MBR. OTOH, it's possible that the MBR partition is bogus and that whatever is in the GPT is correct. (This sort of ambiguity is one of the reasons I call hybrid MBRs both ugly and dangerous.) Make a backup of your partition table before you do this, though, read enough to understand what you're doing, and be careful! You can make a serious mess of things. My "Repairing GPT Disks" page gives a few pointers to get you started with this type of repair, but it's not a "recipe book" guide -- you must engage in problem-solving to fix this problem. An automated tool or step-by-step guide might get it right, but the risk of it making things worse is far too great.

Second, the "no bootable device" error can't be solved with gdisk or most other partitioning tools. That error is telling you that a BIOS-mode boot loader is not present on the disk device in question. You need to use a Windows recovery tool to re-write the boot loader. Unfortunately, I'm not very familiar with the tools required, so I can't give you step-by-step instructions. You'll probably need to do this from a Windows emergency disc. Be sure to do this only after you deal with your mis-matched MBR/GPT problem!

Answered by Rod Smith on November 21, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP