Ad_Feed

Friday, November 23, 2012

Restore crashed Windows 7 (with no recovery image) after installing Ubuntu

Have you tried dual booting Ubuntu and Windows 7 and windows fails?

Did the Ubuntu installation complete successfully, and grub was properly installed but you still get the blue screen of death when you try booting windows?

Well, this is simple. The answer is with the file type of the windows partition.

I am assuming you have set up Ubuntu and grub is correctly installed. If not, please see https://help.ubuntu.com/community/Boot-Repair#A1st_option_:_get_a_CD_including_Boot-Repair for more information.

To correct this, boot your system to the Linux installation and run in root:
fdisk -l /dev/xxx


The Id for the windows partition (sda1 & sda2) is 42 which is the code for SFS. Change the file type Id to 7, which corresponds to HPFS/NTFS/exFAT, save and reboot.

fdisk /dev/xxx
In the prompt, type p to print the current partition table
To change the file type, type t in the prompt and enter the partition to change.

In my case, I will enter 1. 

For a list of the Hex code list of the file types, enter L in the prompt.

Enter 7 in the prompt, which corresponds to the HPFS/NTFS/exFAT file system.

Repeat the process for the second or third windows partition, and when done enter w in to save.

Reboot your system, and grub will load windows ! !  !