1

I assume, this is not a duplicate post. Please read my findings below before assuming so.

I have gone through several questions over the Internet regarding people complaining that they are not getting GRUB option to get into Ubuntu OS after dual boot installation. But, unfortunately none of the answer worked for me.

I will explain issue that I observed in chronological order.

A month ago, I had set up Windows 7 installation along with RHEL 6.5 in dual boot scheme. RHEL's GRUB used to appear to show me options to select between Windows 7 and RHEL (which means I installed Windows 7 first and later installed RHEL).

Below is/ was my laptop's current partition scheme:

  1. 100 MB of Windows boot partition.
  2. 100 GB of partition labelled C (Windows partition).
  3. 300 GB of partition labelled D (my personal partition dedicated to movies ;) ).
  4. 75 GB of partition on which RHEL is/ was installed. (Just the root partition).

And, please note that my laptop has BIOS (not UEFI).

I wanted to replace RHEL 6.5 with Ubuntu 14.04 using a bootable USB with the live ISO of Ubuntu and started setup of Ubuntu but Ubuntu's setup showed that:

The computer has currently no detected operating systems

So, I didn't want to take risk of moving into custom partition step. (I guess, there is a module named as "os-prober" which is definitely not working. But it always works with RHEL and that's why I have currently RHEL and Windows 7 installed in dual boot mode in my laptop ).

I have followed this, this and this and made below attempts.

  1. Clean any invalid GPT leftover in /dev/sda using "sudo fixparts /dev/sda". While performing this step, I accidentally deleted MBR and lost all data stored in my other partitions. :(

  2. Clean shutdown of Windows 7 must be done.

  3. Maximum 4 partitions should be created. Fourth one being the partition dedicated to Ubuntu.

  4. Format fourth partition using GParted.

  5. Tried to fix any boot-loader issue using boot-repair-tool.

  6. Ran "chkdsk" command to make sure there is no error in HDD.

  7. Tried to install Ubuntu using WUBI. Installed successfully, got an option to choose between Windows and Ubuntu. But Ubuntu failed to mount root directory by complaining that no root partition found.

  8. Last one but not the least: Totally cleaned the partitions and performed re-partitioning using GParted as well as windows partitioning tool.

After following Point No. 8, I again tried to setup Ubuntu and Windows 7 as dual boot but the issue remains the same. No OS detected.

Someone might ask me to install ubuntu anyway (custom partition) without caring if it shows that the computer has no detected OS. But, please be informed that I have tried this also. Ubuntu was installed successfully but I didn't get any GRUB menu while rebooting. I had tried to fix this by using boot-repair-tool. But still no GRUB menu was found.

Is there any step I am missing?

Now there is an another story: I tried to have a fedora 20 and Windows 7 dual boot setup. With Fedora I did not get the "No OS detected" message. However, I installed Fedora 20 on the last partition. As you know, Fedora 20 doesn't offer an option as to How and Where to install GRUB. Still, I proceeded, and after successful installation I didn't get any GRUB menu while booting. My laptop went straight into Windows 7. Also tried boot-repair-tool but still no luck.

Let me know if you want any data related to my partition or BIOS. Please don't ask me to create at most 3 partitions, otherwise I have to better live with RHEL in dual boot setup. Please don't ask me to install ubuntu in VM either because I have just 3 GB of RAM.

What else should I do to get Ubuntu dual boot with Win 7?

2

This will most likely seem like a ridiculously stupid answer but it just worked for me and for anyone else having this problem it might help. When I installed ubuntu I selected "other" as I had already set up the partitions and didn't want ubuntu to do it. Doing it this way meant that the windows partition had the boot flag and therefore I got no boot menu. All I had to do was select the ubuntu ext4 partition as the boot and it worked!

Tl;Dr: Change the boot flag from windows loader to GRUB partition.

  • Thanks for your input. I thought this question was almost deserted. I'll give it a try and get back to you in a day. – Rohit Oct 23 '14 at 5:02
  • Sorry, it didn't work ! – Rohit Oct 31 '14 at 7:19
1

Finally, I have found the solution. But the solution doesn't explain why I have been facing this dual boot issue. But I have found no where that these steps that I am going to explain below, are mentioned any where.

Following steps were performed by me:

Step 1: Installed Windows 7.

Please note that I had 3 partitions after Step 1.

/dev/sda
->    /dev/sda1 : Windows auto-created 100 MB System reserved partition.
->    /dev/sda2 : C Drive.
->    /dev/sda2 : D Drive.
->    100 GB Unallocated partition.

Step 2: Created bootable USB of Ubuntu and started live session of Ubuntu.

Step 3: Ran "GParted" and created fourth partition as "Extended Partition". Then I created 2 other logical partitions under the extended partition of 80 GB ( /dev/sda5 ) and 20 GB ( /dev/sda6 ) respectively.

Step 4: Ran Ubuntu installation and I choose "Something else" to create my own partition scheme for Ubuntu.

Step 5: Re-formatted /dev/sda5 as root partition and /dev/sda6 as swap partition.

Step 6: Selected /dev/sda5 and clicked "next" to continue with the Ubuntu installation.

Step 7: After installation was finished and my laptop had rebooted, I found that my laptop straight entered into Ubuntu. Later, after restarting again, I triggered to show GRUB menu. I found that GRUB menu had no entry for Windows.

Step 8: On the same GRUB menu screen, there was an another option as:

Advanced Options for Ubuntu.

It led me to an another menu having two options. The second was:

Ubuntu, with Linux 3.16.0-23-generic (recovery mode).

Later, it led me to the Recovery Menu. This menu had several options such as "resume, clean, dpkg, failsafeX, fsck, grub, network, root, system-memory". I chose grub and hit OK.

This repaired GRUB and asked me to restart my laptop. Later, when I restarted my laptop and triggered GRUB menu by hitting UP arrow key, and guess what I found. I found that GRUB menu had several options, including "Windows 7".

Then, I tested Ubuntu as well as Windows 7 one by one, and both of them started without any glitch.

0

I have no idea how to make osprober find your windows installation. Have the same problem on my gentoo installation. I can provide you with a workaround though. However there is a drawback to this: You have to maintain this change manually.

First find out the UUID of the partition where the windows boot loader is placed

blkid /dev/sdXY

Add the following code to the /etc/grub.d/40_costum

menuentry "Windows 7" --class windows --class os {
    insmod part_msdos
    insmod `[file system format]`
    insmod chain
    search --no-floppy --fs-uuid --set=root `[UUID of boot partition]`
    chainloader +1
}

make the script executable chmod 750 /etc/grub.d/40_costum

run update-grub2 and reboot.

Now you should have a custom menu entry for Windows 7.

  • Thanks for your input. I can only test your suggestions in the non-installed live environment of ubuntu because as mentioned I failed to boot into the installed Ubuntu. I'd confirm you about this tomorrow. – Rohit Aug 21 '14 at 6:25
  • Sorry @paradoxon . blkid /dev/sda or blkid /dev/sad1 returns no output. Is there any other I can do this workaround? – Rohit Aug 22 '14 at 11:18
  • /dev/sda cant a have a UUID, since UUIDs reference only partitions and this is a device. But /dev/sda1 must have a UUID. Did you use blkid as root? Other way to find out the UUID is to do ls -l /dev/disk/by-uuid/. You get output formated like this [UUID] -> ../../sdXY. You can build a entry without using the UUID but it wont work as reliable. – paradoxon Aug 22 '14 at 12:33
  • I got the UUID from a live booted image of ubuntu using sudo. But later I found that I could not make use of what you advised. Because I installed ubuntu after Windows then even after successful installation, no grub menu of ubuntu appeared which should let me choose between OSes. And thus realized, I did not achieve anything after I managed to bring the change in the grub script from a live OS. Please let me know if went wrong. And if choose to install Windows after Ubuntu then windows boot loader overwrites any last grub loader(grub in this case). :( – Rohit Aug 28 '14 at 12:53
0

Try this metode if you’ve grub installed:

In Terminal:

  1. sudo update-grub
  2. edit by NANO or vii /etc/default/grub and modify if in GRUB_TIMEOUT=0 modify for ex 5 and SAVE; easier in Midnight Commander (apt-get install mc)(sudo -s ENTER, mc ENTER)!!!/etc/default/grub and F4!!!!(sudo -s ENTER, mc ENTER)
  3. again sudo update-grub
  4. Close the terminal and RESTART or REBOOT
0

I have the same problem, and solved as i explained :

1 - You should turn off fast boot, and secure boot, search how to do it on google.

2 - Search how to open UEFI(BIOS). Change the boot mode from boot tab, and save and exit bios.

3 - Press F12 at the start, there will be many choice, Windows Loader at the top. In this list, a choice (Start from HDD etc.) exists, select it. Then WUHU, the boot screen Windows, Ubuntu selection comes to appear.

-1

Use boot-repair-disk and GParted to format the RHEL partition and then you will be able to install Ubuntu. You have to update Grub.

  • I have tried everything. I have got this issue fixed. Please refer to the accepted answer, if you would like to know How I fixed this. – Rohit Feb 9 '15 at 4:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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