Installing Ubuntu on Acer Aspire 1 (A114-31-C4HH)

I picked up one of these Acer laptops for my shop to look up things online or play music while I'm working there.

However, trying to install Ubuntu 17.10 (Lubuntu technically) on that laptop freezes during the grub2 installation step for some unknown reason to me.
To make matters worse, once you have an unbootable machine, you can't get to the BIOS (or UEFI) either. I'm not entirely sure why, but I thought I bricked the machine somehow. F2 on boot wouldn't respond and would cause the machine to freeze on boot as well.

Initially I thought something was wrong with the motherboard, but after some trial and error, if you erase the disk completely, the BIOS works again? Weird I know.

I did find this which worked for me to install Ubuntu. The name of the devices are a bit different on my model, that's all.

To start installing boot into a live USB then do

> sudo -s
> ubiquity -b

Then follow the installation process till the end chosing Continue testing at the very end. During the installation I chose "Use entier disk". The laptop only has 32GB so there is no point doing anything else

After that go back to the terminal and do

> mount /dev/mmcblk0p2 /mnt
> mount /dev/mmcblk0p1 /mnt/boot/efi
> for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
> modprobe efivars #
> apt install --reinstall grub-efi-amd64
> grub-install --no-nvram --root-directory=/mnt
> chroot /mnt
> echo nameserver >> /etc/resolv.conf
> apt update
> apt install grub2-common
> update-grub
> cd /boot/efi/EFI
> cp -R ubuntu BOOT

Then reboot :)