Concerning where Windows 7 puts its boot sector

Trillionsin

Posts: 1,910   +488
Okay, I am pretty knowledgeable with computers... but with windows 7 I do not understand part of the installation procedure.

Here is what I would like to understand:

Upon installing Win7 it seems to put the boot sector, or boot file... whatever it is called on a different hard drive.

So here is what happened to me. I installed Win7 with other hard drive in my computer. I installed it on a new HDD and later on down the road I took out a different HDD that I had in there during installation. Well, my OS failed to boot.

Why does it put this here?

Is there a way to move this over?

Is there a way to change the boot device/sector/file/partition.. whatever?

I tried just copying over some of the boot files... but my guess is that this is still pointing to a different HDD and still failed to boot. I realize I could put the Win7 CD in and probably do a repair but I would like to know an alternative method on this.

If anyone can point me in the right direction or even tell me what to google to begin researching this, or to find some tools for changing the boot sector, I would appreciate any assistance.
 
I'm sure somewhere in these commands is the option to create new boot store, or edit it but I cannot figure out the command line parameters. I keep getting errors.

Please, anyone post some ideas.
 
I'm getting closer guys

Bootrec.exe options
The Bootrec.exe tool supports the following options. Use the option that is appropriate for your situation.

Note If rebuilding the BCD does not resolve the startup issue, you can export and delete the BCD, and then run this option again. By doing this, you make sure that the BCD is completely rebuilt. To do this, type the following commands at the Windows RE command prompt:
• bcdedit /export C:\BCD_Backup
• c:
• cd boot
• attrib bcd -s -h -r
• ren c:\boot\bcd bcd.old
• bootrec /RebuildBcd
/FixMbr
The /FixMbr option writes a Windows 7 or Windows Vista-compatible MBR to the system partition. This option does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove non-standard code from the MBR.
/FixBoot
The /FixBoot option writes a new boot sector to the system partition by using a boot sector that is compatible with Windows Vista or Windows 7. Use this option if one of the following conditions is true:
• The boot sector has been replaced with a non-standard Windows Vista or Windows 7 boot sector.
• The boot sector is damaged.
• An earlier Windows operating system has been installed after Windows Vista or Windows 7 was installed. In this scenario, the computer starts by using Windows NT Loader (NTLDR) instead of Windows Boot Manager (Bootmgr.exe).
/ScanOs
The /ScanOs option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option displays the entries that are currently not in the BCD store. Use this option when there are Windows Vista or Windows 7 installations that the Boot Manager menu does not list.
/RebuildBcd
The /RebuildBcd option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD.

Now im getting a problem that it does not recognize "bootrec" as a command.

Still needing help.
 
Take a look at / try using EasyBCD to manage the boot stuff

Thanks. I was able to figure this out and get a successful boot. I would still like to know how to do this via command line in case the situation requires it.

It took a bit if playing around to realize that the EasyBCD editor was still pointing at the other hard drive... and that I was just changing settings on that drive, not the one that had Win7 installed on it.

Still baffles me why they made it so Win7 would put the boot manager on a different hard drive. I've run into this problem a few times and I just really wanted to get down and dirty with the boot manager. hahah.
 
there are some principles that apply to every OS
  1. the MBR (Master) is always sector zero on a bootable drive
  2. the BOOT record is always in the partition table containing the kernel to be booted
  3. for a PC, the BIOS reads #1 and redirects into #2
 
there are some principles that apply to every OS
  1. the MBR (Master) is always sector zero on a bootable drive
  2. the BOOT record is always in the partition table containing the kernel to be booted
  3. for a PC, the BIOS reads #1 and redirects into #2

#2 If the boot record is always in the partition table containing the kernel to be booted, then why would it put this on a data HDD containing only data files such as *.mp3, *.exe, *.avi and so on... ?

I thought that the kernal was a layer of software essentially that communicates from the OS to the actual hardware. So by my knowledge, this kernal would be on the HDD that I installed the OS on, right? I'm probably wrong about more than one thing here...
 
#2 If the boot record is always in the partition table containing the kernel to be booted, then why would it put this on a data HDD containing only data files such as *.mp3, *.exe, *.avi and so on... ?

I thought that the kernal was a layer of software essentially that communicates from the OS to the actual hardware. So by my knowledge, this kernal would be on the HDD that I installed the OS on, right? I'm probably wrong about more than one thing here...
Windows 7 puts the BCD store on drive 0, and makes drive 0 active. If there is a booting Windows OS already installed on the PC, Windows 7 takes over the boot files of that OS, and makes that OS a boot option in the BCD boot menu.

If your data drive was plugged into the drive 0 socket on the motherboard, that's why Windows 7 put the BCD store there. There are other variables at play, as well.
 
Windows 7 puts the BCD store on drive 0, and makes drive 0 active. If there is a booting Windows OS already installed on the PC, Windows 7 takes over the boot files of that OS, and makes that OS a boot option in the BCD boot menu.

If your data drive was plugged into the drive 0 socket on the motherboard, that's why Windows 7 put the BCD store there. There are other variables at play, as well.

Thanks, this does explain it. Thank you very much!

So, by this I am assuming I can plug HDDs into other sockets on the motherboard to change this/correct this.
 
Thanks, this does explain it. Thank you very much!

So, by this I am assuming I can plug HDDs into other sockets on the motherboard to change this/correct this.
Not quite. Just flipping drives around won't do it, and that can have unexpected consequences; partitions getting different drive letters and such.

If you want it to boot from the system drive, you will have to move/copy the BCD store to the root of that drive and edit the BCD store to reflect the move. It can get complicated, but it can be done.
 
Sorry, let me rephrase that a little...

I meant switching them around BEFORE any new/additional installations. Let me know if this helps.
 
Yes, it's a good idea to have all your ducks in a row before making any major changes. In your case, you may have had the hard drive boot priority set in your BIOS to boot from your data drive, but since there were no boot files on the data drive, the boot sequence simply moved to the next device in the hard drive boot order.

When you installed Windows 7, it read the boot device priority, and placed the boot files in the #1 boot device. Or, as I mentioned earlier, your data drive may have been plugged into the hard drive 0 port on the motherboard (the default hard drive boot device), but since there were no boot files on drive 0, the system moved to the next hard drive in sequence, hard drive 1, found boot files and booted from there.

As I said earlier, there are a number of variables that can come into play, so it's a good idea to check everything in BIOS, see which drives are plugged into where, etc. before making any major changes in order to eliminate any surprises.
 
Yes, it's a good idea to have all your ducks in a row before making any major changes. In your case, you may have had the hard drive boot priority set in your BIOS to boot from your data drive, but since there were no boot files on the data drive, the boot sequence simply moved to the next device in the hard drive boot order.

When you installed Windows 7, it read the boot device priority, and placed the boot files in the #1 boot device. Or, as I mentioned earlier, your data drive may have been plugged into the hard drive 0 port on the motherboard (the default hard drive boot device), but since there were no boot files on drive 0, the system moved to the next hard drive in sequence, hard drive 1, found boot files and booted from there.

As I said earlier, there are a number of variables that can come into play, so it's a good idea to check everything in BIOS, see which drives are plugged into where, etc. before making any major changes in order to eliminate any surprises.

Thank you, this definitely helps me understand this process much better. I appreciate your help so much!
 
Back