How to install Ubuntu Linux on an Acer Spin 1 SP111-32N
The first thing you encounter is how to get into the BIOS. Hold down the little blue Fn key, and press F2. If you do this as soon as you press the power button, then keep pressing F2 a lot, it gets into the BIOS reliably.
In the BIOS, you don’t need to change the Secure Boot settings (yet). Just remember that you have to hold down the little blue Fn key to change the boot order with F5 and F6.
The live USB should boot up just fine. Do not select “Install ubuntu” from the GRUB menu. Let the default option start up, “Try ubuntu without installing.”
The next thing is that the screen rotation very unhelpfully gets it wrong and everything is sideways, unless you rotate the device sideways.
Hold down the Windows key and press O, after you’ve rotated the device sideways. That engages the rotation lock. (For some reason I couldn’t get the lock to engage using the little icon in the sound/battery/restart menu in the corner of the screen. But Windows + O works.)
If the device sits idle in the Ubuntu live environment, it goes to sleep. Ubuntu wakes up just fine but won’t let you log in.
Change the Display sleep setting to never go to sleep, or just keep pressing buttons / using the mouse.
If the device does go to sleep, or you get stuck anywhere, you can force a reboot with Alt + PrtSc + B. But if the mouse stops moving for up to 3 minutes, don’t panic and force that reboot. Just wait, the Live USB environment is just very, very slow to respond.
Because the Acer Insyde H2O BIOS is broken, grub-install will fail. Frustratingly, this happens after it has spent 15 minutes copying files to your hard drive. Even more frustratingly, it makes it look like it simply failed to install grub-efi-amd64-signed and shim-signed, when what really happened was:
- grub-efi-amd64-signed installed fine
- The post-install script runs grub-install
- The Acer Insyde H2O BIOS is broken, so as soon as it runs efibootmgr to create a boot entry,
- The Acer Insyde H2O BIOS tries to write to random memory
- The linux kernel catches it red-handed
- There’s a kernel panic in the logs - https://bugs.launchpad.net/kernel/+bug/1835664 or https://bugzilla.kernel.org/show_bug.cgi?id=204289
- The kernel decides to stop all BIOS EFI activity (basically an “EFI safe mode”)
- If you try to manually run grub-install or efibootmgr to diagnose the issue, you get a cryptic “Interrupted System Call” error
- If you reboot, you’re back to the same problem (if you looked in /var/log/syslog the very first time you tried it)
- The solution is: pass --no-nvram to grub-install so it doesn’t touch the EFI boot selection
- But... any time in the future that an update helpfully re-runs grub-install (like after you’ve installed) your kernel goes into “EFI safe mode” again
- You can permanently tell the system to always use --no-nvram with the debconf “grub2/update_nvram” by following the weird steps I outline below.
First do the system install without installing a bootloader.
- Just to be clear, UEFI Secure Boot is turned on in the BIOS right now.
- If you ran into trouble such as what’s described above, reset your BIOS by setting a supervisor password, choosing “Erase all Secure Boot Settings” then “Restore Secure Boot to Factory Default”, then clear the supervisor password, then go to the exit screen and choose “Load Setup Defaults.” Then Exit Saving Changes. Then press Fn+F2 to get back in the BIOS and start from there.
- Boot the Live USB “Try ubuntu without installing,” stop the screen from rotating with Windows+O, turn off display sleep
- Open a terminal by pressing the Windows key on its own, then type “terminal” then press Enter
- Start the installer from the command line, because you want to tell it to NOT install a bootloader. Type “ubiquity --no-bootloader”
- Select your language, keyboard layout, and do NOT connect to the internet (it’s not needed, and downloading updates may break grub, below)
- Select a minimal installation, do NOT install third-party drivers
- You may get a prompt “The installer has detected that the following disks have mounted partitions” - click Yes. (This should only happen if you already have a Linux install on the disk.)
- Choose “Erase disk and install Ubuntu.” Heed the warning: this is going to WIPE ALL YOUR DATA on this disk. The reason for using this is to be sure mmcblk1p1 and mmcblk1p2 are correct below.
- Leave all check-boxes unchecked on the “Erase disk” page. Just click “Install Now”
- You then get another warning, because this is going to WIPE ALL YOUR DATA on this disk. You are fully responsible for any data you lose at this point, and so click Continue when you are sure.
- Set your location, your name, username, computer name, password, and whether to log in automatically
- Wait about 20 minutes while it copies files from the USB to the device
- It pops up “Installation Complete” - VERY IMPORTANT: click “Continue Testing.” We have more work to do.
The bootloader is not yet installed. To do it, go to the terminal.
- sudo -s
- mkdir /target/media/cdrom
- mount /dev/mmcblk1p1 /target/boot/efi
- for i in /dev /dev/pts /proc /sys /run /media/cdrom; do mount -B $i /target$i; done
- chroot /target
- sed -i -e 's/^#deb cdrom/deb cdrom/' /etc/apt/sources.list
- apt-get install grub-efi-amd64-bin efibootmgr
- apt-get download grub-efi-amd64-signed # ignore the scary “permission denied” error
- dpkg --unpack grub-<press TAB>
- rm /var/lib/dpkg/info/grub-efi-amd64-signed.postinst
- dpkg --configure grub-efi-amd64-signed
- grub-install --no-nvram /dev/mmcblk1
- update-grub
- sed -i -e 's/^deb cdrom/#deb cdrom/' /etc/apt/sources.list
- exit # exit chroot
- for i in /media/cdrom /run /sys /proc /dev/pts /dev /boot/efi; do umount /target$i; done
- exit # exit sudo
- exit # exit terminal
And reboot
That fix doesn’t persist, but fortunately if grub-install tries to set the boot variables, because of some package updates, the Acer Insyde H2O BIOS fails, and... everything just keeps on working.
Although, it will complain that grub-efi-amd64-signed is broken. You’ll just need to:
- sudo rm /var/lib/dpkg/info/grub-efi-amd64-signed.postinst
- sudo apt-get install -f # fix installed packages
There are answers out there that claim if you do: echo “grub-pc grub2/update_nvram boolean false” > t.txt debconf-set-selections t.txt
The claim is it will magically pass --no-nvram to grub-install. It won’t - try dumping the contents of /var/lib/dpkg/info/grub-efi-amd64-signed.postinst before you rm it. It doesn’t care about debconf at all. It just runs grub-install. (That’s probably a bug for the debian guys, if you want to pursue it.)
Or, don’t buy a laptop with Insyde. Their BIOS is just plain full of bugs and spyware.
Manual grub installation works also for me. Ubuntu 22.04 on SP111-32N. Thank you!