Apple Event: May 7th at 7 am PT

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 6:04 AM in response to BlazingRiver

Open a terminal and run


sudo gdisk /dev/disk0


type p and hit enter and you should see your 4 partitions appear.


If so, type t and enter


it will ask for partition number - type 4 and hit enter


it will ask for Hex code or GUID - enter 0700 and hit enter


type w and enter then confirm with y and enter.


Once done type q and enter and close the terminal window.

Reboot and see.

Dec 8, 2013 6:31 AM in response to Number88

Thank you! Now when i start up my computer and hold the option key windows now appears as a bootable drive 🙂.


However, when i boot windows i still get the startup error which i used to get before i lost the ability to boot up windows (the Missing operating system error). Also, i still cannot mount bootcamp/disk0s4 on Mac OSX (it doesn't make a huge difference i suppose).


In the future, if i want to move/resize the bootcamp partition or if i want to resize the Macintosh HD partition how would i be able to do this without getting into the same/similar situation that i am currently in?

User uploaded file

Dec 8, 2013 6:39 AM in response to BlazingRiver

Sadly it may be beyond repair (or at least beyond my limited knowledge).

It could possibly be worth trying the command prompt from the Windows installation/repair disc/usb and run

bootrec /scanos to see if the Windows installation is found. You could even run a chkdsk on it if it is found.

Should it be found (though it may well not be) there could be other repair options available.


Failing the above if the partition won't mount I don't know of a way of getting your files back other than the use of something like testdisk, which is a free partition recovery utility. That may be worth a try.


Once you've done what you can with it I would delete the Windows partition and let Disk Utility resize the OSX partition back to its full size then reboot.


You can then start again using bootcamp to re-install Windows 7.


Sorry, forgot to say that once a Boot Camp partition is set up you should not resize any partition on the drive at all as this will break bootcamp.

Dec 8, 2013 8:48 AM in response to BlazingRiver

It can be used to recover whole partitions, fix partition tables or photorec can recover files.

There's a how-to page here

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step


Basically you do a search for previous partitions and if it finds any they may be able to be recovered completely or, if not, photorec can recover files.


If you do some googling you may be able to find other peoples experiences of using it (in case the above link is a bit vague for you).

Jan 16, 2014 7:01 PM in response to Number88

Hello

I am running into the same issue . Can not remount bootcamp after mavericks update .

How can I mount the windows partition or save my files that are in the windows partition before I reinstall windows in bootcamp?


thanks

This is what I get in the terminal


~ nabou$ sudo fdisk /dev/rdisk0


WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.


To proceed, enter your password, or type Ctrl-C to abort.


Password:

Disk: /dev/rdisk0 geometry: 14751/255/63 [236978176 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 - 146484368] HFS+

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

4: 0C 1023 254 63 - 1023 254 63 [ 197916672 - 39059456] Win95 FAT32L

seynabous-MacBook-Air:~ nabou$ sudo gpt -r -vv show /dev/rdisk0

gpt show: /dev/rdisk0: mediasize=121332826112; sectorsize=512; blocks=236978176

gpt show: /dev/rdisk0: Suspicious MBR at sector 0

gpt show: /dev/rdisk0: Pri GPT at sector 1

gpt show: /dev/rdisk0: Sec GPT at sector 236978175

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

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

148163544 49753128

197916672 39059456 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

236976128 2015

236978143 32 Sec GPT table

236978175 1 Sec GPT header

Jan 17, 2014 5:04 AM in response to naboud

I'm sure it did. However this is unsupported whilst a Bootcamp partition is there.

What's happened now is that the OSX upgrade installer has found a hybrid MBR with a non-standard disc formation and panicked. It's over-written the MBR and as a consequence your Windows partition is not now marked as bootable and I suspect the partition type has been changed from 07 to 0C.

Which version of Windows is installed?

What is in the free space I mentioned earlier? And is that free space to remain?

Jan 17, 2014 5:35 AM in response to naboud

It may be possible to get your Windows system booting again rather than go down the route of recovering files.


What I would suggest is to download and install gdisk from


http://sourceforge.net/projects/gptfdisk/files/gptfdisk/0.8.8/gdisk-binaries/


you want the .pkg file, not the Windows one. Install whilst in OSX and to use the program open a terminal and type

sudo gdisk /dev/disk0

then enter your password. You will get an output in the terminal.


What you need to do is create a new hybrid MBR with correct details in it.

Type r and press enter, to get to the recovery/transformation menu

Type h and press enter to start creating a new hybrid MBR


You will be asked to type from 1 to 3 partition numbers. On yours you need to type

2 3 4

That's 2 space 3 space 4

then press enter


You will then see be asked if you want to place EFI GPT partition first in the MBR

answer Y then enter


Then an entry for partition 2 will appear

press enter at the default setting


It will ask if you want to set the bootable flag - answer N press enter


Next is the entry for partition 3

again accept default settings and answer N to setting the bootable flag


Next is partition 4 - this is a little different.


If the default setting for partition type is 0C just type in 07 (that's zero 7) and press enter (if the default is already 07 just press enter)


When asked if you want to set bootable flag answer Y for yes, then press enter.


When that's finished it will go back to the original prompt

type w (to write the changes) and press enter


You will see a warning that changes are going to be made - answer Y, press enter


type exit to exit then close terminal window and reboot.


Hold the Alt key whilst rebooting and hopefully Windows boot option will appear. Choose that and see if it boots.


If all goes well I would suggest you backup everything you need from Windows then remove your Windows installation through Bootcamp assistant then after a reboot start a fresh installation of Windows again through Bootcamp. Otherwise this is likely to happen again.


Once Windows is installed in a Bootcamp partition do NOT try re-sizing or creating any partitions.


Good luck!

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.