OK. I was going to make this a comment, but it was already getting too long too fit halfway through. Before proceeding, I would be morally remiss if I did not say the obvious: BACKUP YOUR FILES BEFORE ANYTHING ELSE. When I do this, it works, but I also do it on lab machines where no consequential data is lost. I have warned you now, please do not make your situation worse unless completely desperate.
So, Chris S did a good job explaining the boot part. The utility we use with little more fine-grained control (and hence the ability to f*** your system up for you is bootsect
. To my understanding, it is included in the installation disk for Vista and 7. I could be wrong, but you will find out soon enough. So, here is how it works.
You really need to know something about your drives in your computer: How many are there? Were both operating systems installed to different partitions on same disk? Different disks? This might explain part of the problem. I assume you installed on at least different partitions, maybe different disks, and all boot config data was stored on partition, same disk or not, that you deleted. Bottom line: you need to know the drive letter of the partition you want to recover, AFAIK, and be able to confirm it. You should be able to open an explorer window (I think), by typing explorer
into that prompt. If not, check with mountvol
at the command prompt to see a list of each disk and the assigned letter. So if explorer does not work, you can go through directories with the dir
command on the command prompt. Ask if you do not know what I mean.
When you find the right drive, do dir /ash %DRIVEHERE%\
(again my guess is dir C:\
unless your system is bizarre) to find the necessary hidden system directory and the bootloader itself. You should see something like this if it were functioning correctly.
12/22/2009 07:06 PM Boot
07/13/2009 09:38 PM 383,562 bootmgr
If these are not present, you should just double check with dir C:\Boot
and dir C:\bootmgr
and ensure part of the return is File Not Found. Most likely is you are missing both of these, and what Chris mentioned did not get both where they need to be, maybe just misconfigured them. If they do exist, I would copy them or rename them (move C:\bootmgr bootmgr.arc
and move C:\Boot Boot.arc
just to be safe.)
If you made it this far, here is where the fun begins. Copy all the boot directory over from the install disk.
REM # Again, C: might not be right, it depends on what you found out above. X: is going most certainly be correct.
xcopy /y /e /h X:\bootmgr C:\
xcopy /y /i /e /h X:\Boot*.* C:\Boot
Update the boot sector code.
REM # After a bunch of output showing all the files in there new location do the following.
REM # The command below will reset the bootcode on the disk itself and forcibly. MAKE
REM # SURE YOU GET THE RIGHT DRIVE!
bootsect /nt60 C: /force
Reconfigure the BCD store, paying attention to drive letter.
REM # You might have to now reset the BCD store. Again, lots of fun to be had, but only nasty if you do not do it to the write partition. Here it is
bcdedit /store C:\boot\bcd /set {memdiag} device partition=C:
bcdedit /store c:\boot\bcd /set {ntldr} device partition=C:
bcdedit /store c:\boot\bcd /set {default} device partition=C:
bcdedit /store c:\boot\bcd /set {default} osdevice partition=C:
bcdedit /store c:\boot\bcd /set {bootmgr} osdevice partition=C:
bcdedit /store c:\boot\bcd /set {bootmgr} device partition=C:
Reboot.
REM # This will reboot the installer environment
wpeutil reboot
Now I know of a Windows recovery disk that uses a modified image much like the install disk that automated this stuff, but I believe only Enterprise customers with certain CAL arrangements get that. It is referred to as WinRE. Now, that being said, I am not sure if it is just a GUI of what I propose, or Chris S proposed. I hope this helps. I learned this from toying around with a lot of broken Windows computers when starting with Vista. YMMV, but I hope this will steer you in the right direction.