NicolasOtis

Q: BootCamp won't boot normally after a partition resize

Hi!

 

I read a lot about this issue since yesterday, but i haven't found a solution yet, so i'm asking for help! Here's the story.


I have a windows 7 partition on my iMac for gaming purpose. Last week, i resized my partitions without any problem using Disk Utility and a little software on Windows. Yesterday, i did the exact same thing because i needed a bit more space in my windows partition. After resizing in Disk Utility, i tried to switch over to my windows partition but it wouldn't appear on the startup screen.

 

With the help of another topic, i managed to make it bootable again, but now i'm getting «Missing operating system» error.

 

I already tried to use my Windows 7 installation disc to repair windows, but it's not able to finish the process.

 

I could delete the windows partition and reinstall windows on a fresh start, but it mean going over the process of downloading + installing all my games... so i'm hoping someone could help me bring my windows back to life!

 

I suspect you are gonna ask me to provide the input from this:

1. diskutil list

2. sudo gpt -vv -r show /dev/disk0

3. sudo fdisk /dev/disk0

 

... so here they are!

 

Thank you!

 

Last login: Mon Dec 28 16:28:11 on ttys000

 

Nicolass-iMac:~ nicolasotis$ diskutil list

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *500.1 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Mac HD                  402.3 GB   disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

   4:       Microsoft Basic Data                         50.0 GB    disk0s4

Nicolass-iMac:~ nicolasotis$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

gpt show: /dev/disk0: Suspicious MBR at sector 0

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

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

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

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

  787507400   91610936        

  879118336   97654784      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  976773120         15        

  976773135         32         Sec GPT table

  976773167          1         Sec GPT header

Nicolass-iMac:~ nicolasotis$ sudo fdisk /dev/disk0

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 [    409640 -  785828224] HFS+       

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

*4: 07 1023 254  63 - 1023 254  63 [ 879118336 -   97654784] HPFS/QNX/AUX

Nicolass-iMac:~ nicolasotis$

iMac, OS X Mavericks (10.9.5)

Posted on Dec 28, 2015 1:39 PM

Close

Q: BootCamp won't boot normally after a partition resize

  • All replies
  • Helpful answers

Page 1 of 3 last Next
  • by Loner T,

    Loner T Loner T Dec 28, 2015 2:15 PM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 28, 2015 2:15 PM in response to NicolasOtis

    You have a gap between GPT3 and GPT4 which is usually the case when you resize the Windows partition. The 'little' software (i assume MiniTool) belongs in the trash can on every Mac where anyone tries to use it.

     

    Can you use El Capitan has deleted my bootcamp windows partition as a reference and download Testdisk and GPT Fdisk and start a Testdisk scan and run a Quick Search?

  • by NicolasOtis,

    NicolasOtis NicolasOtis Dec 28, 2015 2:29 PM in response to Loner T
    Level 1 (8 points)
    Desktops
    Dec 28, 2015 2:29 PM in response to Loner T

    I now agree about that mini software thing, but strangely. it worked very well when i did it last week...


    Here is the Testdisk scan.

     

    Current partition structure:

         Partition                  Start        End    Size in sectors

     

    1 P EFI System                    40     409639     409600 [EFI System Partitio

    2 P Mac HFS                   409640  786237863  785828224 [Customer]

    3 P Mac Boot               786237864  787507399    1269536 [Recovery HD]

    No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker

    4 P MS Data                879118336  976773119   97654784 [BOOTCAMP]

    4 P MS Data                879118336  976773119   97654784 [BOOTCAMP]

  • by Loner T,

    Loner T Loner T Dec 28, 2015 2:37 PM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 28, 2015 2:37 PM in response to NicolasOtis

    There are two separate partition structures on a Mac. The Minitool only modifies one, and can not/does not keep the others in sync. It appears to work the first time, but any software updates or reboots will start showing problems.

     

    Do you see a Quick Search at the bottom of the Testdisk window? If you can post what is there, it helps to see the context that Testdisk has.

  • by NicolasOtis,

    NicolasOtis NicolasOtis Dec 28, 2015 8:33 PM in response to Loner T
    Level 1 (8 points)
    Desktops
    Dec 28, 2015 8:33 PM in response to Loner T

    Here's what i got.


    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

     

    Disk /dev/disk0 - 500 GB / 465 GiB - 976773168 sectors (RO)

     

    The harddisk (500 GB / 465 GiB) seems too small! (< 1701 GB / 1584 GiB)

    Check the harddisk size: HD jumpers settings, BIOS detection...

     

    The following partitions can't be recovered:

         Partition               Start        End    Size in sectors

    >  Mac HFS                839740450 3322768419 2483027970

       MS Data                889594304 1083232696  193638393

       Mac HFS                907825324 2518461613 1610636290 [^Boot]

       MS Data                909502262 1495369525  585867264

       MS Data                976773112 1170411504  193638393

       MS Data                976773119 1074427902   97654784

       Mac HFS                976773124  978042659    1269536

  • by Loner T,

    Loner T Loner T Dec 28, 2015 8:39 PM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 28, 2015 8:39 PM in response to NicolasOtis

    These are unrecoverable partitions, and if you notice, they are outside the physical boundaries of the disk. At the bottom you should have a Continue. Press Return/Enter to Continue and you should see a list of recoverable partitions. Please post that list.

  • by NicolasOtis,

    NicolasOtis NicolasOtis Dec 28, 2015 8:40 PM in response to Loner T
    Level 1 (8 points)
    Desktops
    Dec 28, 2015 8:40 PM in response to Loner T

    Last login: Mon Dec 28 17:18:15 on ttys000

    Nicolass-iMac:~ nicolasotis$ /Users/nicolasotis/Desktop/testdisk-7.0/testdisk ; exit;

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

     

    No disk found.

    TestDisk will try to restart itself using the sudo command to get

    root (superuser) privileges.

     

    sudo may ask your user password, it doesn't ask for the root password.

    Usually there is no echo or '*' displayed when you type your password.

     

    Password:

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

     

     

     

     

     

     

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

     

    Disk /dev/disk0 - 500 GB / 465 GiB - 976773168 sectors (RO)

         Partition               Start        End    Size in sectors

    >P EFI System                    40     409639     409600 [EFI]

    D Mac HFS                   409640  786237863  785828224

    D MS Data                323634999  909502262  585867264

    D MS Data                695955912  889594304  193638393

    D MS Data                783134720  976773112  193638393

    D Mac HFS                786237864  787507399    1269536

    D MS Data                852326665  853698648    1371984 [GW  ث݊  b~^dS

    D MS Data                867588742  909502263   41913522

    D Mac HFS                877859157  879128692    1269536

    D MS Data                879118336  976773119   97654784

    D MS Data                896950475  896956648       6174

    D MS Data                896956648  896962821       6174 [Boot]

    Structure: Ok.  Use Up/Down Arrow keys to select partition.

    Use Left/Right Arrow keys to CHANGE partition characteristics:

                    P=Primary  D=Deleted

    Keys A: add partition, L: load backup, T: change type, P: list files,

         Enter: to continue

    FAT32, blocksize=512, 209 MB / 200 MiB

  • by Loner T,

    Loner T Loner T Dec 28, 2015 9:04 PM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 28, 2015 9:04 PM in response to NicolasOtis

    Please use 'p' to list data files in MS Data entries. To get back to the list, press Escape (only once). Try the following entries

     

    D MS Data                852326665  853698648    1371984 [GW  ث݊  b~^dS

    D MS Data                867588742  909502263   41913522

    D Mac HFS                877859157  879128692    1269536

    D MS Data                879118336  976773119   97654784

     

    Was your original partition about 20GB and did you try to add about 40GB?

  • by NicolasOtis,

    NicolasOtis NicolasOtis Dec 29, 2015 8:56 AM in response to Loner T
    Level 1 (8 points)
    Desktops
    Dec 29, 2015 8:56 AM in response to Loner T

    If my memory is good, last week, i added 60 GB to my windows partition to make it 100 GB. Two days ago, i was trying to add between 25 and 40 more, i don't remember.

     

    For all the entries you asked, i got these answers.

     

    D MS Data                852326665  853698648    1371984 [GW  ث݊  b~^dS

    Support for this filesystem hasn't been implemented.

    D MS Data                867588742  909502263   41913522

    Can't open filesystem. Filesystem seems damaged.

    D Mac HFS                877859157  879128692    1269536

    Support for this filesystem hasn't been implemented.

    D MS Data                879118336  976773119   97654784

    Can't open filesystem. Filesystem seems damaged.

  • by Loner T,

    Loner T Loner T Dec 29, 2015 9:59 AM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 29, 2015 9:59 AM in response to NicolasOtis

    Please check these.

     

    D MS Data                323634999  909502262  585867264

    D MS Data                695955912  889594304  193638393

    D MS Data                783134720  976773112  193638393

  • by NicolasOtis,

    NicolasOtis NicolasOtis Dec 29, 2015 10:06 AM in response to Loner T
    Level 1 (8 points)
    Desktops
    Dec 29, 2015 10:06 AM in response to Loner T

    D MS Data                323634999  909502262  585867264

    Can't open filesystem. Filesystem seems damaged.

     

    D MS Data                695955912  889594304  193638393

    Can't open filesystem. Filesystem seems damaged.

     

    D MS Data                783134720  976773112  193638393

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

         MS Data                783134720  976773112  193638393

    Directory /

     

    >dr-xr-xr-x     0     0         0 26-Dec-2015 18:03 .

    dr-xr-xr-x     0     0         0 26-Dec-2015 18:03 ..

    dr-xr-xr-x     0     0         0 22-May-2013 00:07 $Recycle.Bin

    dr-xr-xr-x     0     0         0 25-Oct-2013 01:18 .Trashes

    dr-xr-xr-x     0     0         0 22-May-2013 00:26 Boot

    dr-xr-xr-x     0     0         0 21-May-2013 17:16 Intel

    dr-xr-xr-x     0     0         0 10-Aug-2014 12:40 LFS

    dr-xr-xr-x     0     0         0 13-Jul-2009 23:20 PerfLogs

    dr-xr-xr-x     0     0         0 26-Dec-2015 19:58 Program Files

    dr-xr-xr-x     0     0         0 20-Dec-2015 11:14 Program Files (x86)

    dr-xr-xr-x     0     0         0 23-Dec-2015 20:08 ProgramData

    dr-xr-xr-x     0     0         0 22-May-2013 00:06 Recovery

    dr-xr-xr-x     0     0         0 26-Dec-2015 17:54 System Volume Information

    dr-xr-xr-x     0     0         0 22-May-2013 00:07 Users

                                                       Next

    Use Right to change directory, h to hide Alternate Data Stream

        q to quit, : to select the current file, a to select all files

        C to copy the selected files, c to copy the current file

  • by Loner T,

    Loner T Loner T Dec 29, 2015 10:28 AM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 29, 2015 10:28 AM in response to NicolasOtis

    Your table will look like this. We will need to delete the entry for your Recovery HD.

     

    GPT 3 StartGPT 3 SizeGPT 3 EndNTFS StartSector OffsetNTFS SizeNTFS EndSector Offset (MB)NTFS(Gb)Disk EndDisk Difference
    7862378641269536787507400783134720-4372680193638393976773112 (2,135)92.3397677316856
  • by Loner T,

    Loner T Loner T Dec 29, 2015 10:42 AM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 29, 2015 10:42 AM in response to NicolasOtis

    Install GPT Fdisk (aka gdisk).  Leave your Testdisk display and start a new Terminal Window. You need to use the following steps. If you see any error messages during the following steps, please stop and post back here with the error message. The following steps have values from your Testdisk output (and you can verify) in Steps 11, 12, 16  and 17. Please notice the'+' sign in step 8 (this is called offset notation). The text in parentheses is for informational purpose to describe the action being taken. Gdisk has one-character commands except when entering numbers. These steps are non-standard and should not be used under normal circumstances.

     

    Rebuild GPT 2 and 3 using start/end offsets

     

    1. Sudo gdisk /dev/rdisk0
    2. P  (print the full list of parts)
    3. D  (delete)
    4. 4  (part 4)
    5. D (delete)
    6. 2 (part 2)
    7. D (delete)
    8. 3 (part 3)
    9. N  (new part)
    10. 2 (part 2)
    11. 409640 (OSX)
    12. 783134719 (must end a sector before NTFS)
    13. AF00
    14. N (new part)
    15. 3  (part 3)
    16. 783134720 ( - Start offset in sectors or the start point for Bootcamp part)
    17. +193638393 ( - Size offset, as opposed to End offset)
    18. 0700 (Windows part type)
    19. P  (print list of all parts just to see what changes will be made)
    20. W (Write the new GPT)
    21. Y  (Yes! really write the new GPT)

    This will delete and re-write the GPT partition info for /dev/disk0s2,3.


    Reboot. We cannot rebuild MBR until we can see files properly in Finder.



  • by NicolasOtis,

    NicolasOtis NicolasOtis Dec 29, 2015 11:46 AM in response to Loner T
    Level 1 (8 points)
    Desktops
    Dec 29, 2015 11:46 AM in response to Loner T

    O.K. now i see all the bootcamp files in Finder. How do i rebuild MBR?

  • by Loner T,

    Loner T Loner T Dec 29, 2015 12:04 PM in response to NicolasOtis
    Level 7 (24,287 points)
    Safari
    Dec 29, 2015 12:04 PM in response to NicolasOtis

    1. Please post the output of

         sudo gpt -vv -r show /dev/disk0

         sudo fdisk /dev/disk0

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

    2. Please post a screen shot the first level directory of the Bootcamp volume in Finder.

Page 1 of 3 last Next