');

Related Articles

562 Comments

  1. 15

    Steve

    I’ve already installed, formatted, reinstalled, U12.04 & Win7 twice each so far this weekend, and expect to do so at least (hopefully st most) once more this evening.

    I have UEFI and it is kicking my butt.

    Before I go through the process described on this page – does anyone here know if this guide will work with a UEFI system?

    (EasyBCD, for example, will not, and will screw up the boot infrastructure on your UEFI hard drive – I’ve just lived that.)

    1. 15.1

      finid

      I haven’t tired this on a uefi system, but will sure like to.

      What is the brand of HDD you are using?

      1. 15.1.1

        samski

        hello,
        i tried to install ubunto on my uefi based lenovo s205 several times and i always get the same grub4dos thing, so steve if you have found a solution for this issue please share it with us to complete this wonderful tuto.
        ps.: thx finid for your reply on my last question. the article you gave me helped me really to understand what i am doing.

  2. 14

    markd

    I just followed this tutorial step by step and when I rebooted it went to what I think was the Grub. In other words windows did not boot up, but instead I got a a list of about 7 selections… (two of them pointing towards windows 7 of all things..) both windows and Ubuntu seem to boot fine, but it appears that I’m using grub instead of windows :( Any ideas? The only difference as I went through the process is that my windows install had three partions already on the hard drive, not two as is your case. I’m going to try and wipe the drive and start over fresh and see If I can get windows to install without the third partition.

    1. 14.1

      finid

      That just means that you managed to install GRUB in the MBR, rather than in the boot partition of Ubuntu.

      1. 14.1.1

        markd

        Thanks. Everything is working perfectly now. Dual boot on a laptop!!! The first time through I didn’t use the dropdown menu, and had selected sda5 in the same method as earlier. However, upon a second more careful reading I caught my mistake. Thanks.

  3. 13

    ballakanzri007

    Hello everyone and thanx a lot for this excellent tuto!
    Actually I have a problem in creating partitions! it takes long long time to resize C parttion (sda2) it just like forever!
    is it the same for all or just me?
    thanx for any help or hints!

    P.S:the tuto is so clear just need some informations about how much time takes a step or another… we can call that “installing circumstances” hehehehe

    1. 13.1

      finid

      Depending on the size of sda2, it shouldn’t take more than 1 minute. So if it is taking “forever,” something else might be going on. What is the size of the partition?

      1. 13.1.1

        ballakanzri007

        Thanx for fast reply!
        it’s OK now! I am in the easyBCD now! try to download free version and still waiting for link or email from them!
        thanx a lot again! you are the best!

        1. 13.1.1.1

          finid

          Thanks for the kind words.

          On EasyBCD, you do not need to wait for them to send the download link. Just visit this page, scroll to the bottom of the page. Type in your name and email in the specified fields and click the Download button. That is all it takes to download the free edition of EasyBCD.

          1. 13.1.1.1.1

            ballakanzri007

            ok Guys! I have full working windows 7 ubuntu 12.04 dual boot thanx to you!

            I couldn’t download EasyBCD from home page so I did it from somewhere else without email or anything else…

            after installing ubuntu and restart to windows 7, windows goes to trouble shooting and did some recovery stuff…
            I was affraid that my data is lost but finally i found everything is ok!

            thanks a lot guys especially that genius^
            are pushing the limits like me? I am trying windows ubuntu 12.04 hackintosh lion 10.7.3 multiboot!
            hahahahahaha

  4. 12

    Akhil

    I followed all the steps correctly. but when i select the linux in boot menu i get something like:
    ” variables
    starting cmain…”
    Thats it. it stays there. how to correct this?

  5. 11

    Emanuele

    Hello,
    I have more or less the same setup you are describing in this tutorial. The main difference is that I have two Hard Disks.
    I have installed Windows 7 in the second one (sdb). It put a 104MB MBR partition in sda.

    When I installed Ubuntu 12.04 I used the remaining space in sda to build a 512MB Ext4 partition for /boot, a swap partition, and I allocated the rest for /.
    Then I set the device for boot loader installation to the partition set for /boot, and installed everything.

    The computer restarted on Windows as expected. I went for EasyBCD and I added the GRUB 2 option.
    When I restart the computer I have the correct menu to select among the two OS.

    It boots correctly selecting Windows.
    If I go for Ubuntu, this is what I got:
    Try (hd0,0): NTFS5: No ang0
    Try (hd0,1): Extended:
    Try (hd0,2): invalid or null
    Try (hd0,3): invalid or null
    Try (hd0,4): non-MS: skip
    Try (hd0,5): Extended:
    Try (hd0,5): EXT2:

    And it stays stuck there. With slightly different setup (I have done a thousand attempts, I can’t remember the exact mixture), instead of this error it goes to GRUB4DOS.
    I have not yet achieved the right formula to go to the intended Grub :)

    1. 11.1

      finid

      When dual-booting on 2 hard drives, you want to confine each OS to its own disk. That will save you a lot of headache. And if done correctly, you can even do without EasyBCD.

      Try this:

      Windows on sda

      Ubuntu on sdb

      Just make sure that GRUB is written to the MBR of sdb, not to that of sda.

      Then if you want to boot into, just access the boot menu and select sdb.

      1. 11.1.1

        Emanuele

        Ok, I will try it. Thanks a lot!

        Btw, before re-installing everything, doing it in that way the computer would boot in Windows if I do not push anything, right?
        Is it an option I can switch in BIOS?

        If it is not, is there a way to say to Windows to move everything to sdb? Installing it to sdb he still put MBR on sda. I use Windows rarely, so I would prefer the autostart on Ubuntu.

        1. 11.1.1.1

          finid

          Yes, the PC will boot into Windows if you do it as suggested. But you can always change the boot order in the BIOS. If that proves too much trouble (it really isn’t) you can use EasyBCD to add an entry for Ubuntu in Windows’ boot menu.

          1. 11.1.1.1.1

            Emanuele

            Ok, it does not work. Sorry for the extended trouble!

            I have installed Ubuntu in sdb (Disk 0 accordingly to Windows) and Windows 7 in sda (Disk 1 accordingly to Windows).
            I have 3 partitions in each disk:
            – in the Ubuntu one there are the two Ext4 partitions for /boot and /, and a swap partition.
            – in the Windows one there are two small partitions built by Windows during the installation, and the main partition.

            With the previous setup (Windows on disk 0 / sdb but his boot partition in sda, Ubuntu in the remaining part of sda) only windows was working. There were no way to start Ubuntu.

            With this configuration (Windows on disk 1/ sda, Ubuntu on disk 0/sdb), only Ubuntu starts. If I ask him to start from disk 1 via BIOS, Windows crash. It goes for repair, it does not work. Nothing to do.
            Starting Ubuntu, everything seems fine.

            Later I tried to reinstall Windows, to see if it could correct the problem. I deallocated the three partitions on disk 1, and started the install from scratch giving him just “Disk 1, unallocated” as a direction on where to install. Now, neither Windows nor Ubuntu are working.

            I have a motherboard P8H61.
            What does EFI means? I have read in other websites that this could be the problem, can it? Can it be related to my motherboard?

            I have installed dual boot XP / Ubuntu on many different machines, with one or two hard disks, and I had never had any problem, this is the first time I have all this troubles: I am not sure if it is Seven, the new Ubuntu 12 or the new motherboard.

          2. 11.1.1.1.2

            Emanuele

            Ok, after more attempts, I still can not do it.

            The process is always the same:

            I install Windows, it works.
            Then, I install Ubuntu. Ubuntu works. Windows does not work anymore, it asks for repairing. Repairing does not work either.

            I have to format Windows partitions and install Windows again. Now it works. However Ubuntu does not work anymore.

            Re-Installing Ubuntu at that point does not help either, it is not possible to boot from Ubuntu.
            Windows keep working.

            Using EasyBCD, Grub 2, it does not work either. The “ubuntu” option send me to Grub4dos. In C: I have ANG0 and NST/AutoNeoGrub0.mbr

            To start Ubuntu at that point I need to format everything and start again.

            This is true both if I put one OS per Disk or if I split them among different disks, there is no way (and no differences)

            Is it possible it is related to UEFI option? There are a lot of issues related to my motherboard with Ubuntu 12…

            Usually dual booting Win/Ubuntu is so easy, this PC is driving me mad!

          3. finid

            Well if you have 2 hard drives, then you do not need to use EasyBCD. Just do this:

            Windows on sda

            Ubuntu on sdb

            Just make sure that GRUB is written to the MBR of sdb, not to that of sda.

            Then if you want to boot into, just access the boot menu and select sdb

          4. 11.1.1.1.3

            Emanuele

            That is what I did, but it does not work. I have Everything about Windows in sda, and Everything about Ubuntu in sdb.
            Before installing Ubuntu, the sdb disk was completely unallocated, I built the three partitions and it worked.

            However, Windows stopped working. Reinstalling Windows (always only in sda, I unallocated all sda and then asked Win7 to install itself in that disk), Ubuntu stopped working. Even if I did not touch his partitions.

            Now, if I set the Ubuntu disk as the first bootable source in the BIOS, it jumps it and go to the second one, Windows. That’s why I tried, as a second chance, EasyBCD from Windows, but it does not work either.

            I have done this a lot of times on different computers, one major difference is that I have this “UEFI” label on my SATA disks with this motherboard (p8h61), I am not sure what it means. The other major differences are that in the previous attempts I was using XP and Ubuntu 10.

          5. finid

            Then this is likely a mobo issue.

  6. 10

    samski

    Hi,
    I did everyzhing just as in your Guide, made a 500mb ext4, set it as bootloader partition, but I got the same Grubdos error. I tried a clean installation but still get that error.
    I have sd1 for Win boot, sd2 as C:, sd3 as D:, no sd4, sd5 boot, sd6 for Ubuntu sd7 and sd8 for home and swap, the 1st and 2nd partitions formated with windows, all other with gparted from ubuntu as logical driveres.
    any hints about the reason for this error??
    whatever i try, sd4 still missing.

    1. 10.1

      finid

      sd4 is not missing. It is an extended partition.

      Regarding the error, I think it may have something to do with EasyBCD, but not totally sure. Attempting the same with Linux Mint 1 to see if I get the same error.

      Btw, you might want to read this article for an intro on partitioning in Linux.

  7. 9

    Anton

    PLEASE HELP!!!

    WHEN I TRY TO BOOT INTO UBUNTU 12.04 AFTER DOING ALL THE STEPS, I GET THIS —–>>>

    GRUB4DOS 0.4.5b 2011-11-27, Mem: 628K/2046M/0M, End:35560D

    [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.]

    grub>

    PLEASE HELP DON’T KNOW WHAT TO DO ANNY MORE

    1. 9.1

      finid

      Be sure to remove the installation CD, reboot, then see what happens.

      1. 9.1.1

        Anton

        I USED A LIVE USB, AFTER THAT REMOVED THE STICK. I REBOOTED A COUPLE OF TIME STILL WITH NO LUCK, MAYBE TRY A FRESH INSTALL????

        1. 9.1.1.1

          finid

          Please disable Caps Lock.

          If you can log into Windows, try redoing the section of EasyBCD to add an entry for Ubuntu in Windows boot manager. Before that, ensure that GRUB is installed in the proper location, which should be the boot partition.

          1. 9.1.1.1.1

            Nick

            I have the same problem as Anton. I have redone EasyBCD multiple times, as well as redoing the entire installation of Ubuntu. How could I check to make sure GRUB is installed in the proper location? Other than selecting sda5 from the drop down menu? Any help is appreciated.

          2. finid

            I’m beginning to think the problem could be with the version of EasyBCD we are using. I’ll have to look into this further.

    2. 9.2

      franco

      Did you solved that problem?
      I have the same.

      1. 9.2.1

        Anton

        the problem was solved, i was installing from usb,
        i had to remove the usb before rebooting. had to use the reset button. after that booted into windows, changed the boot settings in easyBCD, and it worked. but i had to do a fresh install of ubuntu,

        if using a cd to install ubuntu, the media ejects before the reboot.

        so thanx a lot Finid

        that seemed to be my problem.

        hope this helps

  8. 8

    Edgar Hoffmann

    Hello.
    Thanks for your nice tut.
    Thus, on many/most Windows-boxes that come preinstalled the harddisk looks like this:
    /dev/sda1 (NTFS, Windows7 reserved, boot)
    /dev/sda2 (NTFS, Windows7 system)
    /dev/sda3 (NTFS, Windows7 recover)
    /dev/sda4 (NTFS, Windows7 some kind of diagnostic-partition)
    This is shown by PartedMagic on my system.
    So three more partitions (even only one) are not possible.
    Am I right, that the only solution would be to re-install Win7 (if you have an install-disk) in only one partition?

    1. 8.1

      finid

      Yes, you are right. Maximum 4 primary partitions have been used up. If that is the default partitioning scheme of OEM Windows, then your best option is to reinstall, if you have a Windows installation CD.

      The other option, is to consider wiping one of the partitions. What, for example, have you done with the diagnostic partition? If this is a partition you can do without, it is the best candidate to wipe and reuse.

      1. 8.1.1

        Edgar Hoffmann

        Hi.
        The “Diagnostic” partition is only about 1GiB in size.
        Don’t know, what this is for at all. Gparted says ist’s marked as “diag”…

        Some time ago I wanted to make a dual-boot system from another Win7 PC (with less primary partitions), re-sized the windows-part and deleted a partition which I thought was unneccesary…
        After installing Ubuntu (which went allright), the Win7 installation refused to boot because it missed just that one partition.
        I had to face it: No more Windows, just Ubuntu on that machine…
        I just want to mention, that Win7 isn’t that frugal as Windows XP once was, when it comes to partitioning (resizing, deleting, and so on).
        Maybe this is only due to those OEM-installs.

        1. 8.1.1.1

          finid

          Those are most likely just OEM installs. By default, Windows 7’s installer creates only 2 partitions:

          sda1 – system reserved

          sda2 – data partition

  9. Pingback: Links 19/5/2012: Mandriva Linux Freed, New Linux Mint RC | Techrights

  10. 7

    lewac

    a coupla mentions here. first off its always recommended to install /home to a separate partition. you also need / (root) and swap. nowadays you oughta be using ext4 for any linux distro. its proven over time to be very robust. also try to put swap on a separate physical drive if you have one installed. as a guide swap should be about twice the size of your physical memory… 6gb on a 32 bit system should suffice.. 16gb on a 64 bit box.

    I also recommend that you install grub2 by default. and then make a copy of the 1st sector of the boot partition. this preserves grub2’s mbr… just in case you need to restore it at some future time. in fact on a sys with more than one HD you should make copies of those MBR’s as well.

    another nice thing about grub2 is that it is FULLY customizable. google on “grub-customizer” for howTo’s. quite frankly like most things in linux it makes the windows boot loader look like a turd in comparison.

    1. 7.1

      finid

      That “swap should be about twice the size of your physical memory” is old. Nobody follow that anymore. Can you imagine a box with 16 GB of RAM, that would 32 GB of Swap space.

  11. 6

    SysKoll

    Excellent tutorial. As more people are coming to me with Windows 7 machines they want to dual boot, I was wondering if there was a way to avoid overwriting the MBR with Grub.

    1. 6.1

      lewac

      you can opt out of installing grub during the ubuntu install. however I’m really wondering why grub2 shouldn’t be your primary loader to begin with? one way to avoid a windows overwrite on a re-install is to make a copy of the 1st track of the boot drive. that way if anything wipes the mbr you can bring it back from a linux boot stick (or CD).

  12. 5

    ben

    I get this when I install GRUB either at /sda or /boot:

    I have no idea what is wrong or how to fix it.

    GRUB4DO 0.4.5b 2011-11-27, Mem: 630K/318M/496M, End:35560D

    [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command competions. Anywhere else TAB lists the completions of a device/filename.]

    grub>

  13. 4

    Ravindra Siwach

    Thanks for this.. Seems like the issue was caused by chosing a ext2 file system for /boot.. cuz when i installed using ext4 it worked.. a clean install no problems… Thanks again

  14. 3

    David

    Finid, is there a good way to set up full-disk encryption on a dual-boot (Win 7 & Linux) laptop?

    1. 3.1

      finid

      If you are thinking about full disk encryption on the Windows side too, I don’t think that’s possible, but I could be wrong.

      On the Linux side, it depends on the distribution you intend to use. What’s your distro choice?

      1. 3.1.1

        David

        I believe that Truecrypt can be used to encrypt a Windows drive starting at the bootloader, but don’t know how that would affect a dual boot with Linux. (I’m using the Windows bootloader with EasyBCD. Your tutorials are the best — thank you!)

        Right now I’m using Linux Mint 11, but will probably switch to 12.04 Ubuntu or Kubuntu soon (I like the way global menus save vertical space on a small laptop screen, and Kubuntu is the only KDE distro I’m aware of that can be set up that way), and I know that the alternate installers offer full encryption (wish I could use LVM, too).

        One complicating factor is that I have an NTFS partition set up to hold all my data, so I can read it from both OSs.

        1. 3.1.1.1

          finid

          How you setup one end of a dual-boot system does not affect the other, in terns of booting. So, if you can configure full disk encryption for Windows, it will not affect how you setup the Linux side.

          If you can use Truecrypt “to encrypt a Windows drive starting at the bootloader”, you can also use it to encrypt the shared ntfs data partition. The only thing that will happen when you attempt to access it from the Linux end, is you will be prompted for the encryption passphrase.

          As for LVM, yes, you can configure LVM on any Ubuntu-derived distribution that also has an alternate CD/DVD installation image.

          1. 3.1.1.1.1

            David

            Thanks, that’s a big help. Maybe I can get my disk fully encrypted after all.

            I know I can use LVM with the alternate installer, but I can’t do it on the same disk as a Windows installation that uses conventional partitioning, can I?

          2. finid

            Whatever you do on one end of a disk in a dual-boot configuration does not affect the other side. So nothing stops you from using an LVM-based disk partitioning scheme on the Linux side when dual-booting with Windows or any other OS. As an example, see this tutorial.

  15. 2

    kwangil

    so, the only different with my wrong installation is just the size of /boot partition?…

    I used 200MB for /boot partition and ext2 or ext4, both show me the fatal error message when installing grub in /boot :(

    Should I have to use 500MB for /boot partition? …

    It’s really fine to cut less then 1GB of hard dirve away. I just feels quite rediculous that almost all of the installation guides of the UBUNTU said that “100MB of /boot partition is okey!” …

    1. 2.1

      finid

      Yes, 100 MB for /boot should be enough and I do not think that the disk space allocated to it is the cause of the error you are seeing, but you never know, stranger things have happened. In any case, let me know if it worked for you or not.

Comments are closed.