Monday, June 28, 2010

Can't boot into Windows7 after deleted primary partition.

Recently, I installed another OS (Linux Mint). Before installing this Mint, I deleted primary partition (sda1) and created entended partition from the earlier primary partition sda1. Since that, I cannot boot into my Windows7 anymore (received error message something like "no bootable device insert boot disk and press any key"), but I've no problem in booting into both Linux Ubuntu and Mint.

I've tried a few things, but seems like the luck is not with me. Below are the things that I've tried:

1. Boot Recovery Disc Windows7 and done the Repair Startup many times (more than 5 times), still no luck.

2. Boot Recovery Disc Windows7 and chose Command Prompt to use:
Bootrec /scanos - The Windows is listed.
Bootrec /fixboot - No element found,
Bootrec /fixmbr - Completed succesfully.

3. Boot Recovery Disc Windows7 and chose Command Prompt to use Diskpart, everything seems okay for the list disk, select disk, list partiton, select partion, except the "active" command. I've been prompted with something like "Virtual Disk Service Error: the specified partition type is not valid for this operation".

I've installed back grub for me to log in into Linux Ubuntu/Mint. From Linux Gparted, I can see this windows partition is flagged as boot.

Here is the solution:

Using Gparted I can't create primary partition from the unallocated partition inside extended partition. I can only created another primary partition by shrunk my sda4 partition (last partition in Gparted) and use the 'just unallocated partition' as the primary partition for the 200 MB partition required.

1. Use Gparted to make an ntfs primary partition. Mark it Active (right click and Flag On)
2. Boot 7 dvd go to command prompt, type diskpart, lis vol, select the new primary with sel vol, ass ( to assign next available drive letter). Exi ( to leave diskpart).
3. bcdboot <7volumeletter>:\windows /s :
4. bootsect /nt60 : /mbr

Yeah at last, I managed to boot into windows7. I also reinstalled Grub, using Linux Mint Live-CD. Everything seems okay just that I can't see Windows bootloader upon start although I can see it is listed when I've done the 'sudo update-grub'. I edited file 'grub.cfg' manually, changed the (hd0,1) to (hd0,7) in Windows7 menuentry (my Windows installation is in sda7). I then run again 'sudo update-grub' and restart, this time Windows bootloader really listed in Linux Mint's grub. Hooray !!

I posted this problem in

No comments:

Post a Comment