(Solved) Given a choice of kernel to load/use at boot up

M7379t

New Member
Joined
Feb 23, 2022
Messages
8
Reaction score
3
Credits
112
I would like the script to write into the command line to be able to have a screen present at boot up that will allow me to proceed with the present kernel that I have been using or choose to use an older kernel. This screen should present just prior to me being able to log into Linux Mint.
My system: Kernel: 5.4.0-100-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 5.2.7 wm: muffin dm: LightDM Distro: Linux Mint 20.3 Una
base: Ubuntu 20.04 focal
I appreciate any insight.
 


grub does this for you.

When you say "older kernel". I am assuming one that came with the distro at some point, not one you have compiled.

1646682407970.png


I have a choice here of 5.16.11 or 5.16.12, by default it saves the last 3 versions, but you can edit grub.cfg
to save up to nine versions. Default distro upgrade kernels do this in grub for you automatically.

If you compile your own kernel, there are some extra commands involved.
But as a rule make install does this for you.
 
Thanks for your response. I have attached two files that show the initial screen that I am referring to, and, the advanced options screen that is offered. If I do not go to the advanced options screen within 5 seconds the default choice is used. I hope that this helps to clarify what I am trying to convey.
 

Attachments

  • Screen example.jpg
    Screen example.jpg
    3.2 MB · Views: 237
  • The advanced options screen.jpg
    The advanced options screen.jpg
    3.3 MB · Views: 288
This is different for different distro's, but most of the distro's I use have a file...

/boot/grub2/grub.cfg

You can set the "default" kernel version to boot here. Also you can set the screen timeout length up to 999 seconds.
(Almost 17 minutes)

None of the distro's I use have this "advanced options" screen, I think that is a Mint thing.
 
Yes, distos differ.
M7379t wrote:
have a screen present at boot up that will allow me to proceed with the present kernel that I have been using or choose to use an older kernel.
On my debian system if you add the config: GRUB_DISABLE_SUBMENU=y
to /etc/default/grub, and then run the command to update grub, on next boot up the grub menu will present all kernels to choose from.
 
I thank you, dos2unix and NorthWest, for your input. I will post my query to the distro specfic Mint forum.
 
I'm going to crash soon. If the above is what you want, there's likely a file that can be changed, but you can use 'grub-customizer' to accomplish that - I'm pretty sure. I've never used the option before.

Grub Customizer_001.png
 
One of your attachments shows that you have 5.4.0-99 and 5.4.0-100 kernels installed

If you want to have the choice of choosing another kernel...earlier......then you will first have to install it.

open update manager

Click on View....then on Linux Kernels

In the left hand column select the 5.4

That will open a list of kernels. The majority of them will show as being superseded

Choose whichever one you want, by clicking on it once.....this will open an option to install it. Click on Install and sit back.

When you have finished, in Terminal run ;

Code:
**sudo update-grub**

Thats it.

You should now choices when it reaches that screen prior to log in.

A word of warning.
Linux is all about the kernel. Strange things can and do happen.

It is in your best interest to save a couple of Timeshift snapshots to an external hard drive.......These would be taken prior to you changing kernels.

So if something goes awry, then you have a snapshot to fall back on.

If you already have Timeshift set up...good
If you haven't, just ask here
 
I will post my query to the distro specfic Mint forum.

No need to, this has effectively created a duplicate thread with differing responses, and will only confuse the matter (no criticism on you).

I have locked the other thread and am moving some stuff here.

Wizard
 
Done - see #7 to #9 above.

...I think that is a Mint thing.

No, it is a Debian thing, applies across the range, including Ubuntu and Linux Mint and so on.

This is different for different distro's, but most of the distro's I use have a file...

/boot/grub2/grub.cfg

You can set the "default" kernel version to boot here.

Please don't do that. The beginning of grub.cfg for most Debian-based distros has

# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

for a very good reason. You need maybe 5 years experience with Linux to go anywhere near that file. Further, any changes you make to it will be unlikely to persist beyond a kernel update or an upgrade, there are other ways to effect a change.

The advice given by @NorthWest at #5 on /etc/default/grub is the advisable course of action for making changes.

Wizard
 
I resolved the issue. I appreciate everyone's input. I also have learned not to have more than one thread in a specific forum. Also, yes I setup Timeshift at the time I initially setup Linux on my machine.
I resolved my issue by editing grub with:
# GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_GFXMODE="800X600"
I then updated grub and exited the terminal. After rebooting the Advanced options for Linux Mint Cinnamon 20.3 screen presents prior to log-in screen.
Again, thanks to all!
 

Staff online

Members online


Top