clarkfromtopeka

Q: Disk shows invalid code

After trying to resize my bootcamp partition, I am having problems with Bootcamp. I can boot into Bootcamp but it no longer shows in finder. This is what gdisk shows:

 

MBR

Disk size is 1875385008 sectors (894.3 GiB)

MBR disk identifier: 0xC77FC0B5

MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code

   1                     1       409639   primary     0xEE

   2                409640   1811615967   primary     0xAC

   3            1811615968   1812885503   primary     0xAB

   4      *     1812885504   1875384319   primary     0x07

 

GUID

Disk /dev/disk0: 1875385008 sectors, 894.3 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 581992C7-3743-44D8-9945-2616020AAAE9

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 1875384974

Partitions will be aligned on 8-sector boundaries

Total free space is 62499477 sectors (29.8 GiB)

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

   1              40          409639   200.0 MiB   EF00  EFI System Partition

   2          409640      1811615967   863.7 GiB   AF05  iMac OSX

   3      1811615968      1812885503   619.9 MiB   AB00  Recovery HD

   4      1812885504      1875384319   29.8 GiB    FFFF  BOOTCAMP

 

Note that the GUID code for partition 4 is FFFF. It should be 0700.

 

When I try to delete partition 4, I can't. The d command only lets me delete partitions 1 - 3. All other commands that operate on a partition show only partitions 1-3. I suppose this is because of the invalid code FFFF.

 

How do I change it?

iMac, OS X El Capitan (10.11.6)

Posted on Sep 5, 2016 7:47 PM

Close

Q: Disk shows invalid code

  • All replies
  • Helpful answers

Previous Page 2
  • by clarkfromtopeka,

    clarkfromtopeka clarkfromtopeka Sep 6, 2016 8:57 PM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 6, 2016 8:57 PM in response to Loner T

    Well, I have mostly good news. First of all, all the tests you listed passed. Also, the boot up process is much faster. The 45 second delay is gone. Also the drive appears to load the OS much faster than it did (even though I don't have any numbers to prove it.) One weird thing is when I checked the SATA configuration, it was back to showing a 1.5GHz negotiated speed. That's really weird since everything seems faster. I'll talk to OMC (the drive mfrg) about this.

     

    The bad news is Windows does not boot. When I booted into Windows I get a big black screen that says Windows failed to start. A recent hardware or software change might be the cause. It says put in my install disk and reboot. When I did that the same message came back but nothing happened when I hit the Enter key which is supposed to cause the system to continue on.

     

    Unless you have any better ideas, I'm going to use Bootcamp Assistant to remove the windows partition, recreate it only much bigger, and reinstall.

     

    THANK YOU FOR YOUR HELP. You have spent a lot of time helping me and I don't know how to thank you. I don't know anything about you, but if you ever need a reference for a job in IT, drop me an email and I'll send a very good one.

  • by clarkfromtopeka,

    clarkfromtopeka clarkfromtopeka Sep 6, 2016 9:10 PM in response to clarkfromtopeka
    Level 1 (4 points)
    Windows Software
    Sep 6, 2016 9:10 PM in response to clarkfromtopeka

    I just completed comparing the results of the various disk utils. Here is a summary of what I have checked:

     

    Last login: Tue Sep  6 22:59:44 on console

    clarks-imac:~ clark$ sudo fdisk /dev/disk0

    Password:

    Disk: /dev/disk0 geometry: 116737/255/63 [1875385008 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 - 1811206328] HFS+       

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

    *4: 07 1023 254  63 - 1023 254  63 [1812885504 -   62498816] HPFS/QNX/AUX

    clarks-imac:~ clark$ sudo gpt -vv -r show /dev/disk0

    gpt show: /dev/disk0: mediasize=960197124096; sectorsize=512; blocks=1875385008

    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 1875385007

           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  1811206328      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

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

      1812885504    62498816      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      1875384320         655        

      1875384975          32         Sec GPT table

      1875385007           1         Sec GPT header

    clarks-imac:~ clark$ sudo fdisk /dev/disk0

    Disk: /dev/disk0 geometry: 116737/255/63 [1875385008 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 - 1811206328] HFS+       

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

    *4: 07 1023 254  63 - 1023 254  63 [1812885504 -   62498816] HPFS/QNX/AUX

    clarks-imac:~ clark$ sudo gdisk /dev/disk0

    GPT fdisk (gdisk) version 1.0.1

     

     

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

     

     

    No problems found. 661 free sectors (330.5 KiB) available in 2

    segments, the largest of which is 655 (327.5 KiB) in size.

     

     

    Command (? for help): r

     

     

    Recovery/transformation command (? for help): o

     

     

    Disk size is 1875385008 sectors (894.3 GiB)

    MBR disk identifier: 0x00000000

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640   1811615967   primary     0xAF

       3            1811615968   1812885503   primary     0xAB

       4      *     1812885504   1875384319   primary     0x07

     

     

    Recovery/transformation command (? for help): m

     

     

    Command (? for help): p

    Disk /dev/disk0: 1875385008 sectors, 894.3 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 95340A11-3E63-43E1-9F2A-AE05E8EFF00A

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 1875384974

    Partitions will be aligned on 8-sector boundaries

    Total free space is 661 sectors (330.5 KiB)

     

     

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

       1              40          409639   200.0 MiB   EF00  EFI System

       2          409640      1811615967   863.7 GiB   AF05  Apple Core Storage

       3      1811615968      1812885503   619.9 MiB   AB00  Recovery HD

       4      1812885504      1875384319   29.8 GiB    0700  Microsoft basic data

     

    The only think I notice that is odd is that the MBR code for partition 2 changed from 0xAC to 0xAF. Is this to be expected?

     

    I have tried several times to boot into Windows. Won't work. It seems the keyboard is locked up. Enter or Esc does nothing and I can't get past the black screen.

  • by Loner T,

    Loner T Loner T Sep 7, 2016 4:33 AM in response to clarkfromtopeka
    Level 7 (23,493 points)
    Safari
    Sep 7, 2016 4:33 AM in response to clarkfromtopeka

    MBR for partition 2 is not used, because it is a CS volume used to boot OS X from the EFI side. If your original setting was AC, we can change it using the 't' command in Gdisk. You do not need to remove Windows, unless a size change is also something you want to implement. You should back up files before you nuke-and-pave.

Previous Page 2