Kurt Keller's Blog

tech notes and more

Fedora 38 Installation on Acer Spin 1 SP111-32N

The Acer Spin 1 SP111-32N is a nice small notebook to take along during your holiday or travel. It is light, the battery last quit long, and if it breaks or is stolen: it was not too expensive. Sure, it is not super powerful, but for occasional access from remote it is perfect.

I’m not a windows user. My OS of choice is Linux, mainly Fedora. But for several releases now, installing Fedora on the Acer Spin 1 SP11-32N left it unbootable. This is due to the UEFI BIOS. After a whole day of trial and error and internet research and further error and trial I found a way to make Fedora 38 (and hopefully also the next releases) boot on this machine. Possibly the Workaround described at Red Hat Bugzilla – Bug 2091986 helps too, but, having found that later, I have not tested it. This is how I get it to work:

  • install the OS with a LiveOS USB stick
  • an ext4 formatted partition /boot (I used 750 MB) and an efi system formatted partition /boot/efi (I used 250 MB) must be created
  • while installing the boot loader, an error pops up saying
...
Failed to set new efi boot target. This is most likely a kernel or firmware bug.
  • this error must be confirmed with Yes to ignore it and continue with installation
  • do not yet click on the final Finish Installation button and do NOT exit the LiveOS or umount the /mnt/sysmount mounts

 

The following items can all be done with the commands listed below, just cut’n’paste in a terminal

  • open a terminal in the liveOS and become root
  • chroot into the still mounted, newly installed system
  • install the grub2-efi-x64-modules
  • reinstall the installed grub2 RPM’s (yes reinstall)
  • run grub2-mkconfig, wrigint hte config to /boot/efi/EFI/fedora/grub.cfg (in the chrooted environment)
  • in the resulting file, comment out the part which sets up the menu entry for fwsetup (this is the entry which boots into the BIOS)
  • add a menu entry referencing the initrd and vmlinuz files in /boot with the kernel parameters found in the file, prepended with the (grub-)root setting also found in the file
  • now click on the Finish Installatoin button, shutdown the system, remove the LiveOS USB flashdrive and boot the machine; the newly installed system boots
sudo su -
chroot /mnt/sysroot
dnf install grub2-efi-x64-modules
dnf reinstall grub2-tools grub2-common grub2-efi-x64 grub2-efi-x64-modules grub2-tools-efi
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
sed -i "/30_uefi-firmware/,/30_uefi-firmware/ s/^/#/" /boot/efi/EFI/fedora/grub.cfg

sed "/END \/etc\/grub.d\/40_custom/,$ d" /boot/efi/EFI/fedora/grub.cfg >/tmp/snippet
grep "set=root" /boot/efi/EFI/fedora/grub.cfg >>/tmp/snippet
echo "menuentry '$(uname -r)' {" >>/tmp/snippet
echo "  linuxefi /$(cd /boot; ls vmlinuz*64) $(sed -n '/kernelopts=/ {s/^[^\"]*\"//; s/\".*//p}' /boot/efi/EFI/fedora/grub.cfg)" >>/tmp/snippet
echo "  initrdefi /$(cd /boot; ls init*img)" >>/tmp/snippet
echo "}" >>/tmp/snippet
sed -n "/END \/etc\/grub.d\/40_custom/,$ p" /boot/efi/EFI/fedora/grub.cfg >>/tmp/snippet

cat /tmp/snippet >/boot/efi/EFI/fedora/grub.cfg
Share

Leave a Reply