Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wanted a dual-boot setup. So first I installed Windows 7 on the 1st partition of one hard drive (we'll call it HDD1), and then I went to install Ubuntu 9.10 on the second partition of HDD1. Unfortunately, this didn't work (it bypassed GRUB2 and went straight into Windows). I decided to reinstall Ubuntu, and that's when I noticed that (for some reason) Windows decided to place its boot files on another hard drive (we'll call it HDD3).

I'd like to fix this - I want to move the boot files from HDD3 to HDD1. It may help fix my dual-boot issue, but even if it doesn't, in my experience, it'll save a lot of headaches down the road. How can I do this? I'm going to assume its not as easy as just copying the files, but I'd like to be proven wrong :)

share|improve this question

2 Answers 2

Through some Googling, I found the following solution (I use HDD1 and HDD3 to represent the two hard drives I care about, as referenced above in my question):

  1. The boot files consist of a folder called Boot and an application called bootmgr. They are system files, and so are normally hidden. You must make them visible.
  2. Copy them both from HDD3 to HDD1. It will complain that two files cannot be copied: BCD and BCD.log, both of which are in the Boot folder. The latter is unimportant (it's just a log file) and can be ignored; the former will be copied in the next step.
  3. Open a Command Prompt with Administrator privileges. Type the following command: bcdedit /export HDD1:\Boot\BCD, where HDD1 is the driver letter of your destination drive. In my case, HDD1 was C, so the command was bcdedit /export C:\Boot\BCD.
  4. Now, you have to edit the BCD file so that the entries are all correct. I used the bcdedit program which comes with Windows 7, but there are others. I've heard EasyBCD is pretty good (and free), but the latest version doesn't fully support Windows 7. I believe a new version that does support Windows 7 will be out shortly. First, I navigate to HDD1\Boot on the command prompt (with Admin privileges) and type bcdedit /store BCD /enum ALL. I use the /store switch to specify the BCD file in the current directory - omitting this switch will use the default one I think, which is on HDD3. This command lists all the entries in the BCD file.
  5. I scanned the entries, and it turns out that the entries for {bootmgr} and {memdiag} both point to HDD3. Of course, I want them to point to HDD1. So I issue commands in the following form: bcdedit /store BCD /set [entry_name] device partition=HDD1:. Since HDD1 is C on my machine, I would type the following to set the {bootmgr} entry: bcdedit /store BCD /set {bootmgr} device partition=C:.

That's about it. One last step is to make HDD1 Active via Disk Management (accessed from Computer Management) - it was already Active on my system, so I didn't have to do anything.

Now, as for the weird dual-boot problem, it turns out I forgot that I had physically switched the order of the hard drives. As such, the BIOS boot order was incorrect (it was trying to boot from HDD3 first, instead of HDD1). And yes, that was an incredibly stupid mistake on my part :)

share|improve this answer
    
second step of attrib should not be necessary as attrrib flags on original file are +a only –  user30436 Mar 7 '10 at 10:12
    
These instructions are very usful. I have several dual boot machines using Win7 and Ubuntu and over time I have found the best permanent solution to this is BootIT NG terabyteunlimited.com/bootit-next-generation.htm. –  jtreser Mar 7 '10 at 12:00
    
If you run into the issue where the boot manager is on a System Reserved Partition, you can assign it a drive letter from Disk Management so that you can access the files and copy them. Great answer! –  Nate Bundy Dec 21 '13 at 19:49

The easiest way is to just download and install the free EasyBCD: http://neosmart.net/dl.php?id=1

On the "BCD Backup/Repair" page of EasyBCD, there's an option called "Change Boot Drive" which will bring up a list of all local disks. You just pick the disk you want, and EasyBCD will automate the entire process for you, including making the selected partition active and bootable, importing the old bootloader contents, and writing the MBR.

(Disclosure: I'm the author of EasyBCD)

share|improve this answer
    
nice advice to download, especially if u CAN'T boot –  Ewoks Nov 9 at 14:21
    
If you can't download, you can use the bootable EasyRE CD instead: neosmart.net/EasyRE You use a different PC to create a bootable CD and boot from it to fix the PC. –  Mahmoud Al-Qudsi Nov 9 at 19:38

protected by random Oct 28 '10 at 0:16

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.