Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't boot to Windows 10 after resizing partition

Hello,


unfortunately I probably did exatly the same, and have the same problem as described in the following post Re: [Help] Can't boot to windows (8.1) after resizing partition

caused by trying to resize my windows bootcamp partition. I wanted to shrink mac partition by 30 Gig and wanted to add this to windows 10 partition.


It would be great, if someone could help my getting my bootcamp WIN 10 back to life. Currently it is no more booting.

I already diabled SIP. And have now to rebuild non-standard MBR.


Thanks in advance for assistance.

gaude_

MacBook Pro, OS X El Capitan (10.11.6), WIndows 10

Posted on Mar 3, 2018 5:49 AM

Reply
Question marked as Best reply

Posted on Mar 4, 2018 3:27 PM

Yes, this is expected. You now will need to run Startup Repair from the Windows Installer to fix the issue.


One option to consider is Use Bootrec.exe in the Windows RE to troubleshoot startup issues and look at /fixboot and /fixMBR options.

Similar questions

27 replies

Mar 3, 2018 9:38 AM in response to gaude_

Your computer does not support Internet Recovery - Computers that can be upgraded to use OS X Internet Recovery - Apple Support .


Since you reference SIP, you must be on El Capitan or higher. You should install macOS on an external disk, using Local Recovery and boot from it. See the following links...


How to select a different startup disk - Apple Support

How to reinstall macOS - Apple Support


Once you boot from the external disk, we can correct the GPT using the outlined steps on the internal disk.

Mar 3, 2018 8:20 AM in response to gaude_

We need to rebuild the GPT in Internet Recovery. Boot into Internet Recovery using Command+Opt+R during boot. In Internet Recovery, to post the contents of the Terminal session, you can use (or post screen photos)


  • Select
  • Copy (Command+C)
  • Quit Terminal
  • Start Safari (Get Help Online)
  • Paste (Command+V) the copied text as a reply to this discussion. It is a bit of work to switch between Terminal and Safari, but it is very helpful.


Here are the steps to rebuilding the GPT. I have used the values from your GPT output.


Unmount the whole disk. After you add each GPT entry, the disk will be mounted again, unmount the whole disk before the next GPT add command.


  • Destroy the current GPT
    • diskutil unmountDisk disk0
    • gpt destroy /dev/disk0
  • Create an empty GPT
    • gpt create /dev/disk0
    • diskutil unmountDisk Disk0
  • Add GPT entries in sequence, and unmount disk0 as necessary.
    • EFI - gpt add -i 1 -b 40 -s 409600 -t efi /dev/disk0
    • macOS - gpt add -i 2 -b 409640 -s 224520976 -t hfs /dev/disk0
    • Recovery - gpt add -i 3 -b 224930616 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk0
    • Partition Ohne Titel - gpt add -i 4 -b 226200152 -s 58791336 -t hfs /dev/disk0
    • Bootcamp - gpt add -i 5 -b 285253632 -s 105467904 -t windows /dev/disk0
  • Post the output of
    • gpt -vv -r show /dev/disk0
    • diskutil list


Please verify the values of start/size for each entry with the original values from the GPT command you posted. If you see any errors except the mount/unmount issues, stop. Post the output of the entire Terminal session for verification.


Once your GPT is rebuilt, then we can tackle merging/expanding the Windows partition, using GParted.

Mar 3, 2018 6:04 AM in response to gaude_

MacBook-Pro:~ gaude$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *200.0 GB disk0

1: Microsoft Basic Data BOOTCAMP 54.0 GB disk0s5

2: EFI EFI 209.7 MB disk0s6

3: Apple_HFS Macintosh 115.0 GB disk0s7

4: Apple_Boot Recovery HD 650.0 MB disk0s8

5: Apple_HFS Ohne Titel 30.1 GB disk0s9

MacBook-Pro:~ gaude$


MacBook-Pro:~ gaude$ diskutil cs list

No CoreStorage logical volume groups found

MacBook-Pro:~ gaude$


gpt show: /dev/disk0: mediasize=200049647616; sectorsize=512; blocks=390721968

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 390721967

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 1 1 GPT part - A18F7A74-2D74-4AA0-8F1C-EDC8E0B6535C

35 1 2 GPT part - A18F7A74-2D74-4AA0-8F1C-EDC8E0B6535C

36 1 3 GPT part - A18F7A74-2D74-4AA0-8F1C-EDC8E0B6535C

37 1 4 GPT part - A18F7A74-2D74-4AA0-8F1C-EDC8E0B6535C

38 2

40 409600 6 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 224520976 7 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

224930616 1269536 8 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

226200152 58791336 9 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

284991488 262144

285253632 105467904 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

390721536 399

390721935 32 Sec GPT table

390721967 1 Sec GPT header



sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 24321/255/63 [390721968 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

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

1: EE 0 0 2 - 1023 254 63 [ 1 - 390721934] <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

Mar 3, 2018 3:41 PM in response to Loner T

sudo su

sh-3.2# gpt destroy /dev/disk0

sh-3.2# gpt create /dev/disk0

sh-3.2# diskutil unmountDisk Disk0

Unmount failed for Disk0

sh-3.2# EFI - gpt add -i 1 -b 40 -s 409600 -t efi /dev/disk0

sh: EFI: command not found

sh-3.2# gpt add -i 1 -b 40 -s 409600 -t efi /dev/disk0

/dev/disk0s1 added

sh-3.2# gpt add -i 2 -b 409640 -s 224520976 -t hfs /dev/disk0

/dev/disk0s2 added

sh-3.2# gpt add -i 3 -b 224930616 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk0

gpt add: unable to open device '/dev/disk0': Resource busy

sh-3.2# diskutil unmountDisk disk0

Unmount of all volumes on disk0 was successful

sh-3.2# gpt add -i 3 -b 224930616 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk0

/dev/disk0s3 added

sh-3.2# gpt add -i 4 -b 226200152 -s 58791336 -t hfs /dev/disk0

gpt add: unable to open device '/dev/disk0': Resource busy

sh-3.2# diskutil unmountDisk disk0

Unmount of all volumes on disk0 was successful

sh-3.2# gpt add -i 4 -b 226200152 -s 58791336 -t hfs /dev/disk0

/dev/disk0s4 added

sh-3.2# gpt add -i 5 -b 285253632 -s 105467904 -t windows /dev/disk0

gpt add: unable to open device '/dev/disk0': Resource busy

sh-3.2# diskutil unmountDisk disk0

Unmount of all volumes on disk0 was successful

sh-3.2# gpt add -i 5 -b 285253632 -s 105467904 -t windows /dev/disk0

/dev/disk0s5 added

sh-3.2# gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=200049647616; sectorsize=512; blocks=390721968

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 390721967

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

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

226200152 58791336 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

284991488 262144

285253632 105467904 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

390721536 399

390721935 32 Sec GPT table

390721967 1 Sec GPT header

sh-3.2# diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *200.0 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh 115.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Apple_HFS Ohne Titel 30.1 GB disk0s4

5: Microsoft Basic Data BOOTCAMP 54.0 GB disk0s5

/dev/disk1 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *2.0 TB disk1

1: EFI EFI 209.7 MB disk1s1

2: Apple_HFS Ohne Titel 2.0 TB disk1s2

3: Apple_Boot Recovery HD 650.0 MB disk1s3

sh-3.2#

Mar 3, 2018 3:51 PM in response to gaude_

gaude_ wrote:


I tried to reboot Windows after this, but it still says "No bootable device -- insert boot disk and pres any key"

It will not boot. If we create a MBR now to make it boot, we will have to redo it again, after you expand NTFS, hence it is easier to do it just once. Can you post the output of


sudo dd if=/dev/rdisk0s5 count=1 2>/dev/null | hexdump -C


This will show the first block of the NTFS header.

Mar 3, 2018 4:16 PM in response to Loner T

macOS still works fine ... following the requested output


sudo dd if=/dev/rdisk0s5 count=1 2>/dev/null | hexdump -C

Password:

00000000 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00 |.R.NTFS .....|

00000010 00 00 00 00 00 f8 00 00 3f 00 ff 00 00 a0 00 11 |........?.......|

00000020 00 00 00 00 80 00 80 00 ff 3f 3b 06 00 00 00 00 |.........?;.....|

00000030 00 00 0c 00 00 00 00 00 02 00 00 00 00 00 00 00 |................|

00000040 f6 00 00 00 01 00 00 00 ad 1d 35 c4 4a 35 c4 66 |..........5.J5.f|

00000050 00 00 00 00 fa 33 c0 8e d0 bc 00 7c fb 68 c0 07 |.....3.....|.h..|

00000060 1f 1e 68 66 00 cb 88 16 0e 00 66 81 3e 03 00 4e |..hf......f.>..N|

00000070 54 46 53 75 15 b4 41 bb aa 55 cd 13 72 0c 81 fb |TFSu..A..U..r...|

00000080 55 aa 75 06 f7 c1 01 00 75 03 e9 dd 00 1e 83 ec |U.u.....u.......|

00000090 18 68 1a 00 b4 48 8a 16 0e 00 8b f4 16 1f cd 13 |.h...H..........|

000000a0 9f 83 c4 18 9e 58 1f 72 e1 3b 06 0b 00 75 db a3 |.....X.r.;...u..|

000000b0 0f 00 c1 2e 0f 00 04 1e 5a 33 db b9 00 20 2b c8 |........Z3... +.|

000000c0 66 ff 06 11 00 03 16 0f 00 8e c2 ff 06 16 00 e8 |f...............|

000000d0 4b 00 2b c8 77 ef b8 00 bb cd 1a 66 23 c0 75 2d |K.+.w......f#.u-|

000000e0 66 81 fb 54 43 50 41 75 24 81 f9 02 01 72 1e 16 |f..TCPAu$....r..|

000000f0 68 07 bb 16 68 52 11 16 68 09 00 66 53 66 53 66 |h...hR..h..fSfSf|

00000100 55 16 16 16 68 b8 01 66 61 0e 07 cd 1a 33 c0 bf |U...h..fa....3..|

00000110 0a 13 b9 f6 0c fc f3 aa e9 fe 01 90 90 66 60 1e |.............f`.|

00000120 06 66 a1 11 00 66 03 06 1c 00 1e 66 68 00 00 00 |.f...f.....fh...|

00000130 00 66 50 06 53 68 01 00 68 10 00 b4 42 8a 16 0e |.fP.Sh..h...B...|

00000140 00 16 1f 8b f4 cd 13 66 59 5b 5a 66 59 66 59 1f |.......fY[ZfYfY.|

00000150 0f 82 16 00 66 ff 06 11 00 03 16 0f 00 8e c2 ff |....f...........|

00000160 0e 16 00 75 bc 07 1f 66 61 c3 a1 f6 01 e8 09 00 |...u...fa.......|

00000170 a1 fa 01 e8 03 00 f4 eb fd 8b f0 ac 3c 00 74 09 |............<.t.|

00000180 b4 0e bb 07 00 cd 10 eb f2 c3 0d 0a 41 20 64 69 |............A di|

00000190 73 6b 20 72 65 61 64 20 65 72 72 6f 72 20 6f 63 |sk read error oc|

000001a0 63 75 72 72 65 64 00 0d 0a 42 4f 4f 54 4d 47 52 |curred...BOOTMGR|

000001b0 20 69 73 20 63 6f 6d 70 72 65 73 73 65 64 00 0d | is compressed..|

000001c0 0a 50 72 65 73 73 20 43 74 72 6c 2b 41 6c 74 2b |.Press Ctrl+Alt+|

000001d0 44 65 6c 20 74 6f 20 72 65 73 74 61 72 74 0d 0a |Del to restart..|

000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

000001f0 00 00 00 00 00 00 8a 01 a7 01 bf 01 00 00 55 aa |..............U.|

00000200

Mar 4, 2018 2:08 PM in response to Loner T

Since deleting "Ohne Titel" partition was already done with GParted before resizing NTFS was not possible, I am not sure if 3 4 5 at step 6 is correct.

I poste the output of steps 1 to 5.... It would be great, if you could have a look, what would be the correct value. Thanks for all your efforts till now supporting me !!!


gdisk /dev/rdisk0

GPT fdisk (gdisk) version 1.0.3


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/rdisk0: 390721968 sectors, 186.3 GiB

Sector size (logical): 512 bytes

Disk identifier (GUID): FFF3C475-3990-4175-A9F7-C9618E3221B2

Partition table holds up to 128 entries

Main partition table begins at sector 2 and ends at sector 33

First usable sector is 34, last usable sector is 390721934

Partitions will be aligned on 8-sector boundaries

Total free space is 59053885 sectors (28.2 GiB)


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

1 40 409639 200.0 MiB EF00

2 409640 224930615 107.1 GiB AF00

3 224930616 226200151 619.9 MiB AB00

5 285253632 390721535 50.3 GiB 0700


Command (? for help): R


Recovery/transformation command (? for help): O


Disk size is 390721968 sectors (186.3 GiB)

MBR disk identifier: 0x64A6D0C4

MBR partitions:


Number Boot Start Sector End Sector Status Code

1 1 409639 primary 0xEE

2 * 409640 224930615 primary 0xAF

3 224930616 226200151 primary 0xAF


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:

Mar 4, 2018 2:15 PM in response to gaude_

gaude_ wrote:


Since deleting "Ohne Titel" partition was already done with GParted before resizing NTFS was not possible, I am not sure if 3 4 5 at step 6 is correct.

I poste the output of steps 1 to 5.... It would be great, if you could have a look, what would be the correct value. Thanks for all your efforts till now supporting me !!!




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

1 40 409639 200.0 MiB EF00

2 409640 224930615 107.1 GiB AF00

3 224930616 226200151 619.9 MiB AB00

5 285253632 390721535 50.3 GiB 0700

You will need to use 2 3 5, since GPT4 ("Ohne Titel") was deleted. It may give you an error about some free space, since you have 186GiB drive, but only 157(107+50) GiB is occupied. Say 'n' to such an error.

Mar 4, 2018 2:22 PM in response to Loner T

Further gdisk output - looked fine, since there was no error message ... will try to boot now


Type from one to three GPT partition numbers, separated by spaces, to be

added to the hybrid MBR, in sequence: 2 3 5

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):

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB):

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #5 (MBR partition #4)

Enter an MBR hex code (default 07):

Set the bootable flag? (Y/N): Y


Recovery/transformation command (? for help): O


Disk size is 390721968 sectors (186.3 GiB)

MBR disk identifier: 0x64A6D0C4

MBR partitions:


Number Boot Start Sector End Sector Status Code

1 1 409639 primary 0xEE

2 409640 224930615 primary 0xAF

3 224930616 226200151 primary 0xAB

4 * 285253632 390721535 primary 0x07


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/rdisk0.

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.

sh-3.2#

Can't boot to Windows 10 after resizing partition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.