Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

grub problem: wrong default os (solved)

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

grub problem: wrong default os (solved)

#1 Post by peer »

Dual boot laptop (32):
sda1: debian 10 with RT kernel
sda3: debian 10

After upgrading sda3 from debian 9 to 10 sda3 is the default os in grub.
sda3 is the first option in the grub menu
I performed "sudo update-grub" in sda1 to change the default os to sda1 but that did not work.
Then I did a new "sudo grub-install /dev/sda" in sda1.
Now the first option is the sda1 os but the highlighted os is still sda3.

In the file /etc/default/grub I only changed the time, nothing else:
GRUB_DEFAULT=0
GRUB_TIMEOUT=2

How can I make the os on sda1 the default option?????
Last edited by peer on 2019-08-04 04:42, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: grub problem: wrong default os

#2 Post by Head_on_a_Stick »

To change the default in GRUB edit the GRUB_DEFAULT option in /etc/default/grub from whichever operating system the grub-install command was last run and use the update-grub command to update the configuration file.

https://www.gnu.org/software/grub/manua ... figuration

Why do you have two separate Debian systems? It is possible to have two different kernels installed in the same system and use GRUB to choose between them.
deadbang

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: grub problem: wrong default os

#3 Post by peer »

I tried several times to install and update grub. I do not know what went wrong. Now I solved the problem by editing /boot/grib/grub.cfg directly. There I found the line DEFAULT=2 which should be DEFAULT=0. Now it is working OK..

I use this laptop mainly as guitar effects processor (guitarix). Therefore I installed a RT-kernel and optimized the os for audio. It is a minimal os without wifi and few services as possible. The laptop is very old, at least 10 years. It works ok for my guitar but only when I stripped all unnecessary software and services.
A few weeks ago I installed a second os with the purpose to use the laptop as a wifi accesspoint (create_ap).
I could do this with just one os but in this case I prefer two.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: grub problem: wrong default os (solved)

#4 Post by Dai_trying »

You problem is not solved, but temporarily bypassed, the next time you update grub it will come back, please note the beginning of /boot/grub/grub.cfg ;-
/boot/grub/grub.cfg wrote:#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
Refer to HOAS's advice in his previous post to actually solve this issue.

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: grub problem: wrong default os (solved)

#5 Post by peer »

I think I created the problem myself (don't know how)
changing the default os and update-grub works ok (tested this)

Post Reply