Skip to content

Instantly share code, notes, and snippets.

@adibenc
Created February 18, 2022 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adibenc/e0b6d9424a7bdf1a45e8c4d1b4104ce1 to your computer and use it in GitHub Desktop.
Save adibenc/e0b6d9424a7bdf1a45e8c4d1b4104ce1 to your computer and use it in GitHub Desktop.
grub efi fix

Grub efi fixes

https://askubuntu.com/questions/853497/grub-install-error-cannot-find-efi-directory

check disk

fdisk -l
Device          Start        End    Sectors   Size Type
/dev/sda1        2048    1085439    1083392   529M Windows recovery environment
/dev/sda2     1085440    1290239     204800   100M EFI System
/dev/sda3     1290240    1323007      32768    16M Microsoft reserved
/dev/sda4     1323008  252981247  251658240   120G Microsoft basic data
/dev/sda5   252981248  672411647  419430400   200G Microsoft basic data
/dev/sda6   672411648 1785749503 1113337856 530.9G Microsoft basic data
/dev/sda7  1785749504 1953520988  167771485    80G Microsoft basic data

install

sudo -i
mount /dev/sda7 /mnt
mount /dev/sda1 /mnt/boot/efi
grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu  --target=x86_64-efi --efi-directory=/mnt/boot/efi  
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment