11

I bought this computer and wanted to install Ubuntu on it. The problem is that I have been unsuccessful for more than 3 weeks. The computer comes with UEFI of very limited capabilities. It cannot be switched to legacy and there is no option select an UEFI file as trusted for execution. The only thing which can be done is to enable/disable secure boot.

Now about the problem. I tried to install Ubuntu at first in automatic mode, then also with manual partitioning in something else. In both cases the installation crashes when installing grub2 to /dev/sda and the computer hangs.

Then I decided to install without boot loader using ubiquity -b. This worked well and the installation finished without any trouble. Finally I tried to install boot loader manually using grub-install. And here I come to the same point - computer hangs.

here the grub-install freezes

So the problem is when efibootmgr tries to register the new entry in the UEFI. I also confirmed it by running this:

_sudo efibootmgr -c -d /dev/sda -p 1 -w -L ubuntu_ 

after which it again hangs.

My idea how to make it work is following:

Install Ubuntu without bootloader, install the bootloader manually without trying to register new entry to UEFI, move the bootloader from /EFI/ubuntu/ to /EFI/BOOT/ and rename it to bootx64.efi. Then I am nearly sure it will work.

Is anybody able to advise on how to:

  1. perform grub-install without trying to register new UEFI entry by efibootmgr so that it goes through and does not make the computer freeze?

  2. What files from /EFI/ubuntu/ I should copy to /EFI/BOOT and which of them should I rename to bootx64.efi?

  3. If this is not the good way to go, what would be the better solution.

Thanks for any advice.

1
  • 1
    Same problem here... just bought this thing, a couple of days ago.
    – Less
    Dec 21, 2016 at 17:48

3 Answers 3

14

The problem can be solved as follows:

  1. Boot Ubuntu Live DVD/USB in testing mode and open terminal

  2. Run installation process without installing bootloader by:

    sudo ubiquity -b
    
  3. Press Continue testing after installation is over.

  4. Mount newly installed file system on /mnt:

    sudo mount /dev/sda2 /mnt
    sudo mkdir /mnt/boot/efi
    sudo mount /dev/sda1 /mnt/boot/efi
    for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
    

(where sda2 is the root partition and sda1 is the EFI system partition)

  1. Load efivars by:

    sudo modprobe efivars
    
  2. Reinstall grub-install for a 64-bit version

    sudo apt-get install --reinstall grub-efi-amd64
    sudo grub-install --no-nvram --root-directory=/mnt
    
  3. Change root to /mnt and update grub

    sudo chroot /mnt
    update-grub
    
  4. Move and rename the installed bootloader

    cd /boot/efi/EFI
    cp -R ubuntu/* BOOT/
    cd BOOT
    cp grubx64.efi bootx64.efi
    
  5. Reboot the system.

Further details can be found here:

Acer community discussion

7
  • 2
    When I do: sudo mount /dev/sda2 /mnt sudo mkdir /mnt/boot/efi it gives me an error and says that these either are in use or not does not exist. How can I check what my equivalent of these folders is? Also when installing Ubuntu, should I choose custome partitions? How did your partitions look when you did this? Jun 3, 2017 at 21:21
  • 1
    This solution worked for me on a Lenovo L450 when installing Linux Mint 19! Just like the OP, I had no option to select a trusted UEFI file. Nov 6, 2018 at 6:51
  • Great answer! Worked like a charm on a stubborn Acer Aspire ES1-533-P7P6 with Kubuntu 18.04.2.Thanks a lot! Mar 30, 2019 at 22:56
  • @dinnerisserved you can list all your drives using sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
    – Sisir
    Nov 16, 2019 at 18:43
  • list efi partition sudo fdisk -lu|grep -i efi
    – Sisir
    Nov 16, 2019 at 18:43
5

First, I strongly recommend you file a bug report about your problems, as described here. There's no guarantee this will produce positive results, but without bug reports, developers are very unlikely to fix problems.

Second, you said you used the following command manually to try to register GRUB with the firmware:

sudo efibootmgr -c -d /dev/sda -p 1 -w -L ubuntu

That command, though, is missing an important parameter: -l {filename}. Also, I've never before seen -w as a required option, so that should probably be removed. In total, your command should instead be:

sudo efibootmgr -c -d /dev/sda -p 1 -L ubuntu -l \\EFI\\ubuntu\\grubx64.efi

Change grubx64.efi to shimx64.efi if you're certain the shimx64.efi file is installed and if you want to be able to boot with Secure Boot active. Given that the main OS installation is freezing, I'm doubtful that this change will help at all, but it's worth trying.

As to the rest, I believe the --no-nvram option to grub-install should keep it from trying to update the NVRAM variables via efibootmgr. This option is not mentioned on the man page, but I believe it's a valid option.

You may also want to consult my page on EFI boot loaders for Linux, and especially its subpage on how to install boot loaders. These will give you some background on how the "nuts and bolts" of these operations proceed. You might even want to use something other than GRUB 2 as your boot loader.

To boot using the default filename, you should copy all of /boot/efi/EFI/ubuntu to /boot/efi/EFI/BOOT and rename grubx64.efi to bootx64.efi within that directory. Alternatively, you could install something else using the fallback filename. One major caveat with this is that this may not work if the computer is already booting Windows (or some other OS). In that case, you may need to "hijack" the Windows boot loader by replacing it with GRUB 2 (or whatever you want to use) and moving the Windows boot loader elsewhere.

1
1

Linux can indeed be installed and booted on the Acer ES1-533 by hijacking the default (Windows) bootloader, as described by Sladek90 and also detailed on Rod Smith's excellent website. However, that is not necessary.

A better way is to install Linux without writing to the NVRAM, since a write by efibootmgr - which nearly all distros do - will freeze the system (only read is possible).

The solution is to use the rEFInd live system (e.g., USB stick), boot into it, open the UEFI shell, and generate the required UEFI entry with bcfg, for example:

bcfg boot add 2 fs0:\EFI\ubuntu\grubx64.efi "GRUB Loader"

This adds a boot entry for GRUB at pos. 2. When you reboot and press F12, you will have a choice to boot GRUB (and then Ubuntu) or Windows!

1
  • Could you add step by step process instead of providing rough idea?
    – Sisir
    Nov 16, 2019 at 18:29

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