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.

George Udosen
  • 36,677
Sladek90
  • 251

3 Answers3

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

Majal
  • 7,711
Sladek90
  • 251
  • 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? – dinnerisserved Jun 03 '17 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. – Simon M. Laube Nov 06 '18 at 06:51
  • Great answer! Worked like a charm on a stubborn Acer Aspire ES1-533-P7P6 with Kubuntu 18.04.2.Thanks a lot! – David Verdin Mar 30 '19 at 22:56
  • @dinnerisserved you can list all your drives using sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL – Sisir Nov 16 '19 at 18:43
  • list efi partition sudo fdisk -lu|grep -i efi – Sisir Nov 16 '19 at 18:43
  • This solution worked installing Ubuntu 22.04 as standalone on Acer Aspire ES1-533. Also worked with Ubuntu 18.04 but do-release-upgrade breaks the system. Both installs were done with Secure Boot disabled and using default install disk configuration. Remains to be seen if do-release-upgrade breaks Ubuntu 22.04. – kkyucon Sep 04 '22 at 15:58
  • Update: First make sure to Enable secure boot in bios. Then Erase all secure boot settings. After this Disable secure boot save and exit. Start any Ubuntu desktop install version. Then follow the above steps and before rebooting do sudo chroot /mnt then apt remove secureboot-db and apt-mark hold secureboot-db. And now apt update and apt upgrade. Now you should be able to boot into newer versions of Ubuntu desktop. – kkyucon Dec 13 '22 at 20:44
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.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • OK, finally it seems that somebody else has filed the bug before me. See [link] (https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1652090) – Sladek90 Dec 24 '16 at 20:39
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!