Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 36443  / 2 Years ago, tue, july 26, 2022, 2:39:51

After deleting old Linux partitions in order to free space on hard disk, I got an error from GRUB:




error: no such partition




And then I saw a grub rescue> prompt. After googling around I found that in order to boot normally I have to type the following commands.



set prefix=(hd0,msdos5)/boot/grub
set root=(hd0,msdos5)
insmod /boot/grub/linux.mod
linux /vmlinuz root=/dev/sda5 ro
initrd /initrd.img
boot


Here is the boot info summary report created by Boot-Repair.



However, on each reboot I have to type this again. How can I tell to GRUB once and all what configuration file to use?


More From » grub2

 Answers
0

Try these commands



sudo update-grub
sudo grub-install /dev/sda


If you want a graphical option, try boot-repair



sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair


enter image description here


[#41297] Tuesday, July 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kroapathe

Total Points: 445
Total Questions: 117
Total Answers: 99

Location: Botswana
Member since Sun, Sep 19, 2021
3 Years ago
;