POP OS! Grub

Ram08

New Member
Joined
May 31, 2022
Messages
1
Reaction score
0
Credits
11
I have been using PopOS! for more than 6 months. But this problem never came with me .Please help
16540085761709027695531302595791.jpg
 


what you need to do is to reinstall grub.

Boot in to the live Linux USB.
You need to find out if your system uses EFI or BIOS. To do that, open the terminal and use the following command to list your partitions:
Code:
sudo fdisk -l
Mount the root partition first. I am using /dev/sda2 for root but you should change this with what you have on your system:
Code:
sudo mount /dev/sda2 /mnt
If you have EFI system, mount that partition as well:
Code:
sudo mount /dev/sda1 /mnt/boot/efi
Now, the next step is to finally install grub for UEFI system like this:
Code:
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu  --target=x86_64-efi --efi-directory=/mnt/boot/efi
Restart PopOS using this command:
Code:
shutdown -r now
_______________________________________________________________

Installing grub on non-EFI system is even easier.
Mount the root partition of Linux:
Code:
sudo mount /dev/sda1 /mnt
And then install grub:
Code:
sudo grub-install /dev/sda
Reboot and it should be fine.
 
Regrets 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 ).

Reboot and it should be fine.

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
 
Only then did I have a fully operational Grub and Grub Menu.

My bad, there was one more step to make it fully operational.

Pop!_OS for an unknown reason disables the Recovery option in the Advanced Options submenu.

To fix that, you must also add to (/etc/default/grub), save and run update-grub, following adding the line

Code:
GRUB_DISABLE_RECOVERY=false

I added mine below the os-prober line.

Wiz
 
Regrets 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
If you "Using Just" then
Code:
sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu  --target=x86_64-efi --efi-directory=/mnt/boot/efi
you will get an error without mounting the efi partition first - of course this is assuming the partition is actually there and not been deleted or installed
 
No, your lordship, you're not following me, or I was not clear enough :)

When I said
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

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
 
No, 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
Ok gotcha :cool:
 
It may be all academic, now, anyway.

My Pop!_OS was an 18.04 that I had upgraded internally to 20.04 and during that transitional time with point releases, it appears they had replaced Grub with systemd.boot.

It was the systemd.boot version which I was working on with my above input, and converted it to Grub.

I have since installed and got running VirtualBox on a Voyager (French product) and installed as a Guest Pop!_OS 22.04, and it is grub-based.

Pop's website does not allow for the download of 20.04 anymore (just another nail in their coffin, for me) so I may never have the full details.

Oh well, onwards and upwards - at least I got the practice with VBox again.

Cheers

Wizard
 

Staff online

Members online


Top