11

I have a laptop, and I'm going to install Ubuntu (I have experience, and I have successfully installed Arch Linux, Ubuntu, Fedora, Debian, Xubuntu, Kubuntu, Manjaro Linux, etc.), but installing Ubuntu 14.10 (Utopic Unicorn) alongside Windows 10, Ubuntu can't detect Windows.

It shows me like there's no OS, but I have Windows 10.

I have two primary partitions by the way if I manually install. If the Ubuntu installer can't detect Windows 10, will it be detected at GRUB?

Fabby
  • 34,259

6 Answers6

12

I wasn't able to get the boot repair to work so I manually added a Windows 10 boot option.

The first step is to edit /etc/grub.d/40_custom (using SUDO) and add the following lines to the bottom of the file:

menuentry 'Windows 10' {
set root='(hd0,msdos1)'
chainloader +1
}

In this case my bootloader was in /dev/sda1 hence the 1 at the end of msdos. After this run sudo update-grub2 and you should be good to go.

Worked for me, advice taken from here: http://technologytales.com/2010/11/21/manually-adding-an-entry-for-windows-7-to-an-ubuntu-grub2-menu/

DaneM
  • 376
Zack
  • 121
  • 1
    Tip: When using grub-customizer to create the GRUB2 menues (I do, just to have them neat ;)), creating a chainloader type entry adds two additional lines to the two you had mentioned in the post. Be aware to remove them, otherwise Windows 10 will refuse to boot (It happened to me, so I spread the voice for solving the problem) – SonicARG Jul 31 '15 at 23:43
3

Windows should be detected while you manually install Ubuntu 14.10 and added to GRUB. If it is not added initially, boot into Ubuntu, install Boot Repair and run that. That should add Windows 10 to your GRUB.

Source: I have run a Windows 10, Ubuntu 14.10, elementary OS, Fedora quad boot

larouxn
  • 789
  • 6
  • 15
1

I had the same problem with Windows 7 after an Ubuntu 15.04 install.

The solution was to use Grub 2 ntloader module instead of chainloader.

Here is my 42_custom in /etc/grub.d/

menuentry "Win 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
insmod ntldr
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 9804BD3004BD126C
ntldr ($root)/bootmgr
}

You can change the text to Windows 10, it's only text.

  • what does the string 9804BD3004BD126C mean? I am getting weird errors relating to that... – DrCord Sep 01 '16 at 14:22
  • A bit late to the party, but that's his partition UUID (They're short like that when windows sets them) And shouldn't the set root=... line be redundant since the search overwrites it? – J V Dec 10 '16 at 22:19
0

Why don't you try to run boot repair from the Windows 10 ISO image? That way, Windows will have an MBR, and it would show the other operating systems. Try that.

I believe you have installed Ubuntu, so insert the Windows DVD and select repair -> cmd.

Now enter,

Bootrec.exe /fixmbr

There are other commands too. You can try these out:

/FixBoot - writes a boot sector onto system partition to start Windows

/ScanOs - scans all disks for Windows installation and displays them.

/RebuildBCD - scans all disks for Windows installations and prompts you to pick the ones you want to add to the BCD.
0

Boot Ubuntu and mount your Windows partition (simply open the disk on Nautilus)

Run the following on the command line: CtrlAltt:

sudo os-prober

If your Windows installation was found, you can run:

sudo update-grub

Note that step 2 is just for your convenience. You could just mount the Windows 7 partition and then run update-grub.

graham
  • 10,436
0

I have something like this

menuentry 'Windows 10' {
search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
  • 2
    It might be helpful to describe what this code fragment means and what file it's found in (and what section) – Nick Weinberg Nov 06 '16 at 14:24
  • I second @NickWeinberg not everyone will recognize that snippet as an entry in the grub.cfg file. Please expand your answer for the benefit of those who don't recognize it as those who do are unlikely to need the guidance. Thank you for helping out! – Elder Geek Nov 06 '16 at 15:25
  • I found it in grub.cfg created by android installer. I'm not very good in editing grub (and english too...) but i think "root" and "chainloader" depends on localization of windows efi files. – Elhatron Nov 06 '16 at 15:56