Is it possible to get small help with /etc/default/grub?

It works there. Same with refind. They write to either EFI variables or the EFI partition.

Grub can handle as many kernels as you need.
On my btrfs system I have 4 entry’s when booting grub.
LTS
LTS init
Linux
Linux init

GRUB_DEFAULT=2
Will boot Linux above and 0 would boot LTS, 1 would be LTS init and 3 would be Linux init.

1 Like

@Menditsa
Yes that is possible, the question or the request is that the last grub choice will be saved for the next boot.

because grub need to save that choice and grub is not able to write on a btrfs

So there is no direct solution.

Why grub can’t write to btrfs and will it be possible in the near future?

It is a solution as the OP was asking to boot a particular kernel.

No, because he @olividir ask to remember a selection and that selection can change. His way was already correct on the base but it sadly does not work with btrfs.

You advice will only change the default selection.

He will stay on the default kernel and have only the lts as “backup” until the default kernel get stable again. Between that time he don’t want to change always his selection.

This might be what I am looking for. I’ll try GRUB_DEFAULT=1 for the rolling kernel, if that means that grub will always select Linux.
Boot order
lts-linux
linux.

This method works for me. Now it boots into the kernel I want by default.

Thank you.

2 Likes

@olividir for easier handling you can even try grub-customizer

Didn’t know about that. Will give it a look :slight_smile:
Thank you for this.

With ext4 there is no such problem. :rofl:

3 Likes

To be fair, I did not know that this would be an issue when I chose BTRFS, but there is a work-around so happy :slight_smile:

1 Like

Just out of curiosity, if I may ask… Why did you choose Btrfs?

1 Like

For rather simple grub manipulation, I suggest the manual way.

In many cases, grub-customizer, could potentially lead to more issues than what it tries to solve.

You could search this forum and/or see the search result below:

https://www.startpage.com/sp/search?query=grub-customizer+issues+&cat=web&pl=opensearch&language=english

2 Likes

I…
I don’t remember :laughing:

2 Likes

I have used grub-customizer for changing the fonts

I didn’t found a good tutorial to do it myself, all I found gave me more confusion than before.

But here I saw that you can switch the default in grub and other stuff but never tried those settings.

so if there is a good tuto for the font… before I open an new topic :wink:

Edit: I have now understand the way fonts in Grub work can do it now manually :slight_smile:
It make me happy, to learn new stuff

I do not know why @olividir has chosen btrfs, but I have chosen it mainly because there is a good btrfs Windows driver, where I can access my btrfs partitions on Windows the same way as native windows partitions.
An the snapshots are really useful too.

So the advantages are for me bigger, than the little hick, that grub can’t write on it.

Didn’t know that!

Now I remember, snapshot are supposed to be simpler than on ex4… I think I was mainly thinking about that… and then I totally forgot to install timeshift and make a snapshot :rofl:

Something I have fixed now.

I hear some heads are exploding around the forum :rofl:

Whether that’s safe and/or can corrupt files is another story for a pub post…