Windows How to Dual Boot Windows 7 and Linux using BCDEdit


(20141224 – This post has been amended to address changes in recent versions of Ubuntu, and to remove outdated instructions — iceflatline)

This post will describe how to use the Window 7 boot configuration data editor (BCDEdit) to configure a Windows 7 system that can boot to Windows 7 or a Linux distribution. The steps described in this post assume that Windows 7 and the Linux distribution will occupy the same physical hard drive. Configuring BCDEdit to recognize and boot a Linux distribution located on a second physical hard drive is beyond the scope of this post.

To help explain the steps involved, we’ll use an 320 GB SATA hard drive with Windows 7 already installed. We’ll reduce the size of the partition containing the Windows 7 operating system and re-partition the remaining unallocated disk space in order to install the Linux distribution Ubuntu. We’ll then use BCDedit to add a Windows boot menu option for Ubuntu. All steps involved assume you have a functioning CD drive (or USB drive if you’d prefer) that the system can boot from. The software versions used in this post were as follows:

  • Ubuntu v14.10 (x64)
  • Windows 7 Professional (x64)
  • Oh…, and while I’ve never encountered a situation where the Windows 7 Disk Management tool destroyed existing disk data, make sure you backup any critical files before you proceed.

    So, let’s get started.

    Reducing the Windows Partition

    The first thing that we need to do is reduce the size of the existing Windows 7 partition. While you can use third-party applications like GParted, I found Windows 7’s own Disk Management tool to be the most efficient method for accomplishing this task. The Disk Management tool can be accessed by using Win+r and entering the command diskmgmt.msc.

    You’ll notice that Windows 7 currently occupies all of the existing disk space using two primary partitions: one small boot partition; the other for the operating system. When finished, we’ll have five partitions in total: the two Windows 7-related partitions just mentioned, and ones for the Ubuntu operating system and Linux swap. We’ll also create a small FAT32 partition for sharing data between Windows 7 and Ubuntu. You’ll need to determine how much space you want to allocate to each of these additional partitions based on your requirements and disk size. For our 320 GB disk example, we’ll use the following partition layout:

    Windows 7: ~100MB (Windows 7 boot loader)
    Windows 7: ~251 GB
    Ubuntu: ~31 GB
    Linux-Swap: ~1 GB
    FAT32: ~16 GB

    Right-click on the Windows 7 volume (C:) and selected “Shrink Volume.” Then enter the amount of space (in Megabytes) that the partition should shrink (which in turn becomes the amount of space available to install our Linux distribution), which in our example is 48000 Megabytes (48 Gigabytes), then select “Shrink” (See Figure 1). When complete, exit out of the Disk Management tool and reboot the system.

    Screenshot showing the Windows 7 partition reduced ~48 GB using the Windows Disk Management tool

    Figure 1

    Installing Ubuntu

    Now it’s time to partition our 48 GB of unallocatd disk space and install Ubuntu. Download a copy of Ubuntu Desktop and burn it to a CD (or place it on a bootable USB drive). Boot the system using the Ubuntu disk. Select “Try Ubuntu…” and then double-click the “Install Ubuntu…” icon when the desktop appears. Continue through the installation process until you arrive at “Installation type” and select “Something else”, then select “Continue”. (See Figure 2).

    Screenshot of the Ubuntu installation type screen

    Figure 2

    The screen that follows is where we’ll instruct Ubuntu how to partition the unallocated disk space. Left-click on “free space” to highlight it and then select the “+” icon to create a new partition. Make the size of this partition 31000 MB. Ensure it’s a primary partition, and located at the beginning of the free space. Select the Ext4 journaling file system and, since this partition will serve as the root partition for Ubuntu, set the mount point to / from the list of choices in the drop-down lists. Now select “OK” to accept the changes (See Figure 3).

    Screenshot showing the creation of the Ubuntu root partition

    Figure 3

    Now let’s create a partition for use as Linux swap space. Once again, left-click on free space to highlight it and then select the + icon to create a new partition. Make the size of this partition 1000 MB. Our disk is limited to a maximum of four primary partitions, so we’ll make this a logical partition – again located at the beginning of the free space. Select “swap area” from the list of choices in the drop-down list, then select “OK” to accept the changes (See Figure 4).

    Screenshot showing the creation of the swap partition

    Figure 4

    Using similar steps, let’s partition the remaining free space as a FAT32 file system. This too should be a logical parition, located at the beginning of the space. You may also wish to set the mount point to /media/share, or something similar. The benefit of selecting a mount point at this stage is that Ubuntu will add this partition to the file /etc/fstab so that the system automatically mounts it at boot time. No worries though, you can always select a different mount point and manually mount it and/or add it to /etc/fstab at a later time. When complete, select “OK” to accept the changes (See Figure 5).

    Screenshot showing the creation of a FAT32 partition

    Figure 5

    The final step is critical. We need to tell the Ubuntu installer where to install the system bootloader (GRUB 2). We DO NOT want to install the bootloader on /dev/sda, as that would overwrite our disk’s master boot record, nor do we want to install it on /dev/sda1 or /dev/sda2, as that would overwrite the Windows 7 bootmanager files and boot configuration data, or the operating system itself. Instead, let’s have Ubuntu install its bootloader on the partition that will contain the Ubuntu operating system – in our case /dev/sda3. To do this, click on the drop down list under “Device for boot loader installation” and select /dev/sda3 (See Figure 6).

    Screenshot showing the correct partition for the ubuntu bootloader installation

    Figure 6

    Select “Install Now” and Ubuntu will begin the installation. When it completes you’ll be asked whether you’d like to reboot or “continue testing”. You should select continue testing as the following steps require access to a terminal.

    Configure Windows for Dual Boot

    Now that we have our disk partitioned and Ubuntu installed, let’s set up our system to boot Windows 7 or Ubuntu. This will involve copying the boot record of our Ubuntu partition to Windows 7, and using BCDEdit to create a new entry in the BCD store that will point to that file. This way Windows 7 will display a menu at boot time that will give you a choice between Windows 7 and Ubuntu.

    First, let’s make a mount point for the FAT32 partition we created. Open a terminal and enter the following:

    Next, let’s mount the correct device to this directory. Recall from the partitioning steps above that the FAT32 partition is located at device /dev/sda6:

    Write the first 512 bytes of our Ubuntu partition to a file and copy that file to our FAT32 partition:

    Note: using the FAT32 partition in the aforementioned steps is optional. You may chose to use another device such as a USB drive to copy the *.bin file to.

    Exit out of the Ubuntu live system and reboot to Windows 7. Along the way, you may see Windows perform a disk check (don’t worry, that’s normal, and should only occur once as a result of these procedures). Log into Windows 7 and open the FAT32 volume you created and you should see the ubuntu.bin file. Copy that file to the root of the Windows 7 volume (e.g., C:).

    Now we’ll use BCDEdit to add an entry to Windows 7’s BCD store. Administrative privileges are required to use BCDEdit, so use Win+r, type cmd, and then press CTRL+SHIFT+ENTER. Let’s start by creating an entry for our Linux distribution. Note here that you are free to choose another entry name if desired:

    BCDEdit will return an alphanumeric identifier for this entry that I will refer to as {ID} in the remaining steps. You’ll need to replace {ID} by the actual returned identifier. An example of {ID} is {d7294d4e-9837-11de-99ac-f3f3a79e3e93}. Next, let’s specify which partition hosts a copy of the linux.bin file:

    The path to our ubuntu.bin file:

    An entry to the displayed menu at boot time:

    and finally, let’s specify how long the menu choices will be displayed:

    That’s it! Now reboot and you will be presented with menu where you can choose to boot to Windows 7 or Ubuntu. When you choose Ubuntu, you’ll be taken to the it bootloader menu where you can choose to continue booting Ubuntu.

    On a final note, if at any time you want to eliminate the Ubuntu menu option simply delete the BCD store entry you created using the following command:


    With a minimal amount time and a little Windows command line foo, you can easily set up a system that can dual boot Windows 7 and your choice of Linux distributions.


    Tags: , ,

    203 Responses to “How to Dual Boot Windows 7 and Linux using BCDEdit”

    1. Pratheek Says:

      WOW… what a great article which i was needing help of.. i have a small query that the above tutorial will work if 7 is installed in logical partition instead of primary partition & ubuntu being the first primary partition ???????

    2. iceflatline Says:

      Pratheek, thanks for the kind words, glad you enjoyed it. In answer to your question, yes, it should still work so long as the machine is using the Win 7 bootloader to boot. Again, just make sure to install the GRUB bootloader in the same partition you’re installing the associated linux distro on.

    3. GlorteX Says:

      Nice article,
      helped me through a rough time ;)
      You can use Ubuntu Live-CD instead of GParted for the command to copy the data to os-share. if you failed to install a fat32 partition for sharing data with win a ubuntu live-cd can help if you got a usb device. Connect and the ubuntu from live cd will automatically mount it to /media/YOURDEVICENAME

      But Again, GREAT Work 1000x thx

    4. iceflatline Says:

      Thanks GlorteX. Good advice. You’re absolutely right, you certainly can use the Ubuntu Live CD (or any Live CD for that matter…). I chose the Gparted disk because it boots to a useful environment much faster than the Ubuntu Live CD.

    5. Raul Says:

      hey, thanks much for the post. This allowed me to:
      – wipe a thinkpad, install Win XP from the factory partition
      – install Windows 7
      – install Ubuntu
      – set up all to boot from the Windows 7 bootloader

      … all in the same afternoon/evening.

      Not like the old days….

    6. iceflatline Says:

      Excellent! Thanks Raul. Glad it helped. You’re right about it not being like the old days :(

    7. ted Says:

      I’ve installed linux on a 2nd physical drvie and followed the above steps. When I selected Linux, it never booted into linux. I had a blank screen, with a flashing underscore at the upper left corner of my screen. I would have thought the steps above should work regardless. BTW, I didn’t create a FAT32, I used the ubuntu Live CD and used the ‘dd’ command to copy the 512 bytes into a file.

    8. iceflatline Says:

      ted, I agree. Although I haven’t tried the steps above when Linux was installed on another physical drive, the steps should work regardless.

      I would first make sure that Windows recognizes your Linux disk as a valid drive in Disk Manager and also make sure that you’ve given BCD the correct drive letter in the following command:

      [plain light=”true”]
      bcdedit /set {ID} device partition=n:

      Where n is the correct drive letter.

      However, in your case, the blinking cursor suggests to me that the GRUB bootloader is missing (or is not in the correct location), so make sure you’ve installed GRUB on the Linux disk correctly. You should be able to verify that it has been by trying to boot to your Linux disk directly when the machine starts.

      Skipping the Fat32 partition is perfectly acceptable. I included that step simply because I find it useful for sharing files between OSs. Using the Ubuntu live CD to issue the dd command is also fine – in fact, you could use any valid Linux or Unix live CD. I recommended using the gparted disk in the instructions because I find it boots faster that most live CDs.

      Good luck, and let me know how you make out.

    9. ted Says:

      Update – I forgot to mention I was using Fedora 12 instead of Fedora 11. Installed bootloader in the 1st partition and verified the boot sector ftype was ext3 instead of ext4. Copied 1st 512 into a file and placed file in c:\ directory (under windows of course). It may be there is a slight compatibility/bug/whatever issue with Fedora 12 and my H/W (which I fine a little odd since my laptop is not that old). It’s a Dell M6400, 4G RAM, and a 320G HD.

      Anyway, finally gave up and installed CentOS 5.4 (RedHat in all but name). Worked beautifully! No problems. Followed steps as before and everything fell into place. Not quite sure why it didn’t work with Fedora 12, but after spending a couple of long nights trying to determine what was wrong, I’m happy just to get it to work with CentOS!

      BTW, your writeup was spot on (despite my fickled Fedora 12). Thanks

    10. iceflatline Says:

      Ah, gotcha. Well, I’m glad you got it working with CentOS. Still though, I wonder why Fedora 12 isn’t working for you. Time permitting I’ll try installing it here and see if I can duplicate the problem.

      Best of luck ted, and thanks for the update.

    11. ted Says:

      One other thing I still forgot to mention. The generated grub.conf had the HD designations backwards. Windows 7 is on hd0. grub.conf, for whatever reason, labeled it hd1 and fedora 12 as hd0 (huh? Iget that at all). I made a copy of grub.conf and edited to to correct the HD designations. Still didn’t work. Now I did forget to change the HD designation for the splash.img.gz(?) file. This may be why it didn’t work.

      Anyway, CentOS generated a correct version of grub.conf. So there was no reason to go back to Fedora 12. I would have prefered Fedora 12, but not to the point where I would have messed up my Windows 7 installation.

      Hopefully, I’ve haven’t overstayed my welcome, but I felt I should let others know what may happen using Fedora 12.

    12. iceflatline Says:

      ted, you’re not overstaying at all. The updates are very much appreciated.

    13. Mogplus8 Says:

      I’m a but confused here. I thought BCD could act as a replacement for Grub, which is Linux’s boot loader. Can’t BCD boot a linux distro directly, by doing something like this grub command?

      title Linux-2.6.7
      root (hd0,1)
      kernel /boot/vmlinuz-2.6.7 root=/dev/hda2 vga=791 ro


    14. patyr Says:

      Hi. I Try variant with Win7 & Ubuntu. After i select item on winloader menu – i see this:


      Can’t type anything…only CtrlAltDel… what can i do?

    15. iceflatline Says:

      I updated many of the steps in this post today to address changes in recent versions of GParted, Fedora and Ubuntu.

    16. iceflatline Says:

      patyr, thanks for your comment. I assume you used Ubuntu v9.10 (Karmic)? If so, I suspect you may have placed Ubuntu’s bootloader on the wrong partition. The steps I originally described in the post assumed GRUB. However, beginning with Karmic, Ubuntu uses GRUB 2 as its bootloader and the steps necessary to place the GRUB 2 on the correct partition are different. I’ve since updated the post so you might try going back over the steps again.

    17. iceflatline Says:

      Mogplus8, thanks for your comment. Absolutely, there’s no particular reason why you need to use the GRUB menu or chainload Windows 7 in GRUB. I set it up the way I described because I rather like seeing the GRUB menu after selecting “Linux” from the Windows bootloader. It gives me the opportunity to return back to Windows, or to boot to an older kernel version if desired. The choice is yours though. Note: I have not tested your GRUB configuration suggestion so I can’t comment on whether a distribution(s) will boot with it or not.

    18. GylWind Says:


      I have the same result as patyr, in which I get the GRUB_ after selecting the Ubuntu option and I can only do Ctrl+Alt+Del…

      The only difference is that I installed Windows 7 on one hard drive and Ubuntu 9.10 on a different hard drive. I most likely chose the wrong partition. Instead of removing and reinstalling Ubuntu, is there a way to edit the linux.bin file to point to the right partition and then repeat the steps to copy the linux.bin file? if not, I assume I could reinstall Ubuntu, choose the correct partition and then just skip to the copying of the linux.bin file??


    19. iceflatline Says:

      GylWind, no way to edit the *.bin file that I’m aware of.

    20. GylWind Says:

      Thanks for the quick response. I will reinstall and hopefully pick the right partition. The last time, I clicked the down-arrow and was given list, such as /dev/sdb, /dev/sdb1, /dev/sdb6 along with the Windows partitions. I chose /dev/sdb1. Should I have picked /dev/sdb? or do I need to type it in as (hd1,0), for example?

    21. GylWind Says:

      Ugh! Unfortunately, I have not been able to get Windows 7 Enterprise and Ubuntu 9.10 to dual boot successfully. I either get GRUB with a blinking cursor when I select UBUNTU or I just get a blinking cursor. I have tried using the drop-down selection to choose the boot area (/dev/sdb and /dev/sdb1) to no avail as well as typing (hd1) or (hd1,1).

      Windows is on its own hard drive (160GB) and I’m installing UBUNTU to a 60GB hard drive. GParted sees Windows drive as /dev/hda1 and UBUNTU as /dev/hdb1 (ext4), /dev/hdb2 (extended), /dev/hdb5 (swap) and /dev/hdb6 (fat32).

      Any help for you or anyone here will be much appreciated.


    22. GylWind Says:

      Ok – I gave up! I removed both IDE drives and used a SATA drive. I installed Windows 7 Enterprise and then created partitions for Ubuntu and followed the directions above. IT WORKED! So, the lesson I’m learning is that Windows and Ubuntu must have partitions on the same hard drive for this to work. Using separate hard drives for each OS doesn’t seem to work. If someone knows or figures out something I couldn’t – let me know :-D


    23. iceflatline Says:

      Gylwind, thank you for your comments and sorry for belated reply, work really has me buried right now.

      I set up a similar scenario (sda=Win 7, sdb=Linux) on my test rig last night and ran into similar difficulties. I suspect we’ll need to trick the windows bootloader into recognizing the boot sector on the second drive somehow, but the necessary BCDedit commands escape me right now. I’ll continue to work on this and post a solution when/if I find one.

      mea culpa for the frustration…

    24. frank Says:

      Hi iceflatline, really nice site and article. It’s great to see someone take such effort and care when making something like this as I have read many a forum, where the replies are one liners but assume that you understand what they mean.

      I have Win 7 x64 installed to sda (installed first), ubuntu 9.10 x64 installed to sdb and a few more drives which I will connect later but for now, I get the same issue where once ubuntu is selected, I immediately go to a blank black screen with the flashing cursor. I have tried 3 rebuilds so far of the ubuntu system, changing the boot and using EasyBCD in windows but haven’t been able to get around it. Online searches seem to have the same issue when win is first and ubuntu is second and using the windows bootloader. I suppose the only way to get around it is to change the order. Ubuntu first then windows.

    25. iceflatline Says:

      Hi frank, thanks for the kind words.

      If the two operating systems are on the same physical disk (separate partitions) then the steps defined in the article should do the trick for you regardless of whether the small windows boot partition is the first partition or not. However, when the two operating systems are on separate physical media, I have not been able to (yet) successfully coax Windows into recognizing the GRUB bootloader residing on the other disk using BCDEdit.

      What I suspect may work, although I haven’t tried it, is to install Ubuntu on, say, disk a, and Windows on disk b, then use the GRUB bootloader on disk a to chainload Windows from disk b. You’d likely have to edit GRUB’s config file manually though as I doubt Ubuntu would recognize the existence of Windows located on disk b at install.

      Just some thoughts… let me know how you make out.

    26. tscharlii Says:

      I installed Ubuntu 9.10 next to Windows 7 64 bit Home Premium using your detailed guide.

      Let me make 2 remarks:
      1) During the installation at step 7/7 -> “Advanced” -> “Device for bootloader installation”, when it comes to replacing “(hd0)” with “(hd0,3)”, I used the dropdown list in that dialog instead of typing “(hd0,3)”.
      The dropdown list offered “/dev/sda”, “/dev/sda1”, “/dev/sda2” and “/dev/sda3”, so I chose “/dev/sda3”
      This also worked, so I assume it doesn’t matter whether you specify the grub2 or the linux name of the partition.

      2) After the installation and the steps involving bcdedit and copying the bootsector of sda3 to c:\ I booted into Ubuntu and updated the system. After another reboot, selecting “Linux” in the Windows boot menu just displayed


      and didn’t boot Ubuntu.

      It turned out, the Ubuntu updates included an update of grub2, which changed the boot sector in /dev/sda3, but of course did not change the copy in c:\linux.bin

      I had to repeat the steps that describe copying the bootsector to c:\
      After that, Linux booted again.

    27. frank Says:

      Hi Iceflatline,

      Well, I have since gone through and re-installed everything, starting with ubuntu on sda and then windows 7 on sdb. During the installation of Windows 7, I had issues with windows saying that it couldn’t find a valid installation location or partition. I bounced back and forth between Live sessions, GParted and the Windows installation process but kept having the same issue. I then disconnected sda (read in a few forums that installing that way would get around it) and installed fine. Now, I can’t get Ubuntu to take over the boot process (although, I have played around with GParted trying to make the partition not bootable) but it hasn’t seemed to change anything. It looks like for now, unless I give up on having the dual boot on separate HDD’s, it just can’t be done (at least for the time being).

      A curious question, which could be a part of the reason I am having such a challenge with this is in the other disk management software, I think it’s Dalimpsest, it says something like isw_raid_member. I have searched for some reference to this but there doesn’t seem to be much in the way of suggestions on how to resolve this. I did remove some reference to raid on sda when I originally installed ubuntu on it. I have been chopping and changing the sequence of the HDD’s. Some reference mdmraid commands but the one I used was different. Anyway, I might just spend another day trying to figure it out, then work on the 1 HDD option.

    28. iceflatline Says:

      frank, thanks for the update. You’ve definitely been busy!

      You might look into using GRUB’s map command. While I’ve not had the occasion to use it, but it purportedly allows one to chainload Windows (or another OS) from a second disk by essentially performing a virtual swap between your first and second hard drive. You can learn more about using it from the Super Grub Disk Wiki

    29. Mogplus8 Says:

      Thanks for the feedback iceflatline. Can you help me with another question? I’d like to install Kubuntu in my Linux partition, but I don’t want to clobber Win7 or BCD. If I just install Kubuntu and then skip the Grub install bit will that do it, or will Kubuntu still overwrite the MBR? If I can install Kubuntu can I set BCD up to boot into Win7 or Kubuntu? I used EasyBCD last time, but that seems to have hidden everything in a binary file so I can’t tell what’s going on.

      All help greatly appreciated.


    30. iceflatline Says:

      tscharlii, thanks much for the great info and bringing this to everyone’s attention.

      Regarding your first comment, yes, I noticed this change recently myself. This was a much needed update to Ubuntu’s installer in my opinion as the previous method made it too easy for users to unintentionally overwrite the disk MBR. I’ll update the article soon to make reference to the drop down list.

      Regarding your second comment, that situation is interesting indeed. I’ve not experienced any post installation updates causing subsequent boot problems. I’ll test this and if need be update the article.

      Thanks again…

    31. iceflatline Says:


      I don’t recall if Ubuntu/Kubuntu LiveCD actually gives you the option to not install GRUB. So, if you don’t select an alternate partition, then yes, it will install itself to the MBR. You might want to check out and try Ubuntu’s text-based installer, which, if I recall correctly, will give you greater control over the install, including whether or not to install GRUB. An important thing to remember though is that, whether it’s Kubuntu, Ubuntu or another distribution, it will need a bootloader. If I understand your series of comments correctly, it’s the GRUB menu you find objectionable. If that’s the case, you may want to consider simply hiding it. So long as GRUB is set to boot Kubuntu by default, then you should go right to it when you select it from the Windows bootloader screen.

    32. Gilles Says:

      I am experiencing exactly the same problem as Ted when I want to install Ubuntu 10.04 on a second disc, with a Win7 dual boot.
      I did not want to change anything on my 1st disc with Win7 installed in factory, as I suspect my PC is tatooed. So I created a partition for Ubuntu on my second disk (/sdb2), installed Ubuntu onto it with the bootsector on /sdb2.
      I then copied it (with dd if=/sdb2 of=… bs=512 count=1) to a file that I placed on my C:, and used the same bcdedit commands to create the entry for bootmgr.
      What I got:
      1. I did not harm my Win7 boot, it still works :-)
      2. but my Linux boot won’t work, black screen with some cryptic characters when I launch it.
      I did not understood if ted could solve his problem with the Ubuntu distro… I do not know what to do now, I have a lot of unanswered questions…
      is this due to Ubuntu being installed onto a different disc from Win7 ?
      I noticed an “osdevice” option together with “device” in bcdedit, should I use it ?
      Where is the bug ? Chaining incorrect from bootmgr to Grub, from Grub phase 1 to phase 2 ?
      Any help is greaty appreciated… Thanx !!

    33. Jeremy Says:

      Hi and thanks for allowing comments without the need to register; that’s ballsy. I have the same setup as Gillies, and up until where he says “What I got:”, I did everything the same as him.

      What I get, when I boot up and choose Ubuntu is “BOOTMGR is missing. Press Ctrl+Atl+Del to Restart”

      I opened the linux.bin file in notepad and can see that my error is one that is list in there but the rest of the info in there is encrypted (or not meant to be read in notepad). Any help here is also appreciated.

      Thanks for this thorough guide by the way.

    34. Jeremy Says:

      Sorry for my blatant ignorance, I am just now noticing that it has already been stated this guide will not work if each OS is installed on separate physical disks. Shyte! would have been nice. Thanks nonetheless.

    35. iceflatline Says:

      Jeremy, thanks for your comments. Yes, the intent of this article was to describe how to dual boot off the same hard drive. I hope to find the time soon to determine how to achieve the same thing using two separate hard drives.

    36. How to Multiboot Windows 7 and Ubuntu Studio 10.04 without grub? Says:

      […] grub? If you want to use the Windows 7 bootloader you got to use BCDEdit. Check the tutorial here. You can also have a look at the latest beta version of EasyBCD which supports Grub2. You will […]

    37. grinder Says:

      I have the same problem with this. I install Ubuntu on second HDD and this with bcdedit dont work with me. How to resolve this?

    38. Dulwichdik Says:

      Before this thread dies I was surprised none have mentioned the start up manager left idling in your repository, a GUI interface to swap O/S or kernel and mess about with the splash screen, time out etc

      Another solution would be to avoid all these various conflicts altogether!! simply buy a switch that front panels a 4 way dial and physically swap drives. one drive alive at a time. keep them all totally independent and avoid all the potential software headaches.

      I am sure you could source an UK supplier. I am definitely going down this road!! Hope this helps others

    39. iceflatline Says:

      Dulwichdik, thanks for the tips!

    40. Syrn Says:

      I am having the same problem as Ted and Gilles here is my setup:
      Ubuntu 10.04 – Disk 0 (IDE drive)
      Windows 7- C: -Disk 1 (SATA drive)

      I set the Linux partition’s device to C: and the path to \linux.bin like the guide says.

      If only there was a way for windows to recognize Linux as D: or something and then I could specify it. But it goes unnamed in the disk manager(i can still see it but its labeled Disk 0). It seems the problem could be the linux.bin has to be found on the same drive as the linux partition. Is there any way to point to the linux.bin stored on the linux drive maybe?
      Please keep looking into a solution.

      Is it possible the 512 byte dump went wrong? when I open the linux.bin in a text file I see a lot of gibberish and then
      “Remove disks or other media.ÿ
      Disk errorÿ
      Press any key to restart
      ¬ËØ Uª”

      If you need any more information let me know.

    41. Syrn Says:

      update: I rules out the possibility that it was a bad dump, i redid the process with the livecd and I dont get any signs of error when opened up with notepad anymore. The same thing happens, the dreaded blinking cursor.

      Thinking back to what I said earlier about the linux.bin having to be on the linux partition was definitely wrong. For example, my dad dual boots windows xp and windows 7 each on different drives… so what i said earlier doesn’t make sense. Now I’m really perplexed. What could be halting the boot? And most importantly how can I fix it?


    42. iceflatline Says:

      Syrn, thanks for your questions and comments.

      To clarify, the scope of the article is really to describe how to dual boot between two OS residing on the same hard drive using the Win 7/Vista BCD store. I use this configuration often for laptops where I typically only have one drive.

      As I mentioned in an earlier comment, I hope to find the time soon to determine how to achieve the same thing using two separate hard drives, assuming BCD will even support that configuration.

      In the mean time, a few options for you:

      You could use GRUB or GRUB2 as your bootloader. GRUB2 in particular appears now to do a pretty good job of discovering Windows partitions and drives on its own;

      You could use a third-party Windows solution like EasyBCD;

      Or you could simply select which drive you want through your systems BIOS.

      Hope this helps.

    43. Syrn Says:

      Thanks for the great information. The latest EasyBCD build did the trick and I would highly recommend this program as a solution for people running two separate hard drives. The only issue is you must sign up to the forums to download the latest build. It seems they have custom .bin files that solve the issues I was facing.

      The following quote helped me get started:
      “Use EasyBCD 2.0 latest build (not 1.7) in W7 to add a Linux entry to the BCD. Select the correct grub (2 or legacy depending on the distro you use), and in the latter case tick the “grub isn’t …” box only if Linux is on a different drive to W7.” -Terry60

      It did quite annoy me that I had to sign up to get the latest beta build so I have uploaded EasyBCD 2.0 Beta – Build 100.

      To the users above having problems with EasyBCD, have you tried the latest build?

    44. Robyn Says:

      Thanks a lot for sharing this information, I do not know about anyone else, but I can totally make use of it.

    45. iceflatline Says:

      You’re welcome Robyn. Thanks for your kind comment.

    46. Twinsen Says:

      Thanks, man.

      I don’t know why, but i like the Windows Bootmanager more.
      Ans my wife only uses Windows, so it’s easier this way.

      Congratulations for your perfect job.

    47. iceflatline Says:

      Twinsen, thanks for your comments.

    48. mnassar Says:

      Hi man, this is really good,very useful guide, thanks, it enabled me to install windows 7/ubuntu/Centos multi-boot using windows bootloader,thanks again, u should make it as a sticky topic in all linux forums btw, did u try that ? i think guys at will love that.

    49. iceflatline Says:

      mnassar, thanks much for your comment. Glad to hear it worked well with Centos. Also, thanks for your suggestion regarding a forum sticky topic. I had given some consideration to sharing this post with some forums, but ultimately decided against it. I’ve already updated the post several times to reflect changes in the way Ubuntu and Fedora installers work, and I anticipate updates will be needed in the future. I don’t relish the idea of trying to maintain a forum sticky or two, as well as the post, in order to keep their content aligned.

      Anyway, cheers. And thanks again for your comments.

    50. Mike Says:

      I had a question regarding the partitioning of the Hard drive. I know there can only be 4 primary partitions on the disk. My laptop came with an 8 gig “Recovery” primary partition as the first partition. So the 100Mb Boot is the second, and the third is Win7. Can I make the remaining partition an extended partition, and split it up into 3 for the OS (Ubuntu), swap and share partitions? Will this work or is there a better way to work around this?


    51. iceflatline Says:

      Mike, thanks for your question. Yes you can. As a matter of fact, that’s essentially the same partition layout I have on the Lenovo laptop I’m using to type this response.

    52. Mike Says:

      I was able to install Ubuntu and get my laptop to dual boot. Thanks! Now for a little problem when I’m in Ubuntu. It looks like the right 1/10 of my screen is cut off and not displaying correctly(I was barely able to restart/shutdown as I could only see about two characters on the menu). I tried to change resolutions, yet it still cut off the right portion. I think I need to install a new driver for my laptop as I don’t have the buttons to change how the input is received like on a normal monitor. Can you point me in the right direction or a utility that can help me out with this.
      Thanks again for all your help!

    53. iceflatline Says:

      Mike, I’m afraid I can’t be of too much help. A quick Google search did not seem to reveal any systemic problems, so I suspect this a problem with the native drivers in your system not detecting your display resolution or refresh rate correctly. You might try playing with those two aspects a bit to see if you can correct the problem. You might also want to consider posting your question to the Ubuntu forums or LinuxQuestions. Good luck and post again when you find the solution.

    54. Mike Says:

      I did a search in the Unubtu forum link you posted and searched for my vid card in the appropriate forum and found my answer.
      Took a little bit for me work it through because it has been so long since I’ve used Linux and my hand wasn’t being help through this process but I was able to get it to work.

      Thanks for all your help!

    55. iceflatline Says:

      Awesome Mike! Glad you got it working. Enjoy your dual boot setup!

    56. Michael Says:

      Don’t usually leave comments on blogs but this is an excellent article. Had been struggling with F13 and Windows 7 so thanks for the tutorial, have got it working, thanks

    57. Michael Says:

      Actually I had a small problem, was installing F13, booting from GRUB into Windows 7 (should return to windows boot screen) gave me the infamous BOOTMGR not found error. However, I’d done a clean install of Windows 7 and the boot partition was on the same partition as the install. So I needed to change the menu.lst in /boot/grub to reflect where the Windows 7 bootmgr was.

      Hope this helps anyone else who has this issue -> solution of above is here:

    58. iceflatline Says:

      Michael, thanks for your kind comment and advice, both very much appreciated.

    59. alexander Says:

      Thanks a lot, iceflatline. The guide is great.
      I would like to share some experience as well. It seems like some critical updates of an installed Ubuntu 10.04 may affect its GRUB boot sector. It makes the “C:\linux.bin” file a kind of out-of-sync. Well I’m not sure that I get things right so I simply tell

      I downloaded and installed updates through the Update Manager (Now I can’t tell which updates there were), Ubuntu prompted me to reboot. Windows boot manager showed both the windows and the ubuntu options, but choosing Ubuntu lead to a black screen – grub menu didn’t show up.

      1. I booted from a liveusb and “wrote the first 512 bytes of our Linux boot partition to a file” again.
      2. Then I put the new file in the C:\ and compared it with the old one (Windows shell: C:\>comp linux.bin linux2.bin /a). They were different.
      3. So I removed the old file and renamed the new one to “linux.bin” thus there would be no need to update the BCD entry.
      4. Rebooted.

      These measures fixed the black screen problem and Ubuntu got up and running again.

    60. iceflatline Says:

      alexander, thanks so much for sharing this. Your experience made me smile… I encountered the same issue and fixed it the same way you did! Something in that particular update changed the boot sector enough to render the image we created useless. Creating a new boot sector image using dd was the only way out of the mess. Ain’t Linux great!?

      Thanks again for sharing your solution. I’m sure it will be of help to others.

    61. Thomas Widmann Says:

      Thanks for this article.
      I’ve been struggling to install Ubuntu 10 on a machine with FakeRAID 1 running Windows 7. Although the Ubuntu 10 installer recognised the RAID setup, it wouldn’t let me reformat the partition (the harddisks had already been partitioned by the vendor). I followed a suggestion I saw on an Ubuntu forum and installed Ubuntu 9, and then Ubuntu 10 without reformatting the Linux partition, and that seemed to work…
      … Except that Grub wasn’t working. I tried to install it in different places, but it never seemed to make any difference whatsoever — the machine booted happily into Windows as if Grub didn’t exist.
      I was therefore hopeful when I found this, but alas it didn’t work. I didn’t get any error messages, but just as others have described in comments above, I just get a blank screen with a blinking cursor when I select Linux.
      I’m wondering whether Grub didn’t get written correctly to the Linux partition, either.
      Is there a non-Grub way to boot Linux, I wonder?

    62. Installing Ubuntu 10 on Fake RAID 1 : The Widmann Blog Says:

      […] then found a blog posting describing how to use Windows 7′s boot loader, BCDedit, to boot Linux. It looked promising, […]

    63. Thomas Widmann Says:

      I solve the problem by using EasyBCD instead of BCDedit.

    64. iceflatline Says:

      Thomas, thank you for posting. Next time you might try Gparted rather than Ubuntu’s partitioner. It features support for hardware RAID, motherboard BIOS RAID, and Linux software RAID. Once partitioned correctly, the remaining steps should work correctly. Anyway, glad you were able find a solution that worked for you :)

    65. Boris Says:

      Hello, Iceflatline,

      Your tutorial has been very helpful. Thank you for the detailed instructions. However, I must be doing something wrong. I have updated GRUB2 and downloaded all the updates I can (booting 10.04 from the live CD), and moving the (hopefully updated) linux.bin to C:\.

      Here’s what’s now happening: Ubuntu won’t boot, and I have three (3!) “Linux” buttons on the Windows Boot Manager screen when I attempt to boot. The consistent error message is: “This is not a bootable disk. Please insert a bootable floppy and press any key to try again . . .”

      So I need to delete the three inoperable “Linux” links in the “Windows Boot Manager” screen, and start over somewhere.

      I will appreciate any help you can offer. Thanks, Iceflatline.


    66. iceflatline Says:

      Boris, thanks for your comment and sorry you’re running into problems. My sense is that your linux.bin file does not contain the GRUB2 boot sector. This could be because a) you installed GRUB2 on a partition different from the partition your Ubuntu OS is installed on, or b) you’ve incorrectly copied the sector containing GRUB2 to linux.bin when using the dd command.

      As you’ve suggested, I would start by deleting the existing Linux BCD store entries. Run back through the install steps again, making sure that in the partitioning step, you’ve correctly selected the “/” mount point for the partition you want to install the Ubuntu OS on. Then, make sure you select this same partition when it comes time to install the GRUB2 bootloader. Finally, make sure you’ve passed the correct partition to the dd command (if=). Again, this should be the same partition. I’ve caught myself several times entering the wrong partition when entering this command.

      Hope this helps and good luck!

    67. testidoors Says:

      i am new member

    68. Orlando Barreto Says:

      Good instructions Iceflatline, very useful, I have been using these with XP but never with w7.
      But here is another challenge : what should be done to install w7, Ubuntu 11 AND backtrack 5 (ubuntu Lucid with GRUB2)
      I used easyBCD to create and set up menu options in the windows boot screen (i chose the names “Ubuntu 11” and “backtrack 5”), when I click any of them, the command takes me to the same OS : Ubuntu 11 !!!

      Please somebody have any idea ????

    69. iceflatline Says:

      Orlando, thanks for the question. I’m afraid I don’t have much experience with easyBCD, but perhaps others have. You may also want to post your question in the NeoSmart forums, if you haven’t already.

    70. ErdwinJC Says:

      This is how i got slackware 13.37 64 bit dual booting with win7 64 bit installed first. Using lilo instead of Grub.

    71. Orlando Barreto Says:

      iceflatline, what I meant was, somebody have some idea how to use your instructions to edit BCD in w7 to allow to boot ubuntu 11 & backtrack 5 (both w/grub2) ??? When I type “bcdedit /create …” the system create the same ID . Maybe I have been done something bad

    72. iceflatline Says:

      Orlando, make sure in the step utilizing the dd command that you copy the correct partitions and that each is a uniquely named .bin file (they cannot both be named “linux.bin” for example). In the next step make sure you use the /d parameter and that it follows the /create parameter in the bcdedit command. Here again you must use a unique entry name for each case (they cannot both be “Linux”).

    73. Ratnakar Says:

      Man you have made this complex topic very simple with nice layouts and real life examples.
      Thanks for teaching this @ free of cost.
      Also thanks to all those who have asked their questions via comments, it helped to clear few doubts.

      Appreciate all of you. ;-] Bye

    74. iceflatline Says:

      Ratnakar, thanks for your kind words. I too appreciate all the comments and feedback on this post.

    75. Spare SSD and Ubuntu - discussion forums Says:

      […] for multiboot. However, Windows 7 bootloader supports also supports multi-booting fine, check out this tutorial if you want to retain Windows 7 bootloader: There is no me. I do not exist. There used to be a […]

    76. Win2Linux No. 1: Dual boot between Windows 7 and Fedora 15 « Mohsen Nosratinia Says:

      […] update your Windows bootloader.  So you need to do some manual work to make it happen.There is a thorough article explaining this and you can just jump to end of the article to find the proceadure. ← […]

    77. Rudi.RG Says:

      I have found a solution to start Linux by the Windows 7 boot manager if Windows and Linux are on different hard disks. You can use bcdedit to build an entry in the windows 7 boot manager. In this entry you have to call GRUB4DOS instead of GRUB within linux.bin

      GRB4DOS is a powerfull package but you only need two programs of it – grldr and grldr.mbr
      You may download the package from

      From this package copy grldr and grldr.mbr to the Windows root directory, usually C.
      Now, use bcdedit for the entry in the windows 7 boot manager:

      First backup:
      bcdedit /export c:\bcdbackup

      Then create {id}:
      bcdedit /create /d “Linux” /application bootsector

      The result will look like this:
      The entry {05d33150-3fde-11dc-a457-00021cf82fb0} was successfully created.
      The long string {05d33150-3fde-11dc-a457-00021cf82fb0} is the id for this

      Then, use the following commands to set boot parameters:
      bcdedit /set {id} device partition=C:
      bcdedit /set {id} path \grldr.mbr
      bcdedit /displayorder {id} /addlast
      Please replace {id} with the actual id returned from the previous command.

      At last check the bcd file:
      bcdedit -v

      Now, you need the appropriate menu.lst.
      For a first trial you may use the menu.lst from the GRUB4DOS package. Copy it to the the Windows root directory, usually C.

      Reboot your system.

      The appropriate menu.lst could look like this:

      # menu.lst for grldr of GRUB4DOS
      # copy it to c:

      color blue/green yellow/red white/magenta white/magenta
      timeout 8
      default /default

      title Linux
      root (hd1,0)
      kernel /boot/vmlinuz root=/dev/……………..
      initrd /boot/initrd

      title windows 7
      find –set-root /bootmgr
      chainloader /bootmgr

      title Reboot

      Take your Linux menu.lst and edit it under Linux. Then copy it to the Windows C-Partition.

      Now it should work.

    78. iceflatline Says:

      Rudi.RG, this is awesome! I’ve been meaning to come up with a solution to this challenge for awhile now but never seem to get around to it. Thanks so much for your efforts on this and for posting it!

    79. Thomas Wallbank Says:

      Rudi.RG, thank you for this. I’ve followed through but seem to have come unstuck at the Grub4dos menu.1st. When I boot and select my Unbutu option I get a Grub4dos menu asking me to select one of various find and boot options none of which include Linux. I just don’t know where to go from here. Grateful for any help. My Windows 7 Boot is on my first hdd with no other partition on the drive apart from system reserved and my Unbutu is on my second drive on partition 2.

    80. Thomas Wallbank Says:

      As a follow up if you’re following Rudi RG steps I found the following worked for my system

      title Linux
      root (hd1,1)
      kernel /boot/vmlinuz-3.0.0-12-generic root=/dev/sdb2 this equates to hd1,1
      initrd /boot/initrd.img-3.0.0-12-generic

      I edited one of the menu.lst items in the text editor in the ubuntu live usb which I’d downloaded.

    81. iceflatline Says:

      Thomas, awesome. Thanks for your comment.

    82. pankaj Says:

      i was running xp and arch linux. But when install windows 7 in other drive then it windows 7 start automatically. Please give me a way to start xp and windows 7.

    83. iceflatline Says:

      pankaj, I’ll try to help, but I’m not sure I fully understand your problem. Could you provide a little more detail?

    84. Using Grub for BCD commands in Win7 Says:

      […] that allows *both* Grub2 and the Win7 bootloader to *coexist* (each on a different partition):…using-bcdedit/ […]

    85. blob Says:



      thank you so much for this article, it helped me a lot !

      I just have one question though, I hope you will be able to help me.

      Your article has been quoted as a source in a wiki page for Archlinux :

      On this page the author writes :
      “Some documents state that the partition being loaded by the Win boot-loader must be a primary partition but I have used this without problem on an extended partition. ”

      So he is saying that it is perfectly possible to get a dual-boot such as the one described in your article when Linux is installed on a logical partition.

      However, in my case it simply doesn’t work. When Linux is installed on a primary partition everything works fine, but when Linux is installed on a logical partition Windows bootloader (BOOTMGR) is unable to chainload to Grub2, it can load Windows 7 but not Linux (the system just restarts as if BOOTMGR didn’t see where Grub2 was).

      If you have any experience in such a setup (Windows on a primary partition and Linux/Grub2 on a logical partition) and you could give me some advice to help me find out what I’ve done wrong, I would greatly appreciate it.

      If you need any further detail I will gladly provide them.

      Thanks in advance !

      (sorry if there are any mistakes, English is not my native language.)

    86. iceflatline Says:

      blob, Window’s bootloader absolutely will boot Linux installed on a logical partition. In fact I’m writing this response using CrunchBang Linux installed on logical device /dev/sda5, which was booted using Windows – the same way described in the post.

      I’ve booted many Linux distros this way, and the only way I’ve seen that it doesn’t work is if GRUB is not installed correctly (or at all) on the logical partition containing the distro, or the boot sector of this logical partition was not copied correctly to a *.bin file.

    87. Daniel Says:

      @blob: I boot off an extended partition without any issues (had to install twice to make grub2 work, before i just got a blank screen)

      Very nice.
      I installed Mint 12 that way but grub2 refused to install in a partition. It has to be installed inside the mbr.
      I found no instructions how to solve it, so here is my way – in case someone finds this page like I did.
      Be careful not to kill your partition table. It should work with a blocksize of 444 which prevents you from overwriting the partition table but I did not test it and 512 will work too ;-)

      backup the mbr:
      dd if=/dev/sda of=/root/mbr_orig.bin bs=512 count=1

      install whatever you want and install grub to /dev/sda

      backup the new mbr
      dd if=/dev/sda of=/root/linux.bin bs=512 count=1
      (copy it to the windows parition or fat USB stick or somewhere)

      write back the original mbr
      dd if=/root/mbr_orig.bin of=/dev/sda bs=512 count=1

      Windows boots as usual and you can work with bcdedit as written in thsi how-to.

    88. Daniel Says:

      oh, an important note:

      First prepare all partitions! Create all partitions you need before backup up the first time!

    89. iceflatline Says:

      Daniel, thanks very much for your comments.

    90. Kisun Says:

      did exactly what you said but everytime i try to load linux from windows bootloader the PC reboots its self and goes to windows boot manager.

      Basically it does a loop: win bootloader, select ubuntu, reboot pc, win bootloader. is there any way to solve this?

    91. iceflatline Says:

      Kisun, I’m not sure. I’ve never encountered that particular problem before. It appears though that BCD may not be correctly pointed to GRUB. About the only thing I could suggest is to go back through the steps, ensuring that you’ve correctly installed GRUB on the partition containing Ubuntu, and that you’ve indeed pointed BCD to the correct partition.

    92. leadpoizon Says:

      Thank you SO much for this. I was able to use this guide to have my X201 Tablet PC dual boot Ubuntu and Windows 7 without hurting my Rescue and Recovery capability on boot up!

    93. iceflatline Says:

      Leadpoizon, you’ve touched upon exactly the reason I wrote this post – my experiences with wiping out many a recovery partition. Thanks for your comment.

    94. Any Thoughts on Dual-booting Slackware and Win 7? Says:

      […] instructions worked well for me:…using-bcdedit/ If you do an update that causes lilo to be run, you may need to grab the MBR off your partition […]

    95. mario Says:

      ted, blob, and others are all correct. You instructions *are* faulty. “It works for me” is not actually listening to what they are saying. Stop arguing with them for crissakes. I don’t care how many distros you have working. The bottom line is this does not work with *GRUB2*. GRUB2 will only work if it is installed in the MBR. It seems GRUB2 has pulled a rude Microsoft-anti-competitive behavior. The external hard disk or not is a red herring. The real issue is that the step for copying the bootloader off the GRUB2 boot partition does not work. GRUB2 has changed the way it works and leaves you with something that will not boot. This is asinine. Linux can’t do anything right and I’m so sick of the days lost fudging and fidgeting twiddly little bits just to get a damn partition table or boot record to work. The only thing modern linux has accomplished is to force users to install it as the only OS on my machine. fucking anti-competitive assholes. They’re as bad as microsoft in the 90s.

    96. iceflatline Says:

      Mario, you sound frustrated. Linux can be hard to deal with sometimes, which it makes it all that much sweeter when you finally bend it to your will.

      In fact though, Grub2 will work when installed on a primary or logical partition. I’ve most recently installed CrunchBang v10-20111125 (x64), Fedora 16 (x64) and Ubuntu v11.10 (x64) – all using Grub2 – along side Windows 7 Pro in the manner described in this post – in both primary and logical partitions – and they all work.

      As for the problems concerning Linux Mint cited by some in the comments, I cannot say. I have not gotten around to installing that particular distro yet.

      Anyway, perhaps a third-party boot solution like NeoSmart’s EasyBCD may be more to your liking.

    97. How I managed to multi-boot with Windows 7, Linux Mint 12 and Arch Linux | kviitanen Says:

      […] personal use) EasyBCD (, which I found mentioned in the comments in this blog post by iceflatline. I actually tried the method described in the post first and it worked. […]

    98. Dual boot and partitions - Project Reality Forums Says:

      […] Re: Dual boot and partitions There a re many ways to go about doing this. For a simple situation, such as yours, where 1 HDD will hold 1 MBR 1 WIndows7 partition 1 Linux partition I suggest following this guide: Download or buy BCDEditor 2.X Make sure it is 2.0.X or higher, the 1.X builds do not work correctly for windows 7. Download and burn Gparted. Follow this simple guide to load both OS onto the MBR: How to Dual Boot Windows 7 and Linux using BCDEdit | iceflatline […]

    99. Daniel Zoquier Says:

      Can I use this method if I have Ubuntu intalled in VHD (virtual hard disk) which is seeting in my c:\Vm folder.


    100. iceflatline Says:

      Daniel, having not tried that before so I honestly don’t know. Give it a try and let me know how you make out.

    101. Asif Says:

      Before following the bcdedit command steps you need to run bcdedit by itself. This should list the current windows 7 boot menu list. If it does not then you need to do the following:
      1) Start -> Control Panel -> Search [Partition] -> Run Partition Manager
      2) If you see a BDEDrive, make sure it’s *active* and assign to it a drive letter. I assigned “Z:”.
      3) Now run bcdedit and you will see the windows 7 boot menu list.
      4) Now continue with the bcdedit steps in the tutorial of this article.
      Credits: Victek @

    102. Asif Says:

      I tried to install ubuntu 10.04 on a system with windows7.
      This article did not help. However, it was helpful in understand the whole process.
      According to the following article, you cannot *manually* install grub on the MBR, since there is a bug
      in the ubuntu 10.04 distribution.
      The main problem I had was that windows 7 did not allow me to assign a drive letter to the newly installed
      ubuntu 10.04 partition. The bcdedit commands requires you to specify the drive letter to associate it with
      a boot menu entry.
      I will have to restore the windows 7 master boot record, and reinstall ubuntu 10.04 and allow it to install grub2 in the master boot record (which will include windows 7 as a boot menu list choice.)

    103. iceflatline Says:

      Asif, I assume you’re speaking to the case where Ubuntu is installed on another drive (not partition)?

    104. Jon Says:

      Just found this, it’s great.

      I would recommend doing the partitioning during the Ubuntu install rather than separately with GParted then also run the following attrib command under Win7 to stop linux.bin from being deleted and update grub as follows so you don’t get a second menu, I’m using Ubuntu 12.04

      attrib +S +H +R linux.bin

      sudo gedit /etc/default/grub
      set GRUB_TIMEOUT=0
      sudo update-grub

    105. David Says:

      Hi, thanks for that great guide! ;-)
      I also had the problen installing ubuntu 12.04 on a second hdd(cursor blinking in black screen forever).
      I tried Easybcd, added a simple entry with linux/grub2. Nothing else. And worked at first.

    106. steve Says:

      First off, Hi everyone.
      Second, mario, you need to chill dude, please. I understand your frustration because I (and most everyone else who owns a computer) has been there. But the bottom line is, this post works.
      Win7 installed first, then Kubuntu 12.04 LTS second, Ubuntu server 12.04 LTS third, all on one HD, server on logical partition, all bootable from windows bootloader. EXCELLENT TUTORIAL iceflatline !! Any questions?

    107. iceflatline Says:

      steve, thanks for your comments. Much appreciated.

    108. yi Says:

      Hat-off to iceflatline for this guide, this is by far the best I have read to achieve booting linux using native windows boot manager via bcedit, which is pretty much what grub is doing I think but I feel easier to use than grub.


    109. iceflatline Says:

      yi, thanks for taking the time to comment and for the kind words.

    110. StellaAntares Says:

      many, many, many thanks for your great article, still solid and valid after years!
      With your help I’ve been able to fix the dual installation of Windows 7 Home Premium (64b) along with Linux Mint 13 (32b, noway with 64b) on a Samsung np305!!!
      Thanks again, SA

    111. iceflatline Says:

      SA, you’re very welcome, and thanks for your kind words.

    112. Mike Schulze Says:

      Thank you Andy, this is most solid and logical tutorial to have Windows 7 along with Linux on the same HD.
      Just 30 minutes and I have my Linux BT5 R2 x64 on my win7 notebook, everything works fine.

    113. jaytho Says:

      what about win8? do you think this will work on win8??

    114. iceflatline Says:

      jaytho, I have not tested this setup with Win8 so I can’t say with certaintity. My guess is that it will work so long as the the OEM allows you to disable MSFT’s UEFI and secure boot (or it is not enabled by default) or the Linux distribitor (Fedora, Ubuntu, etc.) has a cryptographically signed bootloader. Of course, if you’ve built your own machine using a OEM version of Win8 all this likely won’t matter and you should be able to dual boot just fine.

    115. iceflatline Says:

      Mike, thanks for kind words. Much appreciated.

    116. Nick Says:

      Thanks for this very useful guide. The only improvement I can think of is the usage of “Master Boot Record”. It seems that every time you used it you meant “Volume boot record” ( MBR ( is quite different and doesn’t need any tweaking (yes, GParted modifies it during partition creation/shrinking). I’m not sure if GRUB2 would affect MBR even if we give it a chance during installation.

    117. iceflatline Says:

      Nick, thanks for raising this. I’ll research it further and if a change is warranted, will do so in the next revision to the post.

    118. jaytho Says:

      With the help of your thorough guide, I was able to get this working on a triple boot (win7 win8 preview and ubuntu). Thanks!

      Recipe: partition as you direct. Install Ubuntu, Install Win8, Install win7, then tweak bcdedit from the win7 bootloader install.


    119. iceflatline Says:

      jaytho, thanks for testing that out and posting the results. Much appreciated.

    120. Tatiana Says:

      Rather than copying the Linux boot record to the c: drive and telling BCDEdit to find it there in order to boot Linux, wouldn’t it be more efficient to just have the path element in BCDEdit point to this boot record’s correct location on the Linux partition?

      This is how EasyBCD does it.

    121. iceflatline Says:

      Tatiana, that approach would certainly be more efficient. Could you provide the bcdedit commands for it?

    122. joe Says:

      Thanks for this very helpful guide! I was unable to download EasyBCD (firewall?), and was clueless as to how to do it otherwise. In previous dual boot installations these steps were not neccessary – the choice between windows and linux systems showed automatically. Did I miss something in the install, or did they change something for Ubuntu 12.04?

    123. Pete Says:

      Hi, thanks for the instructions. I was able to follow them until the configuring for dual boot section. The fisrt 3 lines of commands return ‘permission denied’ or ‘only root can do that’ in Terminal. No idea how to gain root access (tried su but I don’t know root password, and the only user account I have on windows7 is not recognized). I tried from both GParted and Ubuntu disks.
      Is there a different way to accomplish these first 3 steps of the dual boot section? It seems like a trivial problem but I’m copletely stuck.

    124. Karen Says:

      I was trying to do this using windows 8 bootloader. I updated the bcd entries to show linux as boot option. I then booted using usb drive, and followed the steps above to copy the boot partition. I was able to create linux.bin in windows C:\ directory. I verified that the file is present in the windows partition.
      After restart I was presented with a option to boot into linux and windows 8. I selected linux but I got a error saying that it cannot find linux.bin. I restarted back to windows and found that linux.bin is created was deleted somehow in the boot process. I am not able to get to grub.

      Only thing I did different from the instructions was I created the bcd entry first and the linux.bin file later. I think it should not have any effect. Anyone know the reason why “linux.bin” is deleted.

    125. Karen Says:

      I don’t understand Russian but somehow I used the google translate to see what you have written. The steps you mentioned are exactly the same as mentioned in the article. That did not solve my problem.

      Thank you.

    126. iceflatline Says:


      If you’re using Gparted, you can gain the escalated privileges you need by prefacing the commands with sudo. Alternatively, you can type the command sudo su first, then proceed as instructed. I don’t recall offhand, but I suspect the Ubuntu Live CD is the same.

    127. iceflatline Says:

      Karen, I removed the Russian comment. I have reason to believe it was simply spam.

      Regarding your issue with Windows 8, I have not had the opportunity yet to explore these procedures with Win8 so I can’t say for certain that it does not indeed remove the *.bin file, or that other issues may occur as a result of using this new OS. All I can suggest at this point is that you create the *.bin file first and add it to c:\ then create the entry in the BCD store.

      I’m interested in determining if this is some kind of systemic problem so by all means post an update.

    128. john werneken Says:

      THANK YOU THANK YOU! While I have as many years around Windows as there have been years with Windows around, I am a Linux/Ubuntu/Grub/Gpart novice and a Windows BCDedit novice as well. I have asked about this on freenode irc #Ubuntu it is not common knowledge AFAIK. NOW I SEE how to tell Linux where it should live, and how to tell the system how to run one MBR covering both on the first partition – as all of Win7 Win8 Ubuntu have multi-boot loaders of their own, and they do not co-exist well at all…

    129. [SOLVED] Dual boot without grub? Says:

      […] with a Windows recovery CD. A quick google search for "linux bcdedit windows 7" found a result with an example for adding a boot entry for a Linux distro. I'm more of a security freak though […]

    130. johnwerneken Says:

      I was hanging around here WHINING about my attempts to install Ubuntu to dual boot with win7 win8 win8 server


      Works on win8! (RP – or is it RC, the install named the partition “RC” lol, the more expected name, considering Microsoft)

      Couple caveats for Windows ppeeple (I have been abused by Microsoft for over 35 years lol)

      1. IF you have existing partitions, as I did, you will probably get different sda numbers than in the example: USE THE PARTITION NUMBERS YOU ACTUALLY HAVE in following the excamples.
      2. IF you have NTFS and ext partitions already, you need not re-create them; possibly the only new one needed from GPartition Live might be the FAT32 to copy linux.bin to and from.
      3. The FAT32 may not give a choice for a mount point in GPartition at lerast on win8 RC …if so it will ask again when you “apply” the changes, do it then
      4. When installing your Linuc distro be sure to use the actual partion numbers (for sdaX) as one follows the examples
      5. When you do the windows BCDedit command be sure to use the partition numbers you actually have!
      6. Linux (as windows) has some interminal points in the install process, particularly anything to do with updating GRUB the bootloader

      Other than as noted, it works EXACTLY as Iceflatline says.

      IF YOU HAVE or want to have THESE OS’s on DIFFERENT DRIVES there are posts (topward the end) of the comments on his post, that say how to do that. I maven’t done that so YMMV.

    131. johnwerneken Says:

      I almost forget (actually, I DID forget, but then I remembered lol): the commands entered in Ubuntu Terninal (command prompt) may well have to beging with “sudo”:
      ~$ sudo mkdir /mnt/share
      and so on

    132. Shinyo Says:

      i am tring to use Norton Ghost to image the HDD with 2 OS:
      Win 7 – pro 64 bit
      Fedora 17
      my issue is that Ghost is not identifing the Linux partitions , if Fedora is handeling the boot loader, these is how i got to this post, problem is :
      each time i tried to follow this guide steps i ended with working Win7 OS but entering the “Linux” left me hanging with :
      GRUB _
      and only a restart to the laptop was abled,
      is there any chance that in Fedura 17 some steps need changes ?
      any other ideas ?

      thanks a lot

    133. Max Says:

      Hi , I managed to install Win7 starter and Ubuntu in a single hardisk and able to boot up successfully, I then captured the whole hardisk image using rapid deloy and restore it to another NB that I have, I use the -raw command to capture and restore it to another NB, the NB cant boot and it will keep rebooting , anyone there can help to solve my issue ? Pls advise, thanks !

    134. Bodhi Says:

      This article helped me getting win7 & ubuntu 12.04 work side by side. Thank you very much.

    135. iceflatline Says:

      Bodhi, You’re welcome. Thanks for the comment.

    136. zyl Says:

      This did not work for me. After selecting Linux the System seems to freeze for a second and reboots. How are the first 512 bytes of the partition useful? I do not understand (and my system doesn’t, either, apparantly).

    137. zyl Says:

      P.S.: Ok nvm you must enter “C:/” in the boot.ini and not copypaste what windows has in place there.

    138. iceflatline Says:

      zyl, c:/? or is it c:\?

    139. 7127027 Says:

      You probably don’t need dd. I got the appropriate boot sector file from /boot/grub/i386/boot.img in my Ubuntu installation.

    140. Kaarel Says:

      1. install xp.
      2. install vista.
      3. install ubu, bootloader to ubu partition.
      4. boot live-cd to ubu
      5. make ‘dd if=…. ubuntu.bin (as mentioned above)’
      6. copy ubuntu.bin to xp’s root
      7. open xp’s boot.ini
      8. new line ‘C:ubuntu.bin=”Ubuntu”‘
      can somebody confirm? i did lot of different tries, maybe something affecting, but the i got wished result.

    141. Installing Live distros on a lenovo thinkpad Says:

      […] flashes by in less than a second. Using the ThinkVantage button just opens w7. I've looked at…using-bcdedit/ but since the lenovo will ignore the gparted, this doesn't help. Ideas gratefully received… […]

    142. Reinstall 8 Bootloader After It Has Replaced By GRUB? Says:

      […] to grub after that. But here is a pretty good tutorial if you want to keep windows bcd intact. How to Dual Boot Windows 7 and Linux using BCDEdit | iceflatline I would just caution you about using dd if you don't know how be very careful. It is a good linux […]

    143. blnl Says:

      Hi iceflatline, I hope you still read these posts.

      I’m trying to create a space for an additional linux partition on my drive, but I stumbled upon an unexpected problem.
      There is a BDEDrive partition (required by BitLocker) behind C: Windows 7 (primary partition), which gives me the headache.

      So far I managed to shrink C: partition and move the BDEDrive adjacent to it. This is my disk layout:
      /dev/sda1 – Windows 7 (primary partition)
      /dev/sda2 – BDEDrive (primary partition)
      /dev/sda3 – Linux-Swap (primary partition)
      /dev/sda4 – Ubuntu (primary partition)

      The issue is that when I try to start BitLocker, it complains. The following message is displayed:
      “The path specified in the Boot Configuration Data (BCD) for a BitLocker Drive Encription integrity-protected application is incorrect. Please verify and correct your BCD settings and try again.”

      I suppose that I could use BCDEdit to redefine the new location of BDEDrive partition in the BCD setting.
      Do you have an idea how to do this?

      By the way, my BDEDrive is NOT corrupted. When I move it back to its original place, BitLocker works again.

    144. iceflatline Says:

      blnl, it seems to me you have two options: you could reconfigure BitLocker to recognize its new partition; or you could move it back to its original partition, create some unused space on your disk, and in that unused space create either a primary partition for Ubuntu, along with and an extended partition containing a logical partition for swap space, or simply create an extended partition containing two logical partitions, one for Ubuntu and one for swap.

    145. blnl Says:

      Thanks iceflatline,

      I was looking into how to configure BitLocker but in the Control Panel > BitLocker Drive Encryption, there is nothing useful to be configured. I can only turn on/off BitLocker, suspend protection or write out the recovery key.

      However, while reading Microsoft article “BitLocker Drive Encryption Step-by-Step Guide for Windows 7”, section “Turning On BitLocker Drive Encryption on an Operating System Drive (Windows 7)”, the following paragraph explains it all:

      “If you have a single partition for your operating system drive, BitLocker will prepare the drive by shrinking the operating system drive and creating a new system partition to use for system files that are required to start or recover the operating system and that cannot be encrypted. This drive will not have a drive letter to help prevent the storing of data files on this drive inadvertently. After the drive is prepared, the computer must be restarted.”

      So, all I need to do is to remove the BDEDrive partition. Next time when I turn on the BitLocker it will create a new one for me (presumably adjacent to C: partition).

    146. arun Says:

      i am using with windows 7 professional i will use for the next os for bossgnu/linux i will open to the windows 7. it says bootmgr is missing why are you say the problem


    147. iceflatline Says:

      blnl, excellent. I’m glad you found a work-around. Thanks for taking the time to post again so that others can benefit from your experience.

    148. iceflatline Says:

      arun, it appears you may have somehow written over or in some other way corrupted your windows boot record. I would suggest booting to the Win7 disk and let it repair the problem. I won’t go into the details here as there are numerous good articles online on how to perform this repair.

    149. jar Says:

      This was incredibly helpful and worked like a charm. Thank you!

    150. iceflatline Says:

      jar, thanks for the kind comment. You’re very welcome.

    151. a grateful user Says:

      I have a very similar setup: Lenovo ThinkPad Edge e530, 320 GB HDD, no SSD.

      Everything worked perfectly! Thanks!

    152. iceflatline Says:

      grateful user, cool. Glad it worked for you.

    153. Shura Says:

      I want to change the windows boot manager to Linux GRUB how do I do that?

    154. iceflatline Says:

      Shura, I assume you mean you want to use GRUB to boot to either a Linux distribution or Windows? In that case, simply install Linux to the partition of your choice, then instead of instructing the installer to install GRUB on that partition, instruct it to install it on the MBR of the disk itself (usually the default). GRUB should detect the various Windows partitions and give you a choice to boot to either Linux or Windows after you reboot the machine.

    155. Renato Says:

      If you are trying to boot a Linux distribution located on a second physical hard drive, please try this:

      You just have to use a hex editor to edit your linux.bin file. It could not be easier!

      It worked for me like a charm!

      Iceflatline, perhaps you could update your How To with this…

      Best wishes


    156. iceflatline Says:

      Renato, thanks for posting this solution. I will test it and, if it works correctly, include it in the next update to this post.

    157. AJ Says:

      Hello Iceflatline,

      Really well written article. Thumbs up for you.

      But i am facing issue (for sure due to my mistake), Ubuntu is not booting up and giving Error while windows 7 is working perfectly fine. Few questions are in my mind :-

      1) What is the need to format a partition in FAT 2 ? (I used my pen drive but i can see all my NTFS drives too when boot with Ubuntu Live CD)

      2)”bcdedit /set {ID} path \linux.bin” in this command “PATH” should be written as it is or it means like : C: , D: or something like that ?

    158. AJ Says:

      Its giving error in this format:-

      Windows could not boot, it might be due to changes occurred in hardware or software. Please use your windows CD to repair.

      File: \Linux.bin
      Status: 0xc000000f
      Info: The selected entry could not be loaded because the application is missing or corrupt.

      Thanks & Regards

    159. iceflatline Says:

      AJ, thanks for you comments and questions. Regarding the FAT32 partition, it is purely optional. I find having such a partition handy on the occasions when I want share files between Windows and Linux. However, you can accomplish the same thing with a flash memory drive. Regarding the syntax for the command “bcdedit /set {ID} path \linux.bin”, that is the literal word “path” in the command not a placeholder for a directory path.

    160. AJ Says:

      Hi, Thanks for your quick revert. Any idea why am i getting that error ? What could be the reason and solution ? I followed your instruction word by word but unable to boot with Ubuntu and getting above mentioned error :(

    161. AJ Says:

      I repeated the operation and now there are entries for Ubuntu alone !!! How to delete them ? Because i don’t know the {IDs}

    162. AJ Says:

      i mean 3 entries for Ubuntu !!!

      P.S. : can’t i edit my post here ? Because it feels a bit odd to see continuous 3-4 posts from 1 person. I am really sorry for that.

    163. iceflatline Says:

      AJ, unfortunately no. Unlike a forum, CMS software like WordPress generally does not allow one to edit comments. Regarding deleting the BCD store entry, enter bcdedit without any options to produce a list of entries. Find the identifier you want to delete, then use the command bcdedit /delete {ID} to remove it. Regarding your error, I’m not sure how best to guide you here. Perhaps starting over would be your best option, making sure to install GRUB2 on the correct partition containing Ubuntu, and closely following the steps to create the BCD store entry. I’ve done this setup many times and it will work.

    164. AJ Says:

      Thanks Iceflatline.

      Kindly have a look at my partition design and suggest accordingly :

    165. iceflatline Says:

      AJ, what is the partition you have marked as “GRUB?”

    166. AJ Says:

      That is /boot (I selected this partition in “Device for Boot Loader”)
      2nd is /swap
      3rd is / (root, here i installed Ubuntu)
      4th is /home

    167. iceflatline Says:

      AJ, you should have selected the device containing your Ubuntu OS as the location to install the boot loader. Then run the command dd if=(that device), etc against that device in order to correctly copy the boot sector (aka GRUB2). I suggest reinstalling Ubuntu, this time selecting the correct device for the boot loader. Your separate /boot partition is not needed and can be eliminated to recover some disk space.

    168. Joni Ollikainen Says:


      Everything went well at first, but I realized that I made booting entry for my linux swap partition. Then I try to do new booting entry with bcdedit and with correctly done linux.bin. bcdedit /create… worked, but other when trying other commands I get following:
      “An error occurred while attempting to reference the specified entry
      System cannot find the file specified”

      When I type bcdedit /enum all, I found that I have created 6 different Real-mode boot sectors with same identifier during my trials. I cannot remove any of those by using the identifier, because it gives that same error message. Has this error message something to do with those 6 entries?

      These are the six entries:

      Real-mode Boot Sector
      identifier {3f8cb10b-8b67-11e2-8057-c2df5ab5c723}
      description “Linux”

      Real-mode Boot Sector
      identifier {3f8cb10c-8b67-11e2-8057-c2df5ab5c723}
      description Ubuntu 12.04

      Real-mode Boot Sector
      identifier {3f8cb10d-8b67-11e2-8057-c2df5ab5c723}
      description “Linux”

      Real-mode Boot Sector
      identifier {3f8cb10e-8b67-11e2-8057-c2df5ab5c723}
      description “Linux”

      Real-mode Boot Sector
      identifier {3f8cb10f-8b67-11e2-8057-c2df5ab5c723}
      description “Linux”

      Real-mode Boot Sector
      identifier {3f8cb110-8b67-11e2-8057-c2df5ab5c723}
      device partition=C:
      description “Linux”

    169. Anon222 Says:

      Awesome guide, very useful especially for someone who doesn’t know Win 7 very well, It worked flawlessly for a dual boot with Arch Linux

    170. iceflatline Says:

      Anon222, Thanks very much for the comment. I had intended to try it with Arch but had never gotten around to it. So glad to hear it works.

    171. Win7 & Mint unter UEFI im Dualboot? - Linux: Linux-Forum Says:

      […] */…using-bcdedit/ Google-Suche nach "bcdedit add linux entry" Da ich aber weder ein UEFI-Board, noch ein Windows 7 […]

    172. Xav Says:

      First, let me add to the many other comments here that this has been a huge help! Thank you!

      This has been my first experience with a Linux installation, and I’ve spent a few days trying to set up CentOS 6.4 to dual boot with Win7. My system is relatively new and uses UEFI to boot (though I’ve had to use legacy SATA to write the bootloader anywhere but the MBR in the ESP). Near as I can tell, all commands in the guide executed without a hitch, I checked that linux.bin was copied correctly to the shared FAT32 partition, and the new entry “Linux” even shows up fine in the Windows Boot Manager.

      When I try to boot Linux from here, I go to an error screen describing that Windows failed to load (?) and that c:\linux.bin was missing or corrupt. Windows 7 continues to boot fine from the Windows Boot Manager, and I return to Explorer to find linux.bin sitting there happily in C:

      I understand from many of the comments that GRUB (0.97 for CentOS, though a successful install by another user tells me this shouldn’t be a problem) must be properly written to the Linux boot partition, and I specified this in the actual CentOS 6.4 installation. Prior to this guide, writing GRUB to the MBR results in error 18 and not being able to boot either OS, which is what brought me here in the first place.

      I would be fantastically grateful for any insight you could offer. BXPython will not build outside of a Linux environment and I’d like to be able to crunch these binary data sets at home. Your dedication to answering our questions over the last couple years is admirable at worst!

    173. [ubuntu] Grub2 and EFI: Dualbooting Windows 8 and Ubuntu | - Says:

      […] – trying to add GRUB into bcdedit – was just as fruitless. I tried adding it as as in…using-bcdedit/ but it was a no-go. I imagine the culprit is once again EFI, and that marking it as a bootsector […]

    174. ztron Says:

      for thomas wallbank:

      it’s not menu.1st, its menu.lst, as in abbreviation for MENU_LIST

      for panjaj:

      How to add an xp entry to W7 (also other NT6.x such as vista/w8):

      while booted to the NT6 system, copy NTLDR, NTDETECT.COM & boot.ini from XP partition to the boot partition (the one containing the NT6 BOOT folder)

      If you have a small boot partition 1 (containing your BOOT folder) before your OS partition(s), you may not be able to see it when booted to W7 or W8. It is not an actual hidden partition, but W7/8 does not assign a volume letter in this case. You would have to do that manually in Disk Management before you could copy the NT5 boot files from XP to it. You could then Remove the volume letter in Disk Management again afterward. Partition 1 will still have a volume letter assigned for XP use when you boot to XP.

      assuming the working BOOT folder is on volume X: as the booted NT6 system sees it (you will need to substitute your actual BOOT folder volume for my “X:”):

      bcdedit /store X:\boot\bcd /create {ntldr} /d “Earlier more advanced OS’s by BOOT.INI here on JE80_N1”

      This CREATES the NTLDR bootmenu entry (in the description I use the volume label on the target HDD of mine; JE80_N1) I always label all my volumes, using my desired hardware nomenclature rather than intended contents, especially multibooting. On the menu I am saying where my working boot.ini is in this way. Alphabetical volume letters are SUPPOSED TO change upon reboot if a new HDD is added or a previously hidden volume is made visible, so you should be relying on static descriptive volume labels rather than flaky volume letters if you rely on anything. You can call the menu entry whatever you want to within the quotes, like “XP Pro on primary HDD partition 3”, which can be more descriptive of what will actually be booting if you want.

      Once this {NTLDR} entry is created, do not rerun this command except after you have deleted the entry. Instead to change the menu text (description) this would be an example subsequent command:

      bcdedit /store X:\boot\bcd /set {ntldr} description “XP Home now installed on pri HDD part3” (or something like that)

      At this point, in the NT6 BCD you have added a NT5 section which does nothing and is not even visible on the menu. You then need to specifiy a device:

      bcdedit /store X:\boot\bcd /set {ntldr} device partition=X:

      partition=X: refers to whatever volume letter NT6 has presently assigned to the partition having the BOOT folder. As an alternative you could refer to absolute device ID, replace “partition=X:” with “partition=\Device\Harddisk0\Partition1”, or something like that referring to a different HarddiskX\PartitionY if you are that advanced and have the boot folder somewhere else.

      you still need to specify a PATH on the above specified Device:

      bcdedit /store X:\boot\bcd /set {ntldr} path \ntldr

      You will still not see the XP ntldr entry on the menu until you specifiy whether you want to add it first or last:

      bcdedit /store X:\boot\bcd /displayorder {ntldr} /addfirst (this does not effect which OS is booted as default)

      XP may still not appear on the bootmenu unless you specify a timeout:

      bcdedit /store X:\boot\bcd /timeout 3

      I’m using 3 seconds for menu display, after which it boots the default entry if you make no choice (NT6 is still probably default at this point). you can make XP the default if you like:

      bcdedit /store X:\boot\bcd /set {bootmgr} default {ntldr}

      for Karen:

      if you only have one linux on one partition, you could always improve your chances by copying your LINUX.BIN to other visible as well as possible non-visible or hidden partitions.

      ALSO My findings are that NT5 & NT6 bootloaders work just fine when properly placed into a hidden partiion as well as a regular visible partition. Other than the NT bootloader, the rest of the Windows OS fileset will need to be in an unhidden volume however. Linux naturally will not only handle GRUB in a hidden partition, but also boot linux when its whole fileset is on a hidden partition itself, whether the same volume as its boot/grub folder or not.

      now for iceflatline:
      pleased that you are still accepting comments, especially without registration. Your tutorial is so helpful, but some people are coming here looking to boot multiple HDD’s. -you are very generous, I can not say too much, so I think I will :-)

      this is my full syntax command for running bcdedit by itself:

      bcdedit /store X:\boot\bcd /enum all

      just to see before & after effects of editing, such as accomplished above.

      I always specify the /STORE since I am a massive multibooter and have BOOT folders on more than one partition, only the one you are actually booted from will be edited without specifying the exact bcd store. Also, IIRC once you specify a particular store, that same store will continue to be edited even if you later specify no store at all (using short syntax). That is until you specify a different store, or the first store is closed in a different way, such as rebooting or closing it in the registry. You can also use the NT6 bcdedit.exe from the XP command line, even while booted to XP directly or booted from a NT5 boot floppy, in that case you have not accessed a NT6 boot folder to get the system up, so MUST specify which bcd store to edit. Also when desired, it seems like the NT6 boot folder can sometimes be shared with GRUB regardless of which OS was installed first, Key NT6 files BCD & BCD.LOG are in \boot, grub keeps its key files in \boot\grub mostly but sometimes has kernels & their associates in \boot, still having no filename conflicts other than potentially MEMTEST. Always make backup copies of a working or to-be-edited BOOT folder. Plus I usually will be installing XP to a FAT32 partition, but who knew? If you prepare in advance a virgin HDD for W7, making the first FAT32 partition big enough for your intended XP as well as your BOOT folder and numerous BOOT backups, you might find some advantages. (since its FAT32 you can also put W98seDOS and lots of dos goodies if you are so inclined, but would then need to boot dos from the NT5 boot.ini menu the NT5 way, or you could bypass NT5 and use NT6 to point to BOOTSECT.DOS similarly to how you have pointed to LINUX.BIN) for this type of NT “chainloading”, remember to keep the bootsector filenames to the regular 8.3 DOS maximum namesize, and follow the other traditional dos filename rules.

      Anyway if you have not focused on my comments to panaj above, this may be the answer to boot from a separate HDD: in the tutorial’s bcdedit /set {ID} device partition=c: you should be able to substitute something like

      bcdedit /set {ID} device partition=\Device\Harddisk0\Partition1


      bcdedit /set {ID} device partition=\Device\Harddisk1\Partition1


      bcdedit /set {ID} device partition=\Device\Harddisk2\Partition3

      or something like that

      then BOOTMGR should be able to find LINUX.BIN on a different HDD, provided you correctly specify the exact HDD & partition where linux.bin actually is.

      if I was specifying the bcd store specifically, I would add “/store X:\boot\bcd” in between bcdedit & /set (as above) to use full syntax and avoid editing the wrong one of my many boot folders.

      and for everybody:

      linux in a logical partition will usually boot using the NTx bootloaders when it will not boot using GRUB. This is a deficiency in most grub complilations which have a bug when chainloading and/or accessing logical volumes. Naturally grub-legacy has proven more reliable than grub2 and both have been fixed by now, but you will still have difficulty finding a distro more than a year or two old which can chainload logicals. Apparently a goal for grub2 was to inhibit non-developers from multibooting, especially on older PCs where you need it most. This also seems to be the objective of EFI/GPT and of course Secure Boot for the newer consumer PCs.

      I am working on a tutorial myself, for installing 4 different windows on 4 different partitions, for multibooting the regular windows way using original vendor-supplied bootable CDs/DVDs. Any user who can install windows on a blank HDD would be able to perform it easily. As long as the PC has regular old-fashioned MBR/BIOS. The easy way is completely impossible using EFI/GPT however. Do not let the concept of EFI having more than 4 primary partitions fool you, it is not intended to be used to your advantage, especially if multibooting. I have been booting windows residing on logical volumes for years, I’ll have a future tutorial on that too, the obstacles are far less than they would seem. For windows use I have moved down to a maximum of 11 partitions on the average HDD (fewer if HDD is smaller than 80GB) since you only get 24 letters of the alphabet anyway. If the internal HDD has 11, and you add another HDD internal or USB which has 11, there is also probably a CDROM or SDcard reader and that’s all 24 volume letters. Any excess is OK but you would have to juggle volume letters in Disk Management for windows to see which ones you want at the time, regardless of GPT or not. MBR/BIOS handles this in a MUCH more user-friendly and less time-consuming way, revealing EFI/GPT as FAR more costly to the individual or when a single administrator can not clone their working image to very many PC’s. There are literally decades of free, proven MBR/BIOS tools, even if “only” the ones from the most recent decade are still useful on the latest MBR/BIOS PCs. By comparison, there yet is a dramatically lesser number of effective free EFI/GPT tools, and those that appear are not expected to be useful for very many years into the future. This is by design.

      Therefore if you want to multiboot, even if you really like W8, make sure to NEVER purchase a PC which is “Made for Windows 8”, unless you can be sure the EFI & Secure Boot can be disabled on the motherboard, and make sure that they have been disabled before then partitioning using MBR/BIOS, formatting, & installing W8 or anything else. You will be a much happier camper. This is for consumers, hobbyists, and regular PC users.

      Server operators can be as advanced at coding as developers, and some may be able to pinpoint the dire need which made them acquire EFI equipment to begin with. But if you printed out all the messages on discussion boards about EFT/GPT from confused overworked IT guys, there would be a lot of dead trees. They’ve been dealing with it the longest, there are some unhappy operators in their camp who definitely do not have it made in the shade. Especially when things go wrong . . .

      hope this helps,

    175. iceflatline Says:

      ztron. thanks for your very generous comments. I took the liberty of removing some of the white space, otherwise your comments are as posted.

    176. Bill Says:

      Hi, “System Reserved partition” question –

      I have a Toshiba Satellite L305 (purchased January 2009; not used to present time and therefore brand factory new). I set it aside shortly after purchase because Vista refused to connect to Apple remote iDisk storage…but I did come across [and printed] this fantastic page at the end of 2009 (!)

      I am ‘researched and ready’ – four years after buying the laptop – to:

      1.) Do a Clean Install of Windows 7 (using Upgrade”CD) thus getting rid of Vista.

      2.) Deal with various driver problems reported in 2009-2010 (function key issues; brightness control, etc.). [Hopefully the later Toshiba and/or Linux drivers solved these issues.]

      3.) Install Linux Mint

      Despite all recent searching and Googling, I cannot find a sharp, definite answer to this question:

      Can a Windows/Linux dual-boot system be *accomplished* if Linux is added to a system where the “System Reserved” (Windows boot) partition has been made not to exist during Windows 7 configuration – by means of various methods suggested elsewhere?

      In such a case, it would seem reasonable that the Windows boot files/records – in the absence of a System Reserved partition – would be installed directly to the “C:/” primary/Active Windows OS partition, right?

      Can a dual-boot system (i.e., secondary Linux) be made to operate without that System Reserved partition? Can Linux/Grub deal with that?

      On the other hand, possibly it’s the case (but I hope not) that the boot files on the “System Reserved” partition are the very thing that makes the dual-boot system possible.

      Can someone advise?

    177. Bill Says:

      September 10, 2013 – In the intervening days I have learned that a dual-boot system can be successfully achieved without a System Reserved partition.

    178. Jan Says:

      i’m from Germany so read carefully my awesome English post ;-)

      First THX to all for share n1 informations.

      So i will share what i found…
      i use this on thinclient where the master HDD is a bioswriteprotected CF Card too boot something else than the manufactura wanna ;-) (im using the iso files written to cf Card)

      And a other Thing…
      if i made dual boots early i just boot xp and start the install inside xp and got a automatic boot menu…
      its a Long time ago can’t remember what i installed but i remember it worked this way.

      For now i only use win7 desk. and Linux Servers …
      because grub2 has somthing changed and most installs that dont categorise normal will fail.

    179. FollowTheMedia Says:

      Sorry but it doesn-t work if both grub2 and the linux os are on a logical partition. In that case, the first 512B of the logical partition are NULL.

      This is my fdisk -l situation
      /dev/sdb1 2048 30722047 15360000 27 Hidden NTFS WinRE
      /dev/sdb2 * 30722048 30926847 102400 7 HPFS/NTFS/exFAT
      /dev/sdb3 30926848 813323208 391198180+ 7 HPFS/NTFS/exFAT
      /dev/sdb4 813324286 976771071 81723393 5 Extended
      /dev/sdb5 813324288 968691711 77683712 83 Linux
      /dev/sdb6 968693760 976771071 4038656 82 Linux swap / Solaris

      Ubuntu and GRUB2 are installed onto /dev/sdb5 but the first 512B are NULL, so nothing works.

    180. iceflatline Says:

      FollowTheMedia, here’s my fdisk -l output. As you can see here my extended partition occurs on /dev/sda3. My Linux (in this case CrunchBang) and its bootloader (GRUB) are iinstalled on logical partition /dev/sda6. It works quite well.

      Disk /dev/sda: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 4096 bytes
      I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      Disk identifier: 0x607a9f43

      Device Boot Start End Blocks Id System
      /dev/sda1 * 2048 2457599 1227776 7 HPFS/NTFS/exFAT
      /dev/sda2 2457600 780165119 388853760 7 HPFS/NTFS/exFAT
      /dev/sda3 780167166 878661631 49247233 f W95 Ext’d (LBA)
      Partition 3 does not start on physical sector boundary.
      /dev/sda4 944005120 976771071 16382976 7 HPFS/NTFS/exFAT
      /dev/sda5 780167168 812935167 16384000 7 HPFS/NTFS/exFAT
      /dev/sda6 812937216 876638207 31850496 83 Linux
      /dev/sda7 876640256 878661631 1010688 82 Linux swap / Solaris

    181. FollowTheMedia Says:

      Hum, I start thinking that something is terribly wrong with my MBR. I should rewrite it down from scratch.

    182. satrapes Says:

      First of all thank you very much it was very helpful but i had this anomaly.
      When selecting to install the bootloader in /dev/sda3 when i restarted i only got the grub rescue command prompt and couldn’t for any reason log onto windows 7. Then i reinstalled and selected /dev/sda for the bootloader and i got a menu to choose between windows 7 and ubuntu and everything worked fine.

    183. satrapes Says:

      Hey i don’t know how but i did it one more time and it worked even though i had to repair windows by Bootrec.exe /fixMBR. Also i had the same problem as AJ which was caused from inattentiveness as i hadn’t moved linux.bin to c and therefore it couldn’t find it.

    184. jeck Says:

      I follow all your steps but after rebooting and selecting Linux, I’m stuck in blinking cursor, I have CentOS 6.4 x64 in Windows 8.1 installed.

      I was able see the grub menu and select CentOS 6.4 only If I boot my flash drive (the installer I used to install CentOS) but in Windows 8.1 it didn’t work.

      I have C: and E: logical partition before, I shrink the E: to have a free space to install the CentOS.

      /boot (200 MB) – ext4
      /swap (4Gig) – ext4
      / (all free space) – ext4

      If you can make another updates with Windows 8.1 and CentOS dual booting I appreciate it, and it is very helpful to others.

    185. iceflatline Says:

      jeck, thanks for posting. Sorry you’re having difficulties. A couple of things to check:
      – That Windows secure boot has been disabled, if applicable;
      – that the grub boot loader is installed in the correct partition (e.g., /boot);
      – that the boot sector of that partition has been correctly copied.

      I’ve not attempted to boot from another Windows partition on the same drive (e.g. “/E”). You may need to adjust the bcdedit command to reflect this partition, for example:

      [text light=”true”]
      bcdedit /set {ID} device partition=e:

      But again, I have not personally tested this.

      Your suggestion for a post update to include Windows 8.x is a good one. As soon as I find some spare time I will do that.

    186. jeck Says:

      Hi iceflatline,

      Thanks for the quick response, I’ve just solve my problem. I made an article for it, here’s the link

      Thank you and more power.

    187. cialis ucuz satın almak Says:

      […] […]

    188. Irrelevant Person Says:

      Thank you so much. You saved my day. Straight to the point, very well explained . Greetings from Brasil.

    189. Stillwaters Says:

      Thank you for the clear and well laid out guide. I successfully set up dual boot for Win7 and Linux, and learned about Linux and bcdedit in the process.

    190. iceflatline Says:

      Stillwaters, you’re welcome. Thanks for the kind words.

    191. tmanz Says:

      @iceflatline, I am desperately trying to get a dual boot from separate hdd’s going. Win8 on /dev/sda and Archlinux on dev/sdb. I’ve seen some mention of grub4dos working, were you able to confirm it? I’ve tried but it has failed. I suspect its because the UEFI system does not like booting MBR?

      My setup as follows

      Primary SSD (Win8)
      |- /dev/sda1 – recovery (ntfs)
      |- /dev/sda2 – boot (fat32)
      |- /dev/sda3 – unknown
      |- /dev/sda4 – windows primary (ntfs)

      Secondary HDD (Windows Data Disk / Archlinux install)
      |- /dev/sdb1 – unknown
      |- /dev/sdb2 – windows secondary (ntfs)
      |- /dev/sdb3 – /boot (fat32)
      |- /dev/sdb4 – /mnt (ext4)
      |- /dev/sdb5 – /mnt/var (ext4)
      |- /dev/sdb6 – swap
      |- /dev/sdb7 – /mnt/home (ext4)

      I am able to boot into Arch via the BIOS, which has an entry for partition3 of sdb.

      Is this at all possible using bcdedit? has anyone been able to make progress booting into a secondary hdd in a UEFI sys.

      I’m new to it all so help/guidance appreciated.

    192. iceflatline Says:

      tmanz, I wish I could help you. However I have not attempted to dual boot by editing Windows data store (or using other, third-party applications). If you roll back through the comments in this post, those provided by Rudi.RG and ztron may be of assistance.

      BTW, UEFI will boot MBR disks just fine. Your motherboard should provided a setting for booting “legacy” or “Other OS” devices.

    193. satrapes Says:

      Hi iceflatline, second time I post and thanks again this post is excellent.

      I followed your guide to a dot installing ubuntu 13.10 alongside windows 7 and everything run like a clock up until I upgraded to 14.04.

      There is a bug when upgrading to 14.04 where grub breaks and as a result you get the error

      grub_term_highlight_color not found or sth like that and you end up in grub-rescue command prompt.

      Would you happen to know what should I do to fix this? I know that it is specific to one distribution, but I am not so sure what I can alter without messing the previous configuration which was working so well.

    194. iceflatline Says:

      satrapes, that’s a new one. I’ll need to do some further research.

    195. satrapes Says:

      Ok thank you very much.

    196. Kickiss Says:

      Hi everyone,
      I just wanted to let you know my success story with booting from multiple HDD.
      I read carefully all comments with looking for a answer how dual boot Windows 7 and Linux while Linux on a second hard drive.
      First my eye caught Rudi.RG’s solution with GRUB4DOS and I was almost to try it when reading further found Renato’s post with a link to which unfortunately was not opening for me :(. Anyway , I Googled around and found what it was talking about it there:

      You have to edit the linux.bin file with Hex editor and change whatever you find at the 0064 address to value 81. That’s all! It worked like a charm for me.

      Now if somebody could explain what does it mean and how robust is it, it would be a great contribution to this wonderful iceflatline’s tutorial.

    197. Eric Says:

      Excellent tutorial. Thank you so much. And the “Related Posts” tells me you fuck with SliTaz, too. <3 I’ma try to make it a point to be by here again.

    198. iceflatline Says:

      Eric & Kickiss, thanks for contributing. Much appreciated.

    199. anon Says:

      Thank you so much for this tutorial, it’s exactly what I was looking for.

    200. Stroback Says:

      Excellent article. Clearly written and technically accurate. A real breath of fresh air.

      I was able to use this (with minor changes) to triple boot LinuxMint 17.1, Windows 8.1 and Window 10 Insider Preview.

      I installed the Linux partitions on a secondary drive that had an existing partition. My main drive already had two partitions (the two windows partitions) so I couldn’t force the Linux and the swap partitions onto that. No issues though, just needed to be careful with the drive designations when following the article’s instructions.

    201. Stroback Says:

      Also, I didn’t need a hex editor to change the .bin file. It worked exactly the way the article said it would.

    202. beng Says:

      It worked! Well, mostly, and not at first. After reading oodles of forums, this solution seemed the most straightforward. During the Precise puppy install, the process asked where to install Grub4dos, and I pointed to sda3 as was suggested instead of sda1. It then wanted me to mark sda3 as “boot” so I did (a mistake). Apparently it also UNMARKED the first partition as boot because when I rebooted only puppy came up! Windows 7 rescue disk couldn’t see windows any more. Eventually in Linux I figured out thru GParted that the first partition needed set back to boot, and then windows 7 returned. Pheeeew, no damage. I had EasyBCD in windows, but no matter what settings I tried, Linux would not boot. So undid any changes EasyBCD made, and copied isolinux.bin to C: and manually edited the BCD file as suggested here. Now THAT worked — puppy was listed as a choice & would boot up.

      However, it seems I have no functionality for Grub in the advanced startup options after choosing Linux. Something about invalid file hd -1, -1 or something. Not even sure Grub loaded properly — nothing in /boot except the kernel and an empty grub folder. /menu.lst shows:

      # menu.lst produced by grub4dosconfig-v1.8.0
      color white/green yellow/blue white/black green/black
      timeout 10
      default 0

      # Full installed Linux

      title Precise Puppy 5.7.1 (sda3/boot)
      kernel /boot/vmlinuz root=/dev/sda3 ro

      # Advanced Menu
      title Advanced menu
      configfile /menu-advanced.lst

      and /menu-advanced.lst shows:

      # /menu-advanced.lst produced by grub4dosconfig-v1.8.0

      title Back to the main menu
      configfile /menu.lst

      # additionals
      title Bootup from HDD\nBootup from the master boot record of the hard disk drive
      chainloader (hd0)+1

      title Find Grub2\nBoot up grub2 if installed
      find –set-root –ignore-floppies –ignore-cd /boot/grub/core.img
      kernel /boot/grub/core.img

      title Grub4Dos commandline\n(for experts only)

      title Reboot computer

      title Halt computer

      So my question is, to get grub’s functionality during Linux bootup (I may need it), do I need to re-run Grub4dos? Grub’s settings are rather cryptic. I’m afraid of screwing something up again — right now the multi-boot works fine & don’t want to risk that and the method here didn’t mess w/windows mbr, which I like.

      Thanks in advance…..

    203. iceflatline Says:

      Stroback, sorry my friend. I have absolutely no stick time with Grub4DOS or the “Precise puppy.”

    Leave a Reply