Updated : Jul 22, 2019 in Uncategorized

GRUB on EUFI capable System

Introduction:
New PCs are often equipped of the UEFI(Universal EFI) capable booting. Some SSD drives will even not boot in Linux the Legacy MBR mode. So in order to make the PC boot properly we need to:
– Create an EFI Partition
– Install GRUB(Boot loader) on it

Create the EFI Partition:
Create an EFI capable Boot partition of 200MB as first Partition before installing the Debian/Ubuntu system

# gdisk /dev/(boot disk)
From inside gdisk:

  • Create an EFI Boot partition of 200MB as first Partition before installing the Debian/Ubuntu system
    gdisk /dev/(boot disk)
    • Accept to convert the MBR into a GPT partition if asked
    • create new partition of 200MB
    • set the type of partition as EF00
    • set the attribute of the partition with the ‘a’ command in expert menu and enter the number 2 (legacy BIOS bootable)
    • write the partition ‘w’ mkfs.vfat /dev/(EFI Partition)
    • exit gdisk
  • Start a Live system
  • Do full installation but the Grub Bootloader might not succeed. Jump this step and do the following to properly install the GRUB

Installing GRUB on a EFI system

Start a live system from a liveCD or an USB Drive.
From inside the live system:

  • Login as root
  • Mount the installed system on /mnt
    • Chroot to /mnt
      • # for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i;
      • # done; chroot /mnt
  • # . /root/.bashrc
  • # apt-get install grub-efi
  • # mkdir /boot/efi
  • # mount /dev/(EFI Partition) /boot/efi
  • # grub-install –target=x86_64-efi /dev/nvme0n1
  • # update-grub

Also see: https://help.ubuntu.com/community/Boot-Repair

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: