Partition corruption please help!

Discussion in 'Windows, Linux & Others on the Mac' started by furk, Nov 16, 2011.

  1. furk macrumors newbie

    Joined:
    Nov 16, 2011
    #1
    Hi all mates i'm new here.

    I've got a biiig problem with my macbook air. It has 120gb HDD partitioned 40gb snowleopard and 80gb bootcamp with win7. Win7 was not booting anymore complaining about boot record corruption but ntfs partition was still correctly mounted on leopard. I've run disktest with ubuntu remix rescue and now bootcamp partition is not mounted anymore even on leopard :(

    Here is my current situation:

    diskutil list

    *** Report for internal hard disk ***

    Current GPT partition table:
    # Start LBA End LBA Type
    1 40 409639 EFI System (FAT)
    2 409640 88227879 Mac OS X HFS+
    3 88492032 234440703 Basic Data

    Current MBR partition table:
    # A Start LBA End LBA Type
    1 1 409639 ee EFI Protective
    2 409640 88227879 af Mac OS X HFS+
    3 * 88492032 234440703 0b FAT32 (CHS)

    MBR contents:
    Boot Code: Unknown, but bootable

    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type EFI System (FAT)

    Partition at LBA 409640:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 2, type Mac OS X HFS+
    Listed in MBR as partition 2, type af Mac OS X HFS+

    Partition at LBA 88492032:
    Boot Code: None
    File System: Unknown
    Listed in GPT as partition 3, type Basic Data
    Listed in MBR as partition 3, type 0b FAT32 (CHS), active

    [550]>sudo sudo fdisk /dev/disk0s3
    Disk: /dev/disk0s3 geometry: 9084/255/63 [145948672 sectors]
    Signature: 0xAA55
    Starting Ending
    #: id cyl hd sec - cyl hd sec [ start - size]
    ------------------------------------------------------------------------
    1: 87 1023 254 63 - 1023 254 63 [ 88492032 - 57456640] NTFS VS
    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

    this should be wrong situation of mbr shown by fdisk.

    Using gdisk:

    [551]>sudo sudo gdisk /dev/disk0s3
    GPT fdisk (gdisk) version 0.8.1

    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!
    ***************************************************************

    Exact type match not found for type code 8700; assigning type code for
    'Apple HFS/HFS+'

    Warning! Secondary partition table overlaps the last partition by
    33 blocks!
    You will need to delete this partition or resize it in another utility.

    Command (? for help): r

    Recovery/transformation command (? for help): o

    Disk size is 145948672 sectors (69.6 GiB)
    MBR disk identifier: 0x00000000
    MBR partitions:

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

    Recovery/transformation command (? for help): p
    Disk /dev/disk0s3: 145948672 sectors, 69.6 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): AD80F954-8EE2-464D-9F17-D0C7716F3DAC
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 145948638
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 88491998 sectors (42.2 GiB)

    Number Start (sector) End (sector) Size Code Name
    1 88492032 145948671 27.4 GiB AF00

    This is some kind of gpt partition table backup loaded but i get overlapping problem and can't save.

    Recovery/transformation command (? for help): l
    Enter backup filename to load: gpt.backup
    Warning! Current disk size doesn't match that of the backup!
    Adjusting sizes to match, but subsequent problems are possible!

    Recovery/transformation command (? for help): o

    Disk size is 145948672 sectors (69.6 GiB)
    MBR disk identifier: 0xB278B5DB
    MBR partitions:

    Number Boot Start Sector End Sector Status Code
    1 1 409639 primary 0xEE
    2 409640 88227879 primary 0xAF
    3 * 88492032 234440703 primary 0x07

    Recovery/transformation command (? for help): p
    Disk /dev/disk0s3: 145948672 sectors, 69.6 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): C3B164E4-D499-4802-BE37-FBD34DB1B173
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 145948638
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 264158 sectors (129.0 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 40 409639 200.0 MiB EF00 EFI System Partition
    2 409640 88227879 41.9 GiB AF00 NotQuiteMaxDisk
    3 88492032 234440703 69.6 GiB 0700 BOOTCAMP

    Recovery/transformation command (? for help): w

    Warning! Secondary partition table overlaps the last partition by
    88492065 blocks!
    You will need to delete this partition or resize it in another utility.

    Problem: partition 3 is too big for the disk.
    Aborting write operation!
    Aborting write of new partition table.

    Sorry for the long post...i don't know what to try anymore :[
     
  2. LiquidSpikes, Nov 18, 2011
    Last edited: Nov 18, 2011

    LiquidSpikes macrumors regular

    LiquidSpikes

    Joined:
    Jul 6, 2007
    Location:
    Everett, WA
    #2
    Have you tried testdisk?

    http://www.cgsecurity.org/wiki/TestDisk
    http://www.cgsecurity.org/wiki/Data_Recovery_Examples

    I think the MBR became corrupt...

    You should be able to rebuild it with Testdisk. :)

    -edit... sorry I just reread your post!

    Here is what I would recommend, boot from a OSX Disk, fire up disk utility... see if it can find any partitions.

    Repair your OSx partition, reboot. try to get back to one working OS.

    after that if you are successful, then boot from a windows CD and run chkdsk, and BOOTREC. http://support.microsoft.com/kb/927392

    See if it still sees the Windows installation, it will then try to make it bootable.

    Are you using REFIT by chance?
     
  3. furk thread starter macrumors newbie

    Joined:
    Nov 16, 2011
    #3
    Tried again testdisk and it did the trick. Analyze found correct partition and restored GPT & MBR.

    Now snow leopard correctly mounts and reads bootcamp partition.

    Windows 7 keep not booting claiming bad boot block. Already tried bootrec from win console.
     
  4. furk thread starter macrumors newbie

    Joined:
    Nov 16, 2011
    #4
    Success. ;-)

    chkdsk fixed filesystem, than i was able to use RebuildBcd and now windows is alive again.

    Thanks for support!
     
  5. LordJohnWhorfin macrumors regular

    Joined:
    May 28, 2002
    #5
    Recovered my RAID-1 slice!

    Found this thread through a search after my 2 drive RAID-1 mirrored array was taken down by a drive failure and the remaining healthy drive would refuse to mount ("You have inserted a drive that is not recognized by this computer, reformat/ignore/cancel"). DiskUtility reported the partition as "0xEE" so I figured maybe something had been clobbered in the partition info but the data itself might be recoverable.

    TestDisk figured out the partition info in a few seconds and reconstituted the partition table, I wrote it to the drive and presto! It remounted without problems. To whomever mentioned TestDisk, thank you! This 3 year old post saved my bacon :)
     
  6. thekev macrumors 604

    thekev

    Joined:
    Aug 5, 2010
    #6
    No backup for the Raid1?
     
  7. LordJohnWhorfin macrumors regular

    Joined:
    May 28, 2002
    #7
    I know, mirror != backup, but these are 3GB drives... If I can't count on the mirror for reliability, then mirroring is pretty much pointless, I might as well use CarbonCopyCloner or SuperDuper to replicate the disk on a daily basis.
     

Share This Page