Grub2 configuration

Issues related to applications and software problems and general support
Post Reply
kaengo
Posts: 20
Joined: 2017/04/24 16:32:51
Contact:

Grub2 configuration

Post by kaengo » 2019/10/10 11:22:31

Hello,

I installed the new Centos Elrepo Kernel and it is not running.
OK, there is one kernel running very fine:
(uname -r
4.18.0-80.7.1.el8_0.x86_64, I'm not sure, where it comes from, elrepo ore my centos 8-iso ...)

Now I want, that the last used kernel is used for booting at grub.
Of cause, there are many entries at the web, how to do:
I modified /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto resume=UUID=f5cf06ca-0419-4df0-b0fd-699801b1eb60"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_SAVEDEFAULT=true


After that I did
grub2-mkconfig -o /boot/grub/grub.cfg



BUT THIS WAY IS NOT WORKING.
Grub2 still boots the wrong kernel ......

Does anyone know the solution ??

Greetings,
Holger
kaengo
engineer, germany
Centos 7 (hopefully at next time ...)

nouvo09
Posts: 101
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Grub2 configuration

Post by nouvo09 » 2019/10/10 13:34:47

BUT THIS WAY IS NOT WORKING.
You don't need to write in caps. Nobody's blind!

change GRUB_SAVEDEFAULT= to false
and set
GRUB_DEFAULT=0
Member of centos-FR forum

kaengo
Posts: 20
Joined: 2017/04/24 16:32:51
Contact:

Re: Grub2 configuration

Post by kaengo » 2019/10/10 14:10:35

OK,
I only want to ensure, that nobody copies my wrong way ......;-)

I want, that grub always chooses that kernel, which I have run at the session before ....
That is not the first entry of the menu (first entry is the elrepo-kernel, which doesn't work).

If a new kernel comes via an update, I want to choose this kernel one times,
after that, it should start automatically at the next session.
(resp. if the kernel is not running, I want to choose the old kernel, and use it automatically until the next update .....)

At this time, grub tries to boot the first menu entry,
if I don't switch by hand.

Greetings,
Holger
kaengo
engineer, germany
Centos 7 (hopefully at next time ...)

nouvo09
Posts: 101
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Grub2 configuration

Post by nouvo09 » 2019/10/10 16:23:20

If you are not satisfied by the el-repo kernel why don't you just uninstall it ?

And then the first kernel to boot will be the more recent one. Tjat is not what you want ?
Member of centos-FR forum

kaengo
Posts: 20
Joined: 2017/04/24 16:32:51
Contact:

Re: Grub2 configuration

Post by kaengo » 2019/10/10 17:37:43

Of cause, you are right.
But I thought, it would be lesser effort, to manipulate grub ....
In particular, all other tasks while installation ran very well,
I installed now several days (I am using some critical hardware and software ...)
and I am frightened, that I would damage other parts of my system by playing with the kernels.

I had the same task on another machine with centos 7 (installed elrepo, which didn't work, I think, my amd graphic cards are the problem),
the easy solution was to use the old kernel (also, sometimes, after an update, the new kernel refuses to work,
and the grub-setting also works fine ....

By the way: I named this thread ,Grub2 configuration'
So, does anybody here recognise, what I did wrong?


Greetings
Holger
kaengo
engineer, germany
Centos 7 (hopefully at next time ...)

nouvo09
Posts: 101
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Grub2 configuration

Post by nouvo09 » 2019/10/10 20:41:53

there is no way to damage the system

just do a dnf remove kernel{detailed name}*

and when dnf lists all the stuu it is going to desinstall, just look before to click OK.
Member of centos-FR forum

Post Reply

Return to “CentOS 8 - General Support”