2

I try to boot my computer into Ubuntu, but I end up having to manually select Ubuntu from the devices menu, even though it was supposed to boot first. Instead Windows 8 boots up like Ubuntu isn't even there! And GRUB works just fine when Ubuntu is selected in the boot device menu. (How else am I on?) I tried using EasyBCD but kept getting errors from the Windows Boot Manager. And just in case it helps, during installation of Ubuntu it didn't recognize Windows 8, and I had to resize and install manually. Anything I can do?

Notes: EVERYONE!!! GRUB WORKS PERFECTLY!!! IT IS AN ERROR IN THE HP BOOT MENU AS I HAVE PREVIOUSLY SAID!!! PLEASE DO NOT GIVE ME ANSWERS FOR GRUB EDITS IN THE FUTURE!!!

Here are my specs:

PC type: HP 2000-2d49WM Notebook PC

RAM: 4GB

Swap: 2GB

Processor: AMD E-300 Vision 1.3 GHz x2

BIOS Edition: N\A Until further notice

No Time
  • 1,073
  • 11
  • 25
  • 1
    What do you want to happen? That Ubuntu is set to be the default OS? Can we assume you have multiple operating systems installed? Which ones? How do you normally boot? Please [edit] your question and clarify. – terdon May 10 '14 at 19:27
  • Try sudo update-grub in the terminal. – Snyper May 31 '14 at 19:33
  • Where did you set Ubuntu as the first OS to boot? Because if you have a computer with (U)EFI you might have to set the first OS to boot in the UEFI-menu. – Kai May 31 '14 at 21:46
  • 1
    I do not have Ubuntu set as the first OS to boot. It installed as third in line, then after the update to 14.04 I got was bumped up to second in line. The UEFI Support menu for hp computers needs to be installed through Windows, but the Windows 8.1 BCD is defective and my friend is letting me borrow his installation disk on Monday June 2. As far as I know the UEFI Boot configuration order can NOT be changed in my laptop. I can still access Ubuntu, that is actually what I am using right now, but the boot menu won't be changed. – Find Me In The Woods May 31 '14 at 22:29
  • Do you have Ubuntu and Windows 8 installed in different partitions or are you using Wubi? – John Scott May 31 '14 at 22:48
  • Post link to BootInfo report. You do need both installed in UEFI mode, otherwise you have to boot from UEFI menu. But HPs are not really friendly and many need work arounds. https://help.ubuntu.com/community/Boot-Repair – oldfred May 31 '14 at 22:53
  • @user280244 - this looks similar to this Q&A - can you try the answer please? http://askubuntu.com/questions/235567/windows-8-removes-grub-as-default-boot-manager – fossfreedom Jun 02 '14 at 10:47

5 Answers5

2

I've faced a similar problem with another HP notebook.

The problem is that even if you change the EFI boot order permanently (with command: "efibootmgr -0", for example), your change will be overwritten each time you boot Windows.

To workaround the problem, I had to install rEFInd manually.

Then, I've located the default EFI boot loader (.efi), backed it up and replaced it by the one from rEFInd (renamed) [don't forget to copy other folders and files pertaining to rEFInd in the same folder]. I don't remember which one was the default EFI boot loader and I can't check on the computer since it is owned by one of my customers.

WARNING : If you have to apply that tricky workaround, please ensure that you can boot on the normal installation of rEFInd via the boot menu before, so that you can easily revert the changes in case of problem or if you change your mind in the future!!!!!

rEFInd manual installation procedure is available here: http://www.rodsbooks.com/refind/installing.html#linux

For a clear example for changing EFI boot order permanently with efibootmgr (will probably not work on your computer, as stated above, however I highly recommend to try that first), please take a look at this post from Rod Smith (the creator of rEFInd).

It seems that the renaming trick is now fully documented on the official Web site of rEFInd : http://www.rodsbooks.com/refind/installing.html#naming, http://www.rodsbooks.com/refind/installing.html#manual_renaming

rEFInd is really user-friendly (once installed) and allows to workaround such poor EFI implementations.

Step by step, failsafe approach

Trying to change UEFI boot order with efibootmgr

  1. Under Ubuntu, open a terminal and install "efibootmgr", if it is not already installed, by using the following command:

    sudo apt-get install efibootmgr

  2. Retrieve EFI boot order and entries with the command:

    sudo efibootmgr -v

    Notes:

    BootCurrent: 0002 (indicates the UEFI boot entry used for booting).

    BootOrder: 0002,0003,0001,0000 (indicates the UEFI boot order defined).

    Boot000x* (represents one boot entry. It is followed by its name, HD and EFI file. All the boot entries are listed below "BootOrder").

  3. Define the new boot order with the command:

    sudo efibootmgr -o 0001,0002,0000,0003

    In the command above, I suppose that Ubuntu entry is 0001, Windows is 0002, Recovery is 0000, Diagnostics is 0003. Of course, you may have more or less entries and/or wish to setup a different order. I suggest that you copy the "BootOrder" value from the command "sudo efibootmgr -v" and adapt it as you want. Then check the result of the command.

  4. Check again the "BootOrder" with the command used at step 2.

  5. Restart your computer properly and check that the system boots the expected (first) entry of the new boot order (here, Ubuntu). If it works, restart and try to boot Windows (via UEFI menu), then restart the computer again and check that Ubuntu is still booted by default. If it works as expected, you're done! The EFI implementation is correct and you don't need to do anything more. If not, jump to the next solution.

Installing and configuring rEFInd

  1. Disable Secure Boot feature in your BIOS, if it is not already done, in order to avoid extra complications;
  2. Under Ubuntu, Download the binary ZIP file of rEFInd from this page: http://www.rodsbooks.com/refind/getting.html;
  3. Unzip the ZIP archive;
  4. Open a terminal and move to the folder where the archive files have been extracted (the command should look like: cd ~/Downloads/refind-bin-0.8.1/);
  5. Follow the steps (1 to 6) described here: http://www.rodsbooks.com/refind/installing.html#linux. Your architecture is very probably x86-64, so use rm refind_ia32.efi at step 3;
  6. Edit the configuration file (refind.conf). Simply use sudo nano ./refind.conf or sudo -i gedit ./refind.conf. I'm assuming that the current directory is still rEFInd's directory on the ESP. You will be very interested in "timeout" (value like: 1) and "default_selection" (value like: Ubuntu) parameters to configure automatic boot to Ubuntu.
  7. Restart the computer, use the UEFI boot menu for launching rEFInd and checking that its configuration fulfil your needs. If not, start Ubuntu and edit refind.conf in its directory on the ESP and repeat this step until the settings fit all your requirements. Please check that you can boot Ubuntu and Windows as well from rEFInd (longer timeout value may help).
  8. Identify which EFI file is used by default by your system and locate its folder on the ESP (It might be something like "EFI/Microsoft/Boot/bootmgfw.efi" or else). Don't forget the command sudo efibootmgr -v which can be very helpful to get this information.
  9. Copy the content of the refind folder on the ESP in the folder of the default EFI file identified at step 7 ("EFI/Microsoft/Boot/" in the example). You can even use command sudo -i nautilus if you are not very familiar with the command line. Assuming that the ESP is mounted at /boot/efi, you can use the following command : sudo cp -r /boot/efi/EFI/refind/* /boot/efi/EFI/Microsoft/Boot/. Don't forget to adapt the destination path as required.
  10. Rename default EFI file ("bootmgfw.efi" in the example) in "bootmgfw.bak" (sudo mv bootmgfw.efi bootmgfw.bak, if you are in the right folder. You can use cd /boot/efi/EFI/Microsoft/Boot/ to switch to that folder [I'm still assuming that ESP is mounted at "/boot/efi" and that the relative path to the default EFI file is "EFI/Microsoft/Boot/"]);
  11. Rename rEFInd EFI file ("refind_x64.efi") as the default EFI file (here, "bootmgfw.efi"). Use sudo mv refind_x64.efi bootmgfw.efi, if you are in the right folder.
  12. Restart your computer and if everything is OK, you're done! If something goes wrong, you can still use UEFI boot menu to launch rEFInd, boot Ubuntu and revert the changes made in steps 8 to 10.
Golboth
  • 1,404
  • can I get a step by step cause this looks pretty freakin' hard – Find Me In The Woods Jun 01 '14 at 21:52
  • @user280244: Done. Step by step, failsafe approach added. – Golboth Jun 04 '14 at 22:30
  • can you find a way to do it in ubuntu? – Find Me In The Woods Jun 04 '14 at 22:36
  • windows broke, oh wait – Find Me In The Woods Jun 04 '14 at 22:39
  • oops it is ubuntu – Find Me In The Woods Jun 04 '14 at 22:40
  • Almost all these steps should be done from Ubuntu. Do you mean not replacing default EFI file by the one for Ubuntu (no rEFInd install)? It should be possible, but making a mistake might be annoying in such a case... – Golboth Jun 04 '14 at 22:42
  • You may also try with secure boot feature enabled if Windows does not start anymore... – Golboth Jun 04 '14 at 22:48
  • stuck on step 9. How do I do that? I am a noob so plz help. – Find Me In The Woods Jun 05 '14 at 13:08
  • I've added command lines (to adapt if needed) for steps 9 and 10. – Golboth Jun 05 '14 at 17:26
  • UH OH!!! Windows deleted rEFInd's stuff from the Windows boot file! What now? – Find Me In The Woods Jul 08 '14 at 17:13
  • @user280244: I've never faced that problem before. It may be due to a reinstall, a repair (after a crash, for example) or an upgrade of Windows 8.1... In the worst case it might simply be due to an update... If I were you, I would try to re-apply steps 8/9 to 12 in order to fix the issue. Windows 8.1 should not replace the EFI file every time, but it would be interesting to identify exactly what has triggered the update/replacement of the EFI file (repair, upgrade, update or else). – Golboth Jul 09 '14 at 18:16
  • you see, I did everything again, and only to find that rEFInd's EFI was taken over by Windows. – Find Me In The Woods Jul 10 '14 at 10:16
  • @user280244: The EFI file which is used by default by your system might be replaced every time by another one located in another sub-folder. If you have another EFI menu entry which allows you to directly launch Windows 8.1, you could try to apply the procedure above to this specific EFI file. If it is copied every time, it should do the trick and solve your problem. I've had such a problem with another HP laptop, but it was like that from the beginning... Have you upgraded the BIOS or else? I'm still wondering what exactly has changed to cause this new behaviour of the system... – Golboth Jul 10 '14 at 17:08
  • IKR! I have had no BIOS updates, no HP Reco. Env. update, no nothing! – Find Me In The Woods Jul 10 '14 at 21:33
  • @user280244: Very very strange! I'm afraid that I'm not aware of any other solution if you can't locate the EFI file which is used as source of the copy for replacing the one which is taken over by "Windows"... – Golboth Jul 12 '14 at 09:40
  • so i did the other thing you posted; efibootmgr. But everytime I try to reboot, it is reverted on startup! WHAT IS GOING ON!!! – Find Me In The Woods Jul 12 '14 at 12:56
  • @user280244: Using rEFInd the way indicated above is the trick to workaround the loss of your changes in UEFI boot order made with efibootmgr. It's precisely the problem I've now faced with several HP laptops and their EFI implementation. In fact, on another HP laptop, the EFI file (rEFInd one) was replaced each time I was booting Windows. I've replaced the EFI file which was the source of the copy to solve the problem. If I remember well It was located in one HP subfolder instead of something like "EFI/Microsoft/Boot/". Please note that the name of the EFI file might also be different. – Golboth Jul 17 '14 at 19:05
  • OH! I didn't see your comment! Let me try that. – Find Me In The Woods Oct 20 '14 at 22:17
  • found the file. is it called "bootmgfw.efi.mui"? – Find Me In The Woods Oct 20 '14 at 22:20
  • I really don't remember the exact file name. I think that it was still one with .efi extension, but I'm not sure about it. Anyway, please double check file size, modification date and time and/or use any tool to compare the files in order to ensure that the file you suspect is the source of the copy... Once you've identified that source file, make a backup of it and/or rename it and then replace it by rEFInd one. This should solve your problem. – Golboth Oct 21 '14 at 19:22
1

First boot from live ubuntu cd or Live ubuntu flash drive and connect to internet. After that go to termianl by ctlr+alt+T and just use the command below,

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

This actually fix any problems with boot. If it still do not work for you just leave the error report in the add command section. You will find I have attached a link, it has screen short and clear instruction. Just go to the link if something still not clear to you. Have Fun.

Reference link: FOLLOW ME FOR FURTHER CLARIFICATION !

raz
  • 1,852
0

Sounds to me like you have done a UEFI install. Windows 8.1 is not going to quietly let you use Linux next to it. If you absolutely must use Windows Boot Manager instead of Ubuntu's UEFI option, in the case that your motherboard somehow won't accept anything other than the Windows Boot Manager option, you need to edit Windows Boot Manager inside Windows by opening command prompt with admin rights and using bcdedit like so:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

If you are using Secure Boot, you will need to use the following:

bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi

mmstick
  • 1,907
  • Now which bootmgr are we using? Windows or Ubuntu? My BCD is not functioning right now and that may affect boot, not that it has yet. – Find Me In The Woods Jun 03 '14 at 12:01
  • As stated in the answer above, this is from Windows and it modifies the boot configuration data so that the Windows UEFI entry points to Ubuntu's bootloader instead of Windows'. – mmstick Jun 03 '14 at 17:19
  • But when I boot to windows I get an error message saying "The BCD File does not have the valid information for an operating system" Would that affect anything? – Find Me In The Woods Jun 03 '14 at 17:53
  • I did it in support mode, but my only problem, the BCD is corrupted, and even though it says the operation was successful, I still can't boot right because the bcd is bad. My only option is to reset my system. That would completely erase and reset the BCD – Find Me In The Woods Jun 04 '14 at 22:27
  • Windows can rebuild the BCD if you run bootrec /rebuildbcd – mmstick Jun 05 '14 at 16:46
  • just bootrec /rebuildbcd? Nothing else? – Find Me In The Woods Jun 06 '14 at 00:17
  • Feel free to look up the documentation on Microsoft's website. That's the command. – mmstick Jun 07 '14 at 01:43
0

Sounds to me like you have done a UEFI install.

Windows 8.1 is not going to quietly let you use Linux next to it. If you absolutely must use Windows Boot Manager instead of Ubuntu's UEFI option, in the case that your motherboard somehow won't accept anything other than the Windows Boot Manager option, you need to edit Windows Boot Manager inside Windows by opening command prompt with admin rights and using bcdedit like this:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

This worked fine for me.

MadMike
  • 4,244
  • 8
  • 28
  • 50
0

Start up in ubuntu. Go to the terminal. And re-install your grub with the following command:

sudo-grub-install /dev/sda

This in the suppose that ubuntu is installed on sda (the most likely). Otherwise change this to the wright component.

Julien Chau
  • 1,184
  • @user280244, no need to yell (all uppercase). You can flag the answer. Comment it why it doesn't apply and, with enough reputation. you can vote the answer down. – MadMike Oct 24 '14 at 14:22
  • Change your Uefi to start from boot manager and follow the instructions bewlos if necessary. (you can start from boot manager or from EFI file).From the Startup Menu, you can access system information and diagnostics. While running UEFI applications use the arrow keys and the enter key to navigate to "Boot device options". – Julien Chau Oct 25 '14 at 16:06