Another EFI Boot to Grub trauma - isn't it time this was (a) sorted and (b) work Aspire E5-523

nick_theboatman
nick_theboatman Member Posts: 5

Tinkerer

edited May 2022 in Aspire Laptops
Hello

I'm rebuilding an Aspire E5-523 with a SSD and Ubuntu 20.04 or 22.04 and I note that this is a good way of re-purposing older laptops which is environmentally sound. I have now wasted over 3 days on this job...

There appears to be no shortage of complaints about flaky EFI booting to a grub bootloader yet the issue remains unresolved and undocumented (by way of a cogent application note). Judging by the level of spoken unhappiness I think it is time that Acer looked to sorting this one out. Comments such as "Acer only supports Windows" don't wash because the Linux community is so large and it is apparent that this is a Linux-OS-independent problem. 

In this instance I was trying to install Ubuntu 20.04 which loads but never boots (with the standard "no bootable media installed" mssage). I naievely thought that trying Ubuntu 22.04 might fix that but no.

Please can we have:
1 A schedule of what the BIOS is expecting to see on the first (efi) boot volume 
2.A cheatsheet on how to make this happen for a variety of distros (minimum Ubuntu) specifically to bodge the existing files on the live boot memory stick and first permanent volume efi boot partition; 
3. Fully laid out instructions; and
4. Acer to fix the flaky BIOS's

Thanks.
(Thread was edited to add model name to the title)

Best Answer

  • nick_theboatman
    nick_theboatman Member Posts: 5

    Tinkerer

    Answer ✓
    Ok I think I now have a combination of steps that works reliably.
    The changes appeared to affect the "trusted file" list - unless /HDDO/EFI/ubuntu/grubx64.efi is the _only_ efi file entry (as opposed to other devices) boot fails.
    I also noticed that references to shimx64.efi gave the "shim_lock protocol not found" error.
    I also noticed that in the process of manipulating the trusted file list these started appearing in the Boot tab options list (at the bottom) but were volatile and gone again at next boot.
    I also noticed that it is not possible (in the BIOS) to see what is in the trusted file list, only add to it. If you try to add a file and it is already there a window pops up saying "file exists". There is a linux utility called efibootmgr that allows you to look at what you have once the system is up.
    Final point: touchpad doesn't work in Ubuntu (prob a kernel problem) in "advanced" mode: Under Main tab set Topuchpad to "Basic".

    My script (v3) now reads:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    FIXING ACER EFI BOOT PROBLEM v.3

    (1) Make a bootable GPT/FAT32(default) USB stick from the current linux installation iso using dd (with care) - others reviewed here (2019 version) https://techwiser.com/rufus-alternative

    (2) From cold, press and hold F2, press power and ensure that the machine boots into the BIOS

    Set these:
    Security tab: Erase all secure boot settings
    Main tab; Touch pad - select "basic"
    Save & Exit tab: Save BIOS settings & exit

    As the system comes up press and hold power to make the system power down; power up again, holding down F2.

    Set these:
    # Setting this password provides access to switching off Secure Boot
    # It appears that once set it cannot be cleared again
    Security tab: Set BIOS supervisor password (and don't forget it)
    Boot tab: disable Secure Boot
    Main tab: enable F12 boot mgr
    Save & Exit tab: Save BIOS settings & exit

    May not be needed with some Linux installations like Mint
    Definitely needed with Ubuntu

    As the system comes up press and hold power to make the system power down.

    (3) Insert bootable Linux stick (Step 1)

    (4) Press power and immediately repeatedly tap F12.
    A list of run options will appear. One of these will be "Linpus" or similar.
    Select that one (may be the only one)
    The live boot distro should then boot.

    (5) (For Ubuntu) an install screen appears offering "live boot" or "Install"
    Select "Install"

    (6) Follow on-screen instructions

    (7) Let Linux automatically set & resize partitions for Linux & its swap. 
    Adjust for more or less space only if absolutely necessary.

    (8) Shut down; upon shutdown you will be asked to remove the memory stick and hit enter.
    Remove the memory stick (Step 3)

    (9) From cold, press and hold F2, press power and ensure that the machine boots into the BIOS

    (10) Do these:
    Security tab: Select UEFI file as trusted
    Select (as appropriate) HDD0, SSD0 or eMMC0; then 
    <EFI>; then
    <ubuntu>; then 
    grubx64.efi
    A window pops up with a field to fill in labelled "comment";
    If this is empty enter in the space provided: grubx64
    select "yes"
    Boot tab: enable secure boot
    Save & Exit tab: Save BIOS setting and exit.

    As the system comes up press and hold power to make the system power down.

    (11) Reboot the machine and it should boot directly into a new installation of your distro.

Answers

  • JackE
    JackE ACE Posts: 44,478 Trailblazer


    ( 1) Make bootable GPT/FAT32(default) stick from the Linux installation iso with Rufus.
    ( 2) Set BIOS supervisor password(SECURITY), disable secure boot(BOOT)& enable F12  boot mgr (MAIN). Save BIOS settings & exit. May not be needed with some Linux installations like Mint.
    ( 3) Shutdown & insert bootable Linux stick
    ( 4) Turn back on while immediately tapping F12. Select Linux stick to run.
    ( 5) Preferrably select a default Linux install option
    ( 6) Follow on-screen instructions to install alone or alongside Windows if desired
    ( 7) Let Linux automatically set & resize partitions for Linux & its swap. Adjust for more or less space only if absolutely necessary.
    ( 8) Shutdown & remove Linux stick.
    ( 9) Turn back on while tapping F2.
    (10) Re-enable secure boot(BOOT) & select UEFI file as trusted(MAIN). Select HDD0, SSD0 or eMMC0, then <EFI>, then <ubuntu>, then grubx64.efi the UEFI file. Enter grubx64.efi in the space provided if selecting it doesn't automatically enter it. Save BIOS setting and exit.
    (11) Then shutdown again.




    Jack E/NJ

  • nick_theboatman
    nick_theboatman Member Posts: 5

    Tinkerer

    Thanks but er no....

    For this rant please assume that a SSD is already in (/dev/sda1 (the EFI partition) and /dev/sda2 (the main thing)) and that I am trying to install Ubuntu 22.04. The live boot USB memory stick appears as /dev/sdb1 and /dev/sdb4. sbd2 and sbd3 I don't know what they are.

    Comments as follows:

    >( 1) Make bootable GPT/FAT32(default) stick from the 
    > Linux installation iso with Rufus.

    Not with Linux you won't...

    I use this (assuming using a distro iso file):

    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # WRITES ISO TO A MEMORY STICK
    # Assumes running as root 
    # This version for Ubuntu 64 bit DVD ISO
    # *****
    # ***** CHECK WHICH OF SDB OR SDC IS AVAILABLE !!!
    # ***** Write to /dev/sda: you wipe your system :/
    # *****
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # To 32G CF card in USB-connected adaptor:
    # Write time @ 2.6 MByte/sec = 17m 47s 
    # Verify time @ 9.4 MByte/sec (read) = 5m 0s
    # Verify time (compare) = 4m 50s
    # Total time == 28 mins
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # Get the distro... put into somewhere useful like ~/Apps/Linux-distros/Ubuntu/v22.04

    cd ~/Apps/Linux-distros/Ubuntu/v22.04
    dd if=ubuntu-22.04-desktop-amd64.iso of=/dev/sdc status=progress

    # verify
    dd if=/dev/sdc of=test.iso status=progress
    truncate --reference ubuntu-22.04-desktop-amd64.iso test.iso
    cmp -b -l  test.iso ubuntu-22.04-desktop-amd64.iso
    sync

    # {end of shell script}

    One day someone will turn this into a working resilient bit of shell script.
    Other iso file writers are available.

    Building a live boot USB stick using the Application Menu / Preferences / Startup Disk Creator 
    gives a startup disk that hangs the system. The disk image contains a partition (assume to be mounted as /dev/sdb1) 
    that contains a directory EFI which contains /EFI/boot/ bootx64.efi, grubx64.efi and mmx64.efi
    The live boot stick built from the distro iso file also contains an EFI partition and this also contains 
    /EFI/boot/bootx64.efi
    /EFI/boot/grubx64.efi
    and
    /EFI/boot/mmx64.efi
    but I also remember the need for a grub.cfg file...

    > ( 2) Set BIOS supervisor password(SECURITY), 
    > disable secure boot(BOOT)
    > enable F12 boot mgr (MAIN)
    > Save BIOS settings & exit. 
    > May not be needed with some Linux installations like Mint

    ok 

    > ( 3) Shutdown & insert bootable Linux stick

    ok

    > ( 4) Turn back on while immediately tapping F12. Select Linux stick to run.

    ok

    > ( 5) Preferrably select a default Linux install option

    ok

    ( 6) Follow on-screen instructions to install alone or alongside Windows if desired

    ok 

    ( 7) Let Linux automatically set & resize partitions for Linux & its swap. 
    Adjust for more or less space only if absolutely necessary.

    ok - I did this again in case something weird had happened during the previous install

    ( 8) Shutdown & remove Linux stick.

    ok

    ( 9) Turn back on while tapping F2.

    ok 

    (10) Re-enable secure boot(BOOT) & select UEFI file as trusted(MAIN)
    Select HDD0, SSD0 or eMMC0, then <EFI>, then <ubuntu>, then grubx64.efi (the UEFI file)
    Enter grubx64.efi in the space provided if selecting it doesn't automatically enter it. 
    Save BIOS setting and exit.

    ok

    (11) Then shutdown again.

    ... and when you reboot, it wont find an EFI boot image to load grub.

    HOWEVER if I switch off secure boot again (who invented EFI anyway - by the way the spec is something like 1200 pages long..) the system boots. I can't say at the moment if this is because EFI is coming up anyway (and therefore there is a problem with what happens when the secure boot switch is on) or the BIOS is going straight to the second partition and booting off /boot/grub found there - which to me sounds a little far fetched as the BIOS is ignorant of the OS and grub is linux-specific.
    There still seems to be a prioblem with Secure Boot. I got an error that says "shim_lock protocol not found..." until I switched off Secure Boot.
    This led me to an Arclinux thread talking about grub (when used with a shim) failing on Secure Boot. The thread was fractious.

    So not out of the woods yet but the machine is up albeit with Secure Boot in essence disabled. Whatever.

    There were also some typos in this script ^^^ so I have re-written it below: this is not complete because it also has the EFI boot problem not resolved (but there is a work-around).

    ~~~~

    FIXING ACER EFI BOOT PROBLEM v.2 
    (NOTE This version is still incomplete, will not boot, but there is an interim work-around that allows booting)

    (1) Make a bootable GPT/FAT32(default) USB stick from the current Linux installation iso using dd (with care)
    Other tools reviewed here (2019 version) https://techwiser.com/rufus-alternative

    (2) From cold, press and hold F2, press power and ensure that the machine boots into the BIOS

    Set these:
    # Setting this password provides access to switching off Secure Boot
    Security tab: Set BIOS supervisor password (and don't forget it)
    Boot tab: disable Secure Boot
    Main tab: enable F12 boot mgr
    Save & Exit tab: Save BIOS settings & exit

    May not be needed with some Linux installations like Mint
    Definitely needed with Ubuntu

    Machine will commence reboot. Press and hold power for 10 seconds to make it shut down.

    (3) Insert bootable Linux stick (Step 1)

    (4) Press power and immediately repeatedly tap F12.
    A list of run options will appear. One of these will be "Linpus" or similar.
    Select that one (may be the only one)
    The live boot distro should then boot.

    (5) An install screen appears offering "live boot" or "Install"
    Select "Install"

    (6) Follow on-screen instructions

    (7) Let Linux automatically set & resize partitions for Linux & its swap. 
    Adjust for more or less space only if absolutely necessary.

    (8) Shut down; upon shutdown you will be asked to remove the memory stick and hit enter.
    Remove the memory stick (Step 3)

    (9) From cold, press and hold F2, press power and ensure that the machine boots into the BIOS

    (10) Set these:

    Security tab: Select UEFI file as trusted
    Select (as appropriate) HDD0, SSD0 or eMMC0; then 
    <EFI>; then
    <ubuntu>; then 
    grubx64.efi
    A window pops up with a field to fill in labelled "comment";
    If this is empty enter in the space provided: grubx64.efi

    # (this bit incomplete)
    # Don't do this:
    # Boot tab: enable secure boot

    # I did this but I don't know if it is necessary
    Security tab: Clear BIOS supervisor password

    Save & Exit tab: Save BIOS setting and exit.

    Machine will commence reboot. Press and hold power for 10 seconds to make it shut down.

    (11) Reboot the machine and it should boot directly into a new installation of your distro.

  • JackE
    JackE ACE Posts: 44,478 Trailblazer
    >>>Not with Linux you won't...>>>The live boot USB memory stick appears as /dev/sdb1 and /dev/sdb4. sbd2 and sbd3 I don't know what they are.>>>

    If you don't have access to a Windows machine,  then remake the stick with DD in terminal cuz I don't know how you made it

    sudo dd if=ubuntu2204.iso of=/dev/sdb bs=4M


    Jack E/NJ

  • nick_theboatman
    nick_theboatman Member Posts: 5

    Tinkerer

    @JackE/NI > If you don't have access to a Windows machine, ...I'd rather not :/ > then remake the stick with DD in terminal cuz I don't know how you made it I put that in my write up... (see top of my post) > sudo dd if=ubuntu2204.iso of=/dev/sdb bs=4M That's what I proposed - and others. Yours might work... but you don't need the block size. The main thing is that to use dd is dangerous so should carry health warnings ! Any ideas with the EFI / grub / shim / Secure Boot failure element?
  • JackE
    JackE ACE Posts: 44,478 Trailblazer
    >>>(10) Re-enable secure boot(BOOT) & select UEFI file as trusted(MAIN)
    Select HDD0, SSD0 or eMMC0, then <EFI>, then <ubuntu>, then grubx64.efi (the UEFI file)
    Enter grubx64.efi in the space provided if selecting it doesn't automatically enter it. 
    Save BIOS setting and exit.>>>


    Enable BIOS secure boot. Then go back to the Security tab to double-check that the BIOS knows where to look for efi file. As for the grub config file, I've never had to tweak it in any of my Mint19 or 20 installations.

    Jack E/NJ

  • nick_theboatman
    nick_theboatman Member Posts: 5

    Tinkerer

    Answer ✓
    Ok I think I now have a combination of steps that works reliably.
    The changes appeared to affect the "trusted file" list - unless /HDDO/EFI/ubuntu/grubx64.efi is the _only_ efi file entry (as opposed to other devices) boot fails.
    I also noticed that references to shimx64.efi gave the "shim_lock protocol not found" error.
    I also noticed that in the process of manipulating the trusted file list these started appearing in the Boot tab options list (at the bottom) but were volatile and gone again at next boot.
    I also noticed that it is not possible (in the BIOS) to see what is in the trusted file list, only add to it. If you try to add a file and it is already there a window pops up saying "file exists". There is a linux utility called efibootmgr that allows you to look at what you have once the system is up.
    Final point: touchpad doesn't work in Ubuntu (prob a kernel problem) in "advanced" mode: Under Main tab set Topuchpad to "Basic".

    My script (v3) now reads:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    FIXING ACER EFI BOOT PROBLEM v.3

    (1) Make a bootable GPT/FAT32(default) USB stick from the current linux installation iso using dd (with care) - others reviewed here (2019 version) https://techwiser.com/rufus-alternative

    (2) From cold, press and hold F2, press power and ensure that the machine boots into the BIOS

    Set these:
    Security tab: Erase all secure boot settings
    Main tab; Touch pad - select "basic"
    Save & Exit tab: Save BIOS settings & exit

    As the system comes up press and hold power to make the system power down; power up again, holding down F2.

    Set these:
    # Setting this password provides access to switching off Secure Boot
    # It appears that once set it cannot be cleared again
    Security tab: Set BIOS supervisor password (and don't forget it)
    Boot tab: disable Secure Boot
    Main tab: enable F12 boot mgr
    Save & Exit tab: Save BIOS settings & exit

    May not be needed with some Linux installations like Mint
    Definitely needed with Ubuntu

    As the system comes up press and hold power to make the system power down.

    (3) Insert bootable Linux stick (Step 1)

    (4) Press power and immediately repeatedly tap F12.
    A list of run options will appear. One of these will be "Linpus" or similar.
    Select that one (may be the only one)
    The live boot distro should then boot.

    (5) (For Ubuntu) an install screen appears offering "live boot" or "Install"
    Select "Install"

    (6) Follow on-screen instructions

    (7) Let Linux automatically set & resize partitions for Linux & its swap. 
    Adjust for more or less space only if absolutely necessary.

    (8) Shut down; upon shutdown you will be asked to remove the memory stick and hit enter.
    Remove the memory stick (Step 3)

    (9) From cold, press and hold F2, press power and ensure that the machine boots into the BIOS

    (10) Do these:
    Security tab: Select UEFI file as trusted
    Select (as appropriate) HDD0, SSD0 or eMMC0; then 
    <EFI>; then
    <ubuntu>; then 
    grubx64.efi
    A window pops up with a field to fill in labelled "comment";
    If this is empty enter in the space provided: grubx64
    select "yes"
    Boot tab: enable secure boot
    Save & Exit tab: Save BIOS setting and exit.

    As the system comes up press and hold power to make the system power down.

    (11) Reboot the machine and it should boot directly into a new installation of your distro.

  • JackE
    JackE ACE Posts: 44,478 Trailblazer
    Congrats. Thanks for reporting back.

    Jack E/NJ

  • nick_theboatman
    nick_theboatman Member Posts: 5

    Tinkerer

    edited May 2022
    Just a final thought. When I say that grubx64.efi should be the _only_ trusted file what I mean is the _only_ trusted _Linux_ file, in that also having references to shimx64.efi and other shrapnel gets rejected. How one does dual-boot is another matter (and as I'm not going near Windows I have no expertise here) but I see no reason why also having the windows bootloader might not hurt. So just for the avoidance of doubt this is a script for single boot to Linux (and in my case Ubuntu).
  • JackE
    JackE ACE Posts: 44,478 Trailblazer
    edited May 2022
    If nothing else, dual boot sometimes comes in handy when a firmware update is required. It's less risky doing it inside the Windows environment,

    Jack E/NJ