0

Recently I got my laptop back from warranty service because the hard disk was fried unexpectedly. It just had Windows 10.

I tried uninstalling the previous distro of Linux I was using before the catastrophe, ElementaryOS, but when I installed it in a dedicated partition the boot menu was missing. After trying many times to fix it, and asking around stackexchange with no success, I gave up and decided to try installing Ubuntu, maybe the way it installed grub worked. Nope, it didn't.

I remember choosing /dev/sda as the installation location for grub when installing Ubuntu from the Live USB, if this information helps.

So once again I tried multiple times to fix this issue to no success.

First I followed this guide but when executing this command grub-install /dev/sda I got an error message saying cannot find EFI directory.

Looking for solutions for this problem led me to this other guide but I got stuck at this point: grub-install --efi-directory=/boot/efi --target=x86_64-efi /dev/sdX because there was an error that said that such directory didn't exist and something else.

Which led me again to this question here in askubuntu. I did as instructed in the answer and everything could be executed with no errors. However, when restarting the laptop the grub menu still wouldn't show up.

Honestly I don't know what else to do. I have been looking everywhere for weeks and asking for help as well, but my problem persists.

What can I do?

dabadaba
  • 1,155
  • 2
  • 12
  • 20
  • I can guarantee you that /dev/sd7 is not what you want. /dev/sda is probably the correct. Never install GRUB to a partition, but to the disk itself. – Eduardo Cola Jan 18 '16 at 15:19
  • @EduardoCola sorry that was a typo. I didn't try installing it in /dev/sda7 but /dev/sda. The partition /dev/sd7 is a partition tagget as bood which I guess is the uefi partition, so I used it in the last guide I mentioned to create the EFI partition mount point. – dabadaba Jan 18 '16 at 15:23
  • If an Acer they seem to be one that requires a supervisory password and setting "trust" on Ubuntu/grub's efi boot files. Some earlier suggestions were to downgrade UEFI, but not required if you now have newest UEFI. Very latest UEFI/BIOS works, downgrade not required: http://ubuntuforums.org/showthread.php?t=2298380&p=13419141#post13419141 Details on password & trust setting: http://askubuntu.com/questions/597213/bootable-device-not-found-after-clean-install-of-ubuntu-14-04-uefi – oldfred Jan 23 '16 at 16:36
  • @oldfred thanks for answering. I just tried that solution and all the options were there just as it says, but I exited and saved and on reboot the computer still boots into Windows....... – dabadaba Jan 24 '16 at 14:26
  • nevermind, I got it working changing the boot order directly from the BIOS – dabadaba Jan 24 '16 at 15:18

1 Answers1

0

If Ubuntu is installed on the computer but you can't boot it because it lacks a boot loader, you must first ascertain whether it's installed to a GPT disk or an MBR disk. The former are generally used in EFI-mode boots and the latter are generally used with BIOS-mode boots, although that linkage is not nearly as strong as it is with Windows. If you've got an MBR disk but want to boot in EFI mode, or a GPT disk and want to boot in BIOS mode, you should re-assess your situation to decide what to do -- proceed with an unusual configuration, change the partition table type, or change the boot loader type.

Assuming you've got (or convert to) a GPT disk and want to install an EFI-mode boot loader, there are many options. The two easiest are:

  • GRUB/Boot Repair -- Boot the Ubuntu installer in EFI mode, install the Boot Repair program, and run it. This should set up GRUB correctly on your disk. The biggest caveat is that, although Boot Repair usually works, sometimes it doesn't, and on rare occasion it can actually make matters worse. Of course, since you're unable to boot now, the risk of it getting worse seems pretty remote.
  • rEFInd -- You can disable Secure Boot (if it's active), download the USB flash drive or CD-R version of my rEFInd boot manager, and boot from it. rEFInd should enable you to boot Ubuntu. If this works, install the PPA or Debian package version. rEFInd will then become your default boot manager, enabling you to boot without GRUB. This approach is a little more incremental -- the risk at each step is quite low, since you're either not changing the disk or you know that the program is almost certain to work when you make on-disk changes.

If you continue to have problems, or if you don't have a GPT/EFI setup, you should post back with details. The URL provided by Boot Repair will show us details about your system, which may be necessary to give a better answer. Alternatively, you can run Boot Info Script, post the RESULTS.txt file that it generates to a pastebin site, and post the URL to your document here.


EDIT:

Your symptoms are consistent with a buggy firmware; some manufacturers are known to release computers with buggy EFIs that "forget" or ignore their boot entries. Your question, though, implies that this all worked fine with your Elementary OS installation. That, in turn, suggests that the firmware's NVRAM entries are damaged in some way, thus preventing new entries from being recorded. This is also a bug, but it might be overcome.

One thing to try is entering your firmware's setup utility and selecting the option to reset all the settings to their default values. Unfortunately, I can't tell you exactly where that option is, since it varies from one firmware to another. (It's even possible that yours won't have such an option.) When this is done, you can try running Boot Repair again or install rEFInd as described above, and with any luck the repair will succeed.

Another thing you might try is the EasyUEFI program in Windows. You can use this to re-order existing entries, delete existing entries, and create new entries. You should be able to create an entry for Ubuntu (\EFI\ubuntu\shimx64.efi -- note the use of Windows-and-EFI-style backslashes as directory separators) and test it. You could also use EasyUEFI to clear out any extra or redundant entries -- but the efibootmgr output in your Boot Repair run makes it look like there's nothing suspicious or redundant to be cleared out. Still, checking with another tool (that is, EasyUEFI) may be worthwhile.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • I tried Boot Repair previously to no succeed. Here is the pastebin http://paste.ubuntu.com/14607219/ The post execution of the repair tool suggest to change the boot order in case the computer boots directly into Windows, but I can't do that from my BIOS, and from my Windows either. Ubuntu is not present in the list where you're supposed to be able to choose which OS you want to boot. And I ran the suggested command which did nothing: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi – dabadaba Jan 23 '16 at 12:10
  • Please see my edit, above. – Rod Smith Jan 23 '16 at 15:11
  • I have tried this http://askubuntu.com/questions/597213/bootable-device-not-found-after-clean-install-of-ubuntu-14-04-uefi and then changed the boot order with EasyUEFI and it keeps booting directly into Windows. I am starting to get really pissed off with Acer. Checking EasyUEFI again I can see the list order is unchanged, like the saves weren't made (well there isn't an actual option to save changes, but I've read they're made instantly as you perform the order change) – dabadaba Jan 24 '16 at 14:39
  • Hold on, I finally did it! I followed what the previous link I copied said and I guess that created a boot option, and then from BIOS as well change the priority of that option ontop of Windows bootloader. However I am getting a ton of options in GRUB and I'd like to get rid of the useless one. Here's the list, maybe you can shed some light on which ones are irrelevant: (next comment) – dabadaba Jan 24 '16 at 15:21
  • Advanced options for Ubuntu, Windows UEFI bootmgfw.efi, Windows Boot UEFI loader, EFI/ubuntu/MokManager.efi, EFI/OEM/Boot/bootmgfw.efi, Windows Boot Manager (on /dev/sda2), System setup – dabadaba Jan 24 '16 at 15:22
  • Yes I installed it. But I don't know what options are redundant or not. Which ones could I get rid of? In my computer I just want Windows 10 and Ubuntu. – dabadaba Jan 24 '16 at 22:42