Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1808  / 2 Years ago, fri, april 1, 2022, 6:14:32

Good evening,



I'm running the lastest ubuntu server edition (i like the: apt-get update/upgrade ; command... a lot) and i need grub to boot only the 1st Ubuntu Server Image (every time).



The grub menu displays: 2 server images and 1 memory tests and 1 extra os from a second attached hdd



These 4 can be found listed in /boot/grub/grub.cfg (i m thinking of deleting the other entries but i ve read that the .cfg file is generated automatically if i add/remove kernel)



Can i set a GRUB_SAVEDEFAULT=true command in the /etc/default/grub ? https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB2
Or does that not apply to my configuration ?



PS. I think grub pops up because i have often power losses, but i still want grub to load the ubuntu OS... since it s sole purpose is to be a server and local access is limited.


More From » boot

 Answers
1

You should never edit your /boot/grub/grub.cfg file - this is always regenerated when a new kernel is downloaded and installed.



If your Ubuntu OS is always the first in the list then the GRUB_DEFAULT=0 in /etc/default/grub is sufficient for this to be the first OS to be booted on a restart.



If your Ubuntu OS is not the first then you can set the GRUB_DEFAULT value to be equal to the menu entry value for Ubuntu OS - see the linked answer below on an example of how to find the OS value and how to add it to Grub.






Linked Question:




  1. How do I set Windows to boot as the default in the boot loader?


[#43119] Sunday, April 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nstitutencert

Total Points: 171
Total Questions: 126
Total Answers: 124

Location: Azerbaijan
Member since Fri, May 12, 2023
1 Year ago
;