I have a question about a setting in grub: It is about the line
# GRUB_SAVEDEFAULT=true
Does it make a difference if # GRUB_SAVEDEFAULT=true is only commented out or if it says GRUB_SAVEDEFAULT=false? The result is probably the same in either case, right?
Personally, I prefer it to be set to true, so that I only have to choose once which kernel I want to boot. I’m using linux-lts at the moment, but I also have linux (mainline) and linux-zen installed. I like the fact I don’t have to pick on every boot which kernel I want to use, but I can easily change it.
Here is why I don’t like that. Let’s assume 0th on the list of boot options in GRUB is the kernel I normally use, say it’s linux-zen, just as an example. That works fine, I normally want to boot this kernel. But let’s say an update causes something to render linux-zen unbootable, but the computer boots fine with linux-lts. So, for the next few days until the problem is fixed in another update, I want to boot linux-lts, which is not 0th on the list of kernels in GRUB. That’s a pain, because now I have to select the kernel on every single boot. Or I have to reconfigure GRUB (and then reconfigure it again, when I want to switch back to the original kernel I was using).
However, if I set
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
that’s not a problem anymore. Now, I only have to select linux-lts once, until I decide to switch back to linux-zen.
I tried setting this on mine and i get an error that say’s cannot use sparsed file or something just before loading. Trying to figure out what I’m doing that it gives this error message. I can still boot into the kernel?
My intention should be recognizable from my input post. Everything that was suggested afterwards has arisen incidentally. I just wanted to know if it makes a difference to comment out said line or to set it to false. I don’t have the slightest idea about programming.
And NO, I didn’t originally want grub to remember the last kernel (which wouldn’t work with btrfs either, if I ever got carried away using it). That’s why my approach is to set the kernel to boot in grub. For ext4, @Kresimir 's method is probably better. But as I said, my question has already been answered, thx @dalto .
Two things:
First, that setup won’t resolve the issue @ricklinux is referring to above.
Second, the setup he is using is pretty much the default setup on EndeavousOS already. “The problem” as he calls it, is a problem he created himself by mounting ESP at /boot when using grub.
With EOS, you could achieve the more or less the same setup by selecting btrfs and encryption in the installer and then installing grub-btrfs post-install. There would be no reason to do all that manually.
My mistake mate. Completely misunderstood the situation.
I did manual installation on my machine and completely forgot EOS setups up everything already.
For now, I will just leave that up there for posterity sake. If you want then take it down.