Partition corruption please help!

Joined
Nov 16, 2011
Messages
5
Reaction score
0
Points
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 :[
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
It looks like you may have trashed both partitions since you now have one that's overlapping. Not sure why you used a Linux utility to run a disk test and repair?

The only way I know how to fix it is to wipe the disk and start over. But before you do, backup what you can and do a PRAM reset.
 
OP
F
Joined
Nov 16, 2011
Messages
5
Reaction score
0
Points
1
Already done a pram reset. I've used linux testdisk to try to repair mbr on bootcamp partition. There's not way to avoid loosing all data? If i make testdisk analyze whole disk can't it find right partition position and fix at least gpt or mbr table so i can replicate the fixed one onto the corrupted?
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
It's possible you may get lucky and the test disk utility will repair the partition table for you, but to be honest, I think you would be better off starting over.

BTW, the Windows 7 MBR can be repaired directly from either a Windows 7 DVD or bootable flash drive. No need to use a Linux utility.
 
OP
F
Joined
Nov 16, 2011
Messages
5
Reaction score
0
Points
1
Thanks for suggestions.

Snow leopard is running fine, on mac os side just bootcamp partition can't be mounted. On bootcamp side i've tryed to recover mbr using windows cd but it doesn't see any partition to repair.

Moreover now i can't believe that the only usb port my air has, not working anymore. can it be software issue?
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Try doing a SMC reset to see if the USB port recovers. Without that port working, it will be very difficult to get Windows 7 reinstalled.
 
OP
F
Joined
Nov 16, 2011
Messages
5
Reaction score
0
Points
1
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.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
See if you can run check disk from a Windows 7 command prompt: Enter this at the command prompt: chkdsk /f The system will respond that it will run check disk the next time you boot Windows 7. That will move the Win 7 data away from the bad block.
 
OP
F
Joined
Nov 16, 2011
Messages
5
Reaction score
0
Points
1
Success. ;-)

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

Thanks for support!
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Glad to hear you're back up and running again. Have fun. :)
 

voz


Joined
Nov 30, 2010
Messages
15
Reaction score
0
Points
1
Location
Raleigh, NC
I need to delete an unused partition my son had set up, but don't know how...
 
Joined
Sep 14, 2011
Messages
344
Reaction score
19
Points
18
Location
Romford, Essex, England, GB
Your Mac's Specs
Mac mini Server 4,1 (2.66GHz Core2Duo CPU, 16GB RAM, 120GB SSD, 500GB HD), iPhone SE 2nd gen (128GB)
I need to delete an unused partition my son had set up, but don't know how...
You won't get answers if you try to hijack threads...

Start your own next time.

But, as I'm here, I'll give you an answer of sorts this one time. What kind of partition? If it's a Mac partition then it'll be a simple matter of going into Disk Utility (in Applications -> Utilities), deleting the unwanted partition, and expanding the main partition into the free space.

If it's a Windows partition, you may need to delete it via Boot Camp & then use Disk Utility to expand the Mac partition.

But, I'm not 100% on that; so - like I said - start your own thread & include the kind of details I asked about in your post.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top