How to repair a Windows7 boot sector on a secondary hard disk?

6

2

I am trying to rescue a damaged Windows7 here. Unfortunately, its boot record is corrupt (but its partition table is okay, only its boot code is bad).

I've put its hard disk into a working Windows Server 2008 system. Everything is ok, and visible on E:. But how to repair the MBR on the - now secondary - hard disk?

I've tried bcdedit, but it won't do anything with a secondary hard disk. I've also tried bootrec.exe, but it can be found only on the windows7 repair disk and not in a win2008.

P.s.: I don' have cdrom drive in any of the machines, thus the windows7 startup repair disk had been also unfeasible.

peterh - Reinstate Monica

Posted 2015-07-14T00:00:45.640

Reputation: 2 043

What commands have you tried? – Ramhound – 2015-07-14T00:04:36.807

@Ramhound Thank you. I've tried bootrec and bcdedit, both of them are problematic in my case. – peterh - Reinstate Monica – 2015-07-14T00:16:39.760

I recommend to use Hirens Boot CD (you can write it to an USB stick and boot from USB if you don't have a CD/DVD connected!) and use MBRfix as described here

– agtoever – 2016-02-18T10:07:06.843

1Check the answers, check the question. I don't think this question would be really unclear. – peterh - Reinstate Monica – 2016-02-18T13:28:59.943

Answers

3

I've used Ubuntu to repair many MBR issues with Windows drives.

Boot from a USB with Ubuntu installed: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

Install Boot-Repair: https://help.ubuntu.com/community/Boot-Repair

On the Main Options screen of the Boot-Repair GUI is the checkbox "Restore MBR".

Another link if you want more detailed steps: http://www.howopensource.com/2011/08/restore-mbr-from-ubuntu-live-cd-usb/


In response about GRUB, here are commands to repair without using Boot-Repair.

On terminal:

Install ms-sys: sudo apt-get install ms-sys

List drives: sudo fdisk -l

Run MBR command and replace [drive]: ms-sys --mbr /dev/[drive]

For example: ms-sys --mbr /dev/hda

Papa

Posted 2015-07-14T00:00:45.640

Reputation: 310

That would install GRUB on the hard disk, something which is undesirable, and wouldn't "fix" Windows' own boot loader. – Braiam – 2015-07-14T03:36:48.940

3

Boot from a Windows 7 Install/Repair disk. Even if it can't detect your Windows installation, you should still be able to get to command prompt to fix the MBR.

Once you're there, use DiskPart to activate the volume you want to repair. Type the following (line return = enter. Be sure to replace the "X"):

diskpart
List vol
select vol X

(Where X is the volume you wish to repair).

active
exit
cd /d X:

(Where X is the volume you wish to repair.

Now type bootrec /fixmbr which should fix the MBR. Depending on what's actually causing the problem, you may also need to use the fixboot and rebuildbcd arguments with bootrec.

If you can't find/use a Windows 7 Install/Repair disk, try Hiren's BootCD, it contains BootRec.exe within it's DiskMan 4.2 tool.

Floofies

Posted 2015-07-14T00:00:45.640

Reputation: 167

1I don't have a cdrom in my machine, but finally I've solved this with a pendrive and unetbootin. Thanks. – peterh - Reinstate Monica – 2015-07-14T01:52:43.010

1

If there is no CDROM or USB drive available to boot a rescue system to repair the MBR of the secondary hard disk, the only possibility is to repair the MBR from a running Windows system (here: Windows Server 2008). This is possible using the third party tool MBRWizard.

The steps are:

  • start MBRWizard in the running Windows installation
  • select the secondary hard disk,
  • chose the option "Repair"
  • chose an appropriate MBR style (XP, Vista, Win 7/ Server 2008, Win 8/Server 2012)

That's all. I just repaired a not running Windows 7 installation exactly like that.

Thorsten Albrecht

Posted 2015-07-14T00:00:45.640

Reputation: 124

FYI - the version of MBRWizard that contains a GUI (e.g. the one you can use with these instructions) costs money. There is a freeware version that is command line. – TylerH – 2019-07-06T21:22:28.890

According to the reference of the command line version of MBRWizard you can repair the MBR with e.g.: 'MBRWiz.exe /Repair=1 /Disk=0'. Identify the correct disk number with: 'MBRWiz /List' – Thorsten Albrecht – 2019-07-09T22:25:35.053

-2

Download "Recurva" and run a deep scan. It just worked for me on a 1tb western digital that I had to initialize and format. Found everything I was looking for. You could do this after you install windows on another disk just to recover files.

Mitch Conners

Posted 2015-07-14T00:00:45.640

Reputation: 7

Does it really have a specific function to repair a dead windows on a secondary hard disk? A quick google check shows me, it can only undelete files. Repairing a win is a more complex task. – peterh - Reinstate Monica – 2017-08-17T16:53:30.970