ridgefieldpc
New Member
- Reaction score
- 1
This guide will help you fix Windows 7 and Windows Vista not starting up due to hardware changes in your computers harware or software. This guide does not specifically address every possible thing that could go wrong but parts of it can be adapted and used to fix most issues. It's up to you to understand what these steps do so you know when and why to apply them. If you haven't tried putting the original Windows 7/Vista DVD in your drive, booting from it and doing a startup repair, do that. If that didn't fix it keep reading. You may not have to do a reinstall just yet.
Some common error messages you might get:
-"Operating System not found"
-"BOOTMGR is missing"
What prompted this:
Long story short, I had Windows XP on one hard drive. That broke due to software changes and I didn't feel like reinstalling. So I bought Windows 7 along with 2 identical hard drives. I configured a RAID 1 (if you don't know what that means don't worry - it's irrelevant, just think of it as another Hard Drive) and installed the Windows 7 onto the RAID 1 while the XP Hard drive (let's call it the SPARE HD from now on) still had XP on it.
What really happened:
Before Windows 7 install:
RAID1 - not formatted
SPARE HD - active partition with XP on it, set as first bootable HD in BIOS
After Windows 7 Install:
RAID1 - primary partition with Win7 on it, not an active partition
SPARE HD - Active partition with XP, boot loader, boot sector, and other Win7 startup related things on here.
Since I either had the SPARE HD as the bootable device in BIOS and/or it was on lower SATA port (SATA0, as opposed to SATA4 or SATA5), Windows 7 created the boot sector on this HD. I assume it did this to keep the computer bootable, without the user having to change anything in BIOS.
Note: The boot manager on the SPARE HD gave me options to boot XP as well as Win7, because it added both to its list when I installed Win7. Neat, almost.
A couple of weeks later I decide I had enough of 7 and want my XP back. You can probably tell what's about to happen. I decide to reformat and reinstall XP on the SPARE.
Before XP reinstall:
RAID1 - primary partition with Win7 on it, not an active partition
SPARE HD - Active partition with XP, boot loader, boot sector and other Win7 startup related things on here.
After XP reinstall:
RAID1 - primary partition with Win7 on it, not an active partition
SPARE HD - Active partition with XP. The boot manager, and boot sector from Win7 got erased with the reformat
XP is working great. Then I try to boot into 7 and I get: "Operating System not found". This is a generic message sent by the BIOS.
I spent the next 2 hours fixing it. Most of the time was spent waiting for the Win7 DVD to load, rebooting and searching the internet for clues.
This is how I fixed it:
You will need:
-Windows 7/Vista Recovery Environment. This is on the Windows 7 installation disc, or on a custom made CD (which was floating around on here)
-some computer knowhow and basic cmd skills
-Patience and understanding
Note: This guide assumes c: is the drive/partition where your Windows 7/Vista is installed. Replace c: with appropriate drive letter if need be.
1. Put your Win7 DVD in the drive and boot from it. Select your language, time and keyboard. Click Next. Click REPAIR YOUR COMPUTER. The DVD will now scan for issues preventing Windows from starting up. Like I said, if you haven't tried this, follow the steps presented to you, as it will fix most minor issues. If it doesn't fix it, keep reading.
In my case, there was no OS listed to fix.
Press SHIFT+F10 to open up the console. This is where you will be doing all the work.
2. Rebuild the BCD. In my case, the BCD was stored on the SPARE HD at one point and now was completely missing. I had to rebuild one from scratch. The BCD is like a little registry that keeps track of the location of boot settings and some important boot files: winload.exe, and bootmgr.
First, type:
"bootrec /scanos"
Important: This command will scan for any OSes that are not already added to the BCD. If there is no BCD or it's missing an entry it will find at least one.
If your OS is already added to the BCD you can skip this step, or to make sure something isn't corrupt or wrong you must remove/rename the current BCD and rebuild it.
To rename a BCD so you can create a fresh one:
"bcdedit /export C:\BCD_Backup
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
To rebuild the BCD:
"bootrec /RebuildBcd"
The last command should have picked up your missing OS installation. Press y to add it to the BCD. If no errors, go to Step 4.
Or it could have given you an "Element not found" error. If so you need to set your partition to active. Now go to Step 3.
If it didn't pick up anything or give a different error you did something wrong or the installation is missing. Make sure you're on the right drive, etc.. If it's still not there then it's probably gone and you must reinstall.
3. You need to make this partition Active. We will be using diskpart to do this. Type:
"diskpart"
You are now in the Diskpart program. Type
"select disk #"
Where # is the disk number where your OS is installed. If it's the only disk then it's 0. After that, type:
"select partition #"
Where # is the partition where the os is installed. These start at 1. Type 1, if its the only one. Now type:
"active"
The partition should now be active. Type "exit" to exit Diskpart. Return and repeat to step 2.
4. Write a new boot sector to the system partition. Type:
"c:"
"bootrec /fixmbr /nt60 all /force"
Write a new MBR to the system partition:
"bootrec /fixmbr"
5. Make sure you are not missing any important files.
Check bootmgr. This is supposed to be in the same drive as the BCD table (ideally). Type "bcdedit" to get the location where it supposed to be. Then use "dir" command to confirm if it's there. If it's not there you must copy it from the Windows DVD:
"copy d:/bootmgr c:"
Where D: is your DVD drive. Not X:, that is just a temporary ramdrive.
The location of winload.exe is also important. That is also in the BCD store. Use similar steps as above to confirm its existence.
This is the end of the guide for this particular scenario. If you're still stuck there are some great articles to help you, but you will have to read them and understand the nature of how windows boots up to fix it faster.
Also a combination of some steps on here and the automated repair process on the DVD might fix it.
I found these articles to be extremely helpful:
"http://www.pcstats.com/articleview.cfm?articleid=2264&page=1". It covers most of what I say on here.
"http://www.multibooters.co.uk/bootmgr.html" Great article explaining the workings of the startup process and more.
"http://support.microsoft.com/kb/927392" Microsoft's explanation of bootrec.
Some steps to PREVENT this from happening again. When installing an OS, disconnect the other hard drives. This will prevent Windows from creating the startup files somewhere else or accidental reformats and data loss. The downside is that you will not get a nice little menu to select which OS to start. From what I read you can use BCDEDIT to add the other OSes.
If any part of this guide is wrong or needs further explanation anyone is welcome to change or add to it and send the changes to me via PM since I don't monitor this thread. I'm not responsible for any damage/loss etc, from following this guide. Also I was hungry when I wrote this.
Some common error messages you might get:
-"Operating System not found"
-"BOOTMGR is missing"
What prompted this:
Long story short, I had Windows XP on one hard drive. That broke due to software changes and I didn't feel like reinstalling. So I bought Windows 7 along with 2 identical hard drives. I configured a RAID 1 (if you don't know what that means don't worry - it's irrelevant, just think of it as another Hard Drive) and installed the Windows 7 onto the RAID 1 while the XP Hard drive (let's call it the SPARE HD from now on) still had XP on it.
What really happened:
Before Windows 7 install:
RAID1 - not formatted
SPARE HD - active partition with XP on it, set as first bootable HD in BIOS
After Windows 7 Install:
RAID1 - primary partition with Win7 on it, not an active partition
SPARE HD - Active partition with XP, boot loader, boot sector, and other Win7 startup related things on here.
Since I either had the SPARE HD as the bootable device in BIOS and/or it was on lower SATA port (SATA0, as opposed to SATA4 or SATA5), Windows 7 created the boot sector on this HD. I assume it did this to keep the computer bootable, without the user having to change anything in BIOS.
Note: The boot manager on the SPARE HD gave me options to boot XP as well as Win7, because it added both to its list when I installed Win7. Neat, almost.
A couple of weeks later I decide I had enough of 7 and want my XP back. You can probably tell what's about to happen. I decide to reformat and reinstall XP on the SPARE.
Before XP reinstall:
RAID1 - primary partition with Win7 on it, not an active partition
SPARE HD - Active partition with XP, boot loader, boot sector and other Win7 startup related things on here.
After XP reinstall:
RAID1 - primary partition with Win7 on it, not an active partition
SPARE HD - Active partition with XP. The boot manager, and boot sector from Win7 got erased with the reformat
XP is working great. Then I try to boot into 7 and I get: "Operating System not found". This is a generic message sent by the BIOS.
I spent the next 2 hours fixing it. Most of the time was spent waiting for the Win7 DVD to load, rebooting and searching the internet for clues.
This is how I fixed it:
You will need:
-Windows 7/Vista Recovery Environment. This is on the Windows 7 installation disc, or on a custom made CD (which was floating around on here)
-some computer knowhow and basic cmd skills
-Patience and understanding
Note: This guide assumes c: is the drive/partition where your Windows 7/Vista is installed. Replace c: with appropriate drive letter if need be.
1. Put your Win7 DVD in the drive and boot from it. Select your language, time and keyboard. Click Next. Click REPAIR YOUR COMPUTER. The DVD will now scan for issues preventing Windows from starting up. Like I said, if you haven't tried this, follow the steps presented to you, as it will fix most minor issues. If it doesn't fix it, keep reading.
In my case, there was no OS listed to fix.
Press SHIFT+F10 to open up the console. This is where you will be doing all the work.
2. Rebuild the BCD. In my case, the BCD was stored on the SPARE HD at one point and now was completely missing. I had to rebuild one from scratch. The BCD is like a little registry that keeps track of the location of boot settings and some important boot files: winload.exe, and bootmgr.
First, type:
"bootrec /scanos"
Important: This command will scan for any OSes that are not already added to the BCD. If there is no BCD or it's missing an entry it will find at least one.
If your OS is already added to the BCD you can skip this step, or to make sure something isn't corrupt or wrong you must remove/rename the current BCD and rebuild it.
To rename a BCD so you can create a fresh one:
"bcdedit /export C:\BCD_Backup
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
To rebuild the BCD:
"bootrec /RebuildBcd"
The last command should have picked up your missing OS installation. Press y to add it to the BCD. If no errors, go to Step 4.
Or it could have given you an "Element not found" error. If so you need to set your partition to active. Now go to Step 3.
If it didn't pick up anything or give a different error you did something wrong or the installation is missing. Make sure you're on the right drive, etc.. If it's still not there then it's probably gone and you must reinstall.
3. You need to make this partition Active. We will be using diskpart to do this. Type:
"diskpart"
You are now in the Diskpart program. Type
"select disk #"
Where # is the disk number where your OS is installed. If it's the only disk then it's 0. After that, type:
"select partition #"
Where # is the partition where the os is installed. These start at 1. Type 1, if its the only one. Now type:
"active"
The partition should now be active. Type "exit" to exit Diskpart. Return and repeat to step 2.
4. Write a new boot sector to the system partition. Type:
"c:"
"bootrec /fixmbr /nt60 all /force"
Write a new MBR to the system partition:
"bootrec /fixmbr"
5. Make sure you are not missing any important files.
Check bootmgr. This is supposed to be in the same drive as the BCD table (ideally). Type "bcdedit" to get the location where it supposed to be. Then use "dir" command to confirm if it's there. If it's not there you must copy it from the Windows DVD:
"copy d:/bootmgr c:"
Where D: is your DVD drive. Not X:, that is just a temporary ramdrive.
The location of winload.exe is also important. That is also in the BCD store. Use similar steps as above to confirm its existence.
This is the end of the guide for this particular scenario. If you're still stuck there are some great articles to help you, but you will have to read them and understand the nature of how windows boots up to fix it faster.
Also a combination of some steps on here and the automated repair process on the DVD might fix it.
I found these articles to be extremely helpful:
"http://www.pcstats.com/articleview.cfm?articleid=2264&page=1". It covers most of what I say on here.
"http://www.multibooters.co.uk/bootmgr.html" Great article explaining the workings of the startup process and more.
"http://support.microsoft.com/kb/927392" Microsoft's explanation of bootrec.
Some steps to PREVENT this from happening again. When installing an OS, disconnect the other hard drives. This will prevent Windows from creating the startup files somewhere else or accidental reformats and data loss. The downside is that you will not get a nice little menu to select which OS to start. From what I read you can use BCDEDIT to add the other OSes.
If any part of this guide is wrong or needs further explanation anyone is welcome to change or add to it and send the changes to me via PM since I don't monitor this thread. I'm not responsible for any damage/loss etc, from following this guide. Also I was hungry when I wrote this.