grub problem: wrong default os (solved)

Kernels & Hardware, configuring network, installing services

grub problem: wrong default os (solved)

Postby peer » 2019-08-03 15:11

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.
peer
 
Posts: 79
Joined: 2017-03-26 10:14

Re: grub problem: wrong default os

Postby Head_on_a_Stick » 2019-08-03 17:08

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.
Don't break DebianHow to report bugs

SharpBang GNU/Linux® — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10695
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: grub problem: wrong default os

Postby peer » 2019-08-04 04:41

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.
peer
 
Posts: 79
Joined: 2017-03-26 10:14

Re: grub problem: wrong default os (solved)

Postby Dai_trying » 2019-08-04 06:59

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.
Dai_trying
 
Posts: 833
Joined: 2016-01-07 12:25

Re: grub problem: wrong default os (solved)

Postby peer » 2019-08-04 13:09

I think I created the problem myself (don't know how)
changing the default os and update-grub works ok (tested this)
peer
 
Posts: 79
Joined: 2017-03-26 10:14


Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable