Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I recover files from Bootcamp?

Hi,

I cant seem to boot my windows 7 bootcamp anymore. Is there anyway i can recover important files and documents without going on bootcamp (by using a program on the Mac OSX partition)?


Thanks!

iMac, Mac OS X (10.7.2)

Posted on Dec 3, 2013 3:32 AM

Reply
Question marked as Best reply
37 replies

Dec 8, 2013 3:48 AM in response to Number88

Results for sudo fdisk /dev/disk0


Disk: /dev/disk0 geometry: 121601/255/63 [1953525168 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 - 1425967984] HFS+

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

4: 0C 1023 254 63 - 1023 254 63 [1560274944 - 393248768] Win95 FAT32L


And for sudo gpt -r -vv show disk0


gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 1953525167

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

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

1427647160 132627784

1560274944 393248768 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

1953523712 1423

1953525135 32 Sec GPT table

1953525167 1 Sec GPT header

Dec 8, 2013 4:24 AM in response to BlazingRiver

Your first output shows partition 4 as the Windows partition but I would have thought it should have the type 07, whereas yours shows type 0C. Not sure about that.

That same partition is also not marked as bootable, which is necessary for it to boot.

You also now have a gap in between partitions 3 and 4 - not a good thing if you decide to use that for anything. Problems may ensue!


You could try marking the partition as bootable with fdisk then reboot and see if it works, though I'm not sure about that partition type.


To do that open a terminal and do

sudo fdisk -e /dev/rdisk0

then enter your password as requested.


Then do a "p" without quotes and press enter and you should see the output you listed earlier.


Then do "flag 4" without quotes

and press enter

It should say partition 4 is marked as active.


Then type a "w" without quotes and press enter to write the information to your partition table.

Then answer Y to confirm.

Then type exit and close terminal.


Try a reboot and see what happens.

Dec 8, 2013 4:42 AM in response to Number88

Ok, this is what i got:


fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

Enter 'help' for information

fdisk: 1> p

Disk: /dev/rdisk0 geometry: 121601/255/63 [1953525168 sectors]

Offset: 0 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 - 1425967984] HFS+

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

4: 0C 1023 254 63 - 1023 254 63 [1560274944 - 393248768] Win95 FAT32L

fdisk: 1> flag 4

Partition 4 marked active.

fdisk:*1> w

Device could not be accessed exclusively.

A reboot will be needed for changes to take effect. OK? [n] y

Writing MBR at offset 0.

fdisk: 1>


I will try rebooting now.

Dec 8, 2013 5:06 AM in response to BlazingRiver

Hmm, sounds a bit messy. Maybe too messy.

We can try to change the partition type with fdisk.

However, even with that done Windows may need a chkdsk running before it will boot. I don't have the details for doing that from a Windows repair/installation disc but I think that's possible. Maybe google that after.


To change partition type


sudo fdisk -e /dev/rdisk0


type t and hit enter


type 4 and enter (partition number)


type 07 and enter (new partition type and it's a zero and a 7 NOT an O)


type w to write the changes to disc.


type Y if required then exit and reboot.


Good luck

Dec 8, 2013 5:50 AM in response to UFOmonster

Oh, great stuff! 😁 Sorry about my ineptitude with fdisk.


I would suggest that you delete the Windows partition and resize Macintosh HD to its full size again.

Then after a reboot I'd start over again with bootcamp and install Windows again to a new partition.

Once done don't resize or create/delete any partitions! 🙂


Well done!

How can I recover files from Bootcamp?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.