0

I have been using Windows 7 for quite a while on my machine in the following configuration. I have three hard drives, all different sizes, with Windows being installed on the largest. This is also the drive that was listed as the third drive during the Windows installation. The MBR was installed on what is listed as the first drive. Last night, I installed Debian on the first drive, formatting it before use. I knew grub would be installed and assumed it would be able to pick up the drive with Windows installed. This appears to not be the case. From what I've read today, grub still looks to the Windows MBR to launch Windows, and it can't find one. It's not just corrupted, it's gone. I've tried to repair the MBR from the Windows installation cd, but since there is no MBR, it doesn't find an installation to fix. I can see the Windows OS from Debian, so I can recover everything I need and reinstall in necessary, but I'd like to avoid that if possible. Any help you can provide is greatly appreciated. Thanks.

1 Answer 1

0

Try booting SystemRescueCD and use the ms-sys program available there to write an MBR record to your HDD containing Windows installation. Then try to work from there.


Honestly, I have no idea how is that possible that the MBR "...is gone". I mean, GRUB installer does not wipe MBRs on drives at will.

So… I have another vague idea to think about: you might have GPT-style partition table on your drive containing windows and your motherboard contains a "dual" BIOS which might work both according to the [U]EFI spec and to the BIOS spec (many recent AMI BIOSes do this; especially those with GUI-y mouse-y interface).

"The trick" here is that by default such BIOS works as UEFI and Windows install sets a couple variables in it, the result of which appears as a "Windows Boot Loader" string appearing among the method to boot the box. In this mode, the only way to boot is to use that "Windows Boot Loader" which knows how to find a (special, 100MiB-sized hidden) partition containing another EFI loader which actually pulls in Windows. All MBR-partitioned drives are simply ignored as UEFI only ever looks at GPT.

But as soon as you choose a hard drive, directly, as a boot device the BIOS switches to the olden BIOS mode and suddenly all GPT drives are "invisible" (because BIOS only knows how to run the boot loader occupying the first 400-something bytes in an MBR) unless something run by BIOS (GRUB, for instance) knows how to find them by itself.

So I'd say one way to try to get Windows back is to switch back to booting "Windows Boot Loader": you won't be able to boot Debian but at least you'll get back to square one.

Note that I'd really try to figure out whether you're having GPT on your Windows drive or not before attempting to fit an MBR back into it because doing this would thrash your GPT!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .