Windows 10 boot drive vanished

Discussion in 'Windows, Linux & Others on the Mac' started by angry rob, Sep 11, 2015.

  1. angry rob, Sep 11, 2015
    Last edited: Sep 11, 2015

    angry rob macrumors newbie

    Joined:
    Sep 11, 2015
    #1
    I upgraded my old windows to windows 10 when it first came out, and repartitioned my Yosemite mac drive to allow a larger pc drive after the fact. It was all working, and I could hold down the option key and see my windows drive and boot to it and all ran fine. I could not see the pc drive in start up disk on mac side, but I was ok with that. I was attempting to boot from a usb stick into a linux machine, but had messed up on the boot stick and it failed to load as the startup disk. I powered down the mac and restarted. When I restarted my mac holding down option I saw my mac drive and my efi boot drive but no windows drive anymore. I ran sudo fdisk /dev/disk0 and sudo gdisk -l /dev/disk0. results should be attached to this post. It appears that my drive dumped 83 gb of its partition as I have that much free space listed on my drive. Not sure how it happened. I am traveling and really don't want to have to reformat and start the bootcamp process over. Besides I really don't want to have to reinstall everything on the pc side again. Please hope someone can help.
     

    Attached Files:

  2. doynton macrumors 6502

    Joined:
    Oct 19, 2014
    #2
    I think your partition 4 should have an asterisk (*) to indicate it is bootable - like mine:

    Code:
    adams-mbp:~ adam$ sudo fdisk /dev/disk0
    .
              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 -  106392712] HFS+   
     3: AB 1023 254  63 - 1023 254  63 [ 106802352 -    1269536] Darwin Boot
    *4: 0C 1023 254  63 - 1023 254  63 [ 108072960 -  128903168] Win95 FAT32L
    adams-mbp:~ adam$ sudo gdisk /dev/disk0
    GPT fdisk (gdisk) version 1.0.0
    .
    Command (? for help):p
    .
    Number  Start (sector)    End (sector)  Size       Code  Name
      1              40          409639   200.0 MiB   EF00  EFI System Partition
      2          409640       106802351   50.7 GiB    AF00  Yosemite
      3       106802352       108071887   619.9 MiB   AB00  Recovery HD
      4       108072960       236976127   61.5 GiB    0700  Windows10
    
    Command (? for help): q
    From here http://www.insanelymac.com/forum/to...-your-partition-active-using-fdisk-in-macosx/

    1. sudo fdisk -e /dev/disk0 (ignore the error)
    2. f 4
    3. write
    4. y
    5. exit
     
  3. angry rob, Sep 12, 2015
    Last edited: Sep 12, 2015

    angry rob thread starter macrumors newbie

    Joined:
    Sep 11, 2015
    #3
    should this reallocate my free space back to my disk 4? I had made my bootcamp partition larger after I had upgraded and installed both Yosemite and Windows 10? It seems that partition has spilt apart which may be why it became lost. I have been trying testdisk app and it shows the "free space" and overlapping sectors. Will post a pick of those results as soon as I can.
     
  4. doynton macrumors 6502

    Joined:
    Oct 19, 2014
    #4
    can you post a pic of diskutil list and diskutil cs list as well.

    You need to mark ibootcamp partition bootable but may need to extend the end of partition as well (assuming you increased that partition only and left the rest as is). If the start of the partition has moved there will be a problem....
     
  5. angry rob thread starter macrumors newbie

    Joined:
    Sep 11, 2015
    #5
    Here is what I get.
    [rob-simoneauxsmacbookpro-2:~] robertsimoneaux% diskutil list

    /dev/disk0

    #: TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *1.0 TB disk0

    1: EFI EFI 209.7 MB disk0s1

    2: Apple_HFS Macintosh HD 830.0 GB disk0s2

    3: Apple_Boot Recovery HD 650.0 MB disk0s3

    4: Microsoft Basic Data 79.0 GB disk0s4

    /dev/disk2

    #: TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *999.5 GB disk2

    1: EFI EFI 209.7 MB disk2s1

    2: Apple_HFS mac 500gb 499.8 GB disk2s2

    3: Microsoft Basic Data PC 500GB 499.4 GB disk2s3

    [rob-simoneauxsmacbookpro-2:~] robertsimoneaux% diskutil cs list

    No CoreStorage logical volume groups found

    The disk2 is one of my external drives.
     
  6. doynton, Sep 14, 2015
    Last edited: Sep 14, 2015

    doynton macrumors 6502

    Joined:
    Oct 19, 2014
    #6
    fdisk and gdisk start positions match. Disk Utility sizes using MB/GB (in blue) matches gdisk using MiB/GiB (in orange) and fdisk (blocks *512) so it all looks OK.

    Screen Shot 2015-09-14 at 18.16.36.png

    Making your partition 4 active should let Windows boot normally.

    To extend your bootcamp (if that is what you want to do) partition go into gdisk /dev/disk0

    1. backup current gpt (option b from main menu)
    2. delete partition 4 (option d 4)
    3. recreate partition 4 using whole remaining space (option n 4 start 1799913472, end default, type 07)
    4. recreate hybrid mbr (option r for recovery menu, option h, choose partitions 2 3 4 and say yes to the EFI). Take all the defaults but don't forget to make partition 4 bootable. It looks a bit like this (but my partitions are now in a different order so I have windows in partition 2 bootable )

    Code:
    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 07):
    Set the bootable flag? (Y/N): Y
    
    Creating entry for GPT partition #3 (MBR partition #3)
    Enter an MBR hex code (default 07):
    Set the bootable flag? (Y/N): N
    
    Creating entry for GPT partition #4 (MBR partition #4)
    Enter an MBR hex code (default AF):
    Set the bootable flag? (Y/N): N
    
    Recovery/transformation command (? for help): 
    5. Write it to disk (option w) and the quit(option q).
    6. Sign into Windows and extend your partition using diskmgmt.msc

    hth
     

Share This Page