sudo fdisk -l
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
shutdown -r now
sudo mount /dev/sda1 /mnt
sudo grub-install /dev/sda
Reboot and it should be fine.
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory
sudo apt install grub-efi
sudo apt install grub-efi grub2-common
sudo update-grub
GRUB_DISABLE_OS_PROBER=false
Only then did I have a fully operational Grub and Grub Menu.
GRUB_DISABLE_RECOVERY=false
If you "Using Just" thenRegrets that it has taken me a long time to come upon this Thread, and if the OP resolved it satisfactorily, he could let us know (@Ram08 ).
Sorry Your Lordship @Lord Boltar , but no it does not. This being the UEFI scenario.
Using just
Code:sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
results in an error
Code:grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory
By running
Code:sudo apt install grub-efi
you can get Pop to establish a /boot/grub/ folder, but it has only a Fonts folder and a rudimentary x86_64-efi folder, as well as grubenv file.
There is no grub.cfg and there is no /etc/default/grub.
What I did to remedy this was as follows
Code:sudo apt install grub-efi grub2-common sudo update-grub
That installs Grub, generating both grub.cfg and /etc/default/grub, but in so doing, it inhibits the running of os-prober, so those dual-booting or multi-booting will have to add the following line to /etc/default/grub
Code:GRUB_DISABLE_OS_PROBER=false
then save the file and update grub again.
Only then did I have a fully operational Grub and Grub Menu.
Cheers
Wizard
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
Using just
results in an errorCode:sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
sudo fdisk -l
sudo mount /dev/sdc32 /mnt
sudo mount /dev/sdc48 /mnt/boot/efi
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory
Ok gotchaNo, your lordship, you're not following me, or I was not clear enough
When I said
I meant just using your command after having completed the preliminaries you outlined of mounting root and the ESP.
And that is what occurs, the error I listed.
So, in my case, I was using Pop!_OS with its root on /dev/sdc32, the ESP was at /dev/sdc48 and my sequence was
Code:sudo fdisk -l sudo mount /dev/sdc32 /mnt sudo mount /dev/sdc48 /mnt/boot/efi sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi
and I get the error
Code:grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory
But don't worry. I'll run up a video on it using VirtualBox soon.
Avaudweegend
Wiz