Author Topic: uefi on a HP laptop  (Read 1934 times)

arjepsen

  • Newbie
  • *
  • Posts: 1
    • View Profile
uefi on a HP laptop
« on: May 26, 2017, 08:10:16 PM »
Hey.
After a couple of days of fiddling, I just wanted to share how I managed to get UEFI booting to work.
First off, I got wifi going, so apt works.

Installed the iso on a usb key, booted, and ran the installation.
At the end I get an error from grub trying to install.
Here's what ended up fixing it:

I think there was some efi - grub stuff missing from the live environtment, so I installed that:
apt install --reinstall grub-efi-amd64
then chrooting:
sudo mount /dev/sda2 /mnt #sda2 is the root partition
sudo mount /dev/sda1 /mnt/boot/efi #sda1 is the efi partition
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo cp /etc/resolv.conf /mnt/etc/ #makes the network available after chrooting
modprobe efivars # make sure this is loaded
sudo chroot /mnt

then I installed the grub efi stuff again on the chrooted environment:
apt install --reinstall grub-efi-amd64
grub-install
exit
umount /dev/sda1
umount /dev/sda2

Apparently there is some funkyness on my HP laptop with efi booting, so I had to move an efi file:
sudo mount -t vfat /dev/sda1 /mnt
sudo cp /mnt/EFI/ubuntu/grubx64.efi /mnt/EFI/Boot/bootx64.efi

Hope it might help others.
Regards
Anders