0

I have decided to give Ubuntu a try, so I decided to install it alongside my Windows 8.1 (not preinstalled - It was delivered with Win7), though I had to make a custom install (had the "no system detected" or something upon installation). So I installed Ubuntu on a separate partition.

Anyways, when I booted up after installation, the PC booted directly up into Ubuntu, so I downloaded the Boot-Repair tool and ran it. When I boot up now, I reach the GRUB menu with Ubuntu as the only entries. Boot-Repair gave me this log.

How do I correctly add my Windows 8.1 to GRUB? I have just a little experience with Ubuntu (and Linux systems in general), so I am not sure what to do. Thank you in advance!

  • mount the ntfs partition (windows) before rerunning update-grub and post back – Νίκος Φυτίλης Mar 15 '15 at 15:20
  • I am sorry, but i am not really sure how to do this... Can you give me the command? – Jacob Fjerbæk Olsen Mar 15 '15 at 15:22
  • just go to your file manager and click on the partition (like you would if you wanted to access a file from windows) alternatively 'sudo mkdir /mnt/temp && sudo mount /dev/sda2 /mnt/temp' – Νίκος Φυτίλης Mar 15 '15 at 15:37
  • I have run the commands but see no changes during boot whatsoever? – Jacob Fjerbæk Olsen Mar 15 '15 at 15:46
  • 1
    Default Windows install in BIOS mode on MBR(msdos) drive is a hidden 100MB boot partition and the main install. You deleted the boot partition for Windows, so grub cannot find its boot files. But you do not have to have the separate Boot partition. Use gparted to move boot flag to the NTFS partition or Windows will not find it to repair and run the full set of repairs to install the boot files into the main install. If you use the auto fix in Windows you have to run it 3 times. Or use manual commands. It will reinstall Windows boot loader, so you will have to fix grub. – oldfred Mar 15 '15 at 16:30
1

So it depends on what order you installed everything, you might be able to repair, you might have to start over. I'll share some of my thoughts and if you can provide more details on how you set things up we can narrow down a solution for you.

The generally recommended sequence of installation is to prepare your partitions, install windows, then install linux so when grub2 configures it will find the windows bootloader and add to the grub menu. On machine's that come with WIndows preinstalled, you can shrink your windows partition using the Windows Disk Management utility from the Adminiistrative Tools section in the Control Panel, or you can just fire up a live linux disk/usb stick and use GParted as well.

If you install Windows second it likes to be the only OS on your system so will automatically bulldoze whatever grub files you had in the MBR. So in your case I hope you upgraded to windows 8.1 first.

As far as finding an existing windows bootloader and adding to your grub menu you could try using os-prober which will do exactly what it sounds, probe your system for installed OSes and adds them to your bootloader.

It's always encouraged to read up on the documentation for your relevant problem. The Arch Linux Wiki is fantastically thorough and kept well up-to-date, the Grub section is here and another good resource is Dedoimedo's Grub Tutorial.

If your computer is a bit older then you likely should be installing the grub2 bootloader into partition containing the Windows MBR which is usually /dev/sda.

If your computer is bit newer and has an efi boot partition then you can install one of the more recent Ubuntu builds like 14.04 and install your grub2 bootloader into the efi partition. This may vary by device depending on how your manufacturer set up the partition scheme. You should be able to see which partition is labeler "efi" using something like the GParted partition manager.

Newer Ubuntu-based distros seem to work well on efi machines. I've had good luck with stock Ubuntu 12.04+, Linux Mint 16+ and Ubuntu-Gnome 12.04+.

Another thing you can check is your machine's boot order in the EFI/BIOS settings. My EFI settings show both ubuntu and windows and I can adjust the priority of which will boot first. If you can see the Windwos bootloader in your EFI/BIOS menu then you might just need to use the os-prober to add Windows to your grub, which would be the simplest solution.

Let us know how you fare.

  • I might have come closer to a solution... By adding "menuentry "Windows 8.1" { set root=(hd0,2) chainloader +1 }" To 40_custom i get a windows entry. If i try to boot windows up, it says "BOOTMGR is missing". Any way to "reinstall" bootmgr on that partition or something like that? Or should i change the text? – Jacob Fjerbæk Olsen Mar 15 '15 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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