Thanks for teaching me this.
I thought yay -S grub is the same whether installed or not.
Well, it can happen if I changed again to sytemd-boot, though I believe with this hook and current setup I will remain with Grub (unless they do something else)
So far, for me the clueless non techie average Joe, this is what the whole Grub is about for me… confusing!
I wonder if I should add
Target = linux
Target = linux-lts
2 Target lines or 1 having both?
Or it can be Target = linux*
Or should it be 2 other hooks?
I read in the forum that the 2 commands should be done if there is a kernel install, this means it applies to kernel update as well?
No, you only need to run grub-mkconfig if you don’t have a kernel as a boot option in your GRUB menu and you want to have it there.
I find it amazing how much effort you put into automatising things you do not understand. A tiny fraction of that effort is all that is needed to actually understand what “the 2 commands” do, so you know exactly when to run them…
Personally, for my own use case, I tend not to automatizing a procedure before I fully grasp what will be happening and why.
As an example, even though there is a convenient systemd service to clean the package cache, I just use the command line: paccache. It gives me a sense of being more “in control” when I see the terminal output.
Thanks a lot @dalto for the focused, clear, and to the point reply as usual.
I thought it was required because -as I mentioned- in many threads I read about it in case of kernel install. (which is not the case for me)
I have only the “default” kernel plus the LTS kernel. I do not play with kernels, install and reinstall…
Again, thank you for this. I am just a user.
Thank you very much for your patience and kind attitude with an average Joe!
Thank you very much.
These shouldn’t be an excuse to not read the documentation and to not learn new stuff. Most people are just users
I am a relatively new Linux user (around an year). The way learn about these things is to read, read and read more.
Give it a try
Thanks a lot @peback
For me as a non techie all I know is that these 2 commands are required to be sure (almost) Grub will not do it again. Details on how they do it, no thanks, not for me.
To me they are like checking with the Avometer (or any other way) that the batteries are dead, they need replacement, where is the +ve, where is the -ve, just do it without needing to know what is the difference between Volt and Ampere, what is the difference between a Lithium or Zinc cells! It is just enough for me to see the Avo. doesn’t read so it is dead, and read the +ve and -ve signs.
So, the logic was clear I hope in the other thread in the script I made, based on simple understanding of the issue if there is Grub update you better do command x and command y.
I believe it saved me anyway as I read some had issues because of the update as they had before, or maybe I was just lucky.
@dalto kindly explained why is it better to do a hook, so I just followed and tried here in this thread, which ended up successfully with the help of all of you who posted here.
Thank you all for all the help, support and patience.
What about this: Simply uninstall the grub package. (I mean the package, not the already installed boot-loader)
All problems solved.
(assuming you can live with not getting (security-)updates for grub.)
In case you want to install another kernel (which should not really happen that often I would assume), simply update grub.cfg manually (it shouldn’t be too hard to copy paste one of those menuentry sections and adapt the initrd and linux references)
Thank you @sradjoker
I promise I will do my best.
I hope you noticed my first post here where I said I read this and that to know how to make a hook.
But I always prefer to ask the experts -even if I think I know perfectly- when it comes to a critical thing like a boot loader or kernel.
I assure you I am not making excuses and assure you as well I am eager to learn as much as I can.
Thanks to you all I have already learned a lot (a lot for me), I never knew there is something called hooks initially! This is just the latest I learned.
Would you believe me if I said when I read your post they seemed really contradictory to me! Me who said the two statements!
Allow me to explain.
I am eager to know and learn how neurosurgeons do their surgeries, what tools, what cases,… maybe how a submarine works, how satellites stay in orbit, where they get energy from, how they “communicate” with NASA.
But knowing how is the communication circuit designed, what components… this is not my field!
This is how I am eager to learn and not eager to learn at the same time.
(Eager to know something about everything, or everything about something, but it would be crazy to try to know everything about everything) Though whenever I try to know everything about something I only know that I know much less than what I thought.
Still sounds contradictory?!
I am enjoying the conversation with you guys cause you are smart. I like it.
For the average Joe I thought that it is just grub, grub is grub!
Thanks a lot @dalto for always teaching me new stuff.
Just curious so I can “yay -Syu grub” and I will still have the bootloader working!
So, what is put in place of “grub” in the command to uninstall the bootloader?
Just wanted to trigger some people’s thought process about “what a boot-loader really is”.
(In the hope that it leads to: Them better understanding what it’s all about with grub-install and stuff)
when you install Linux yourself, on your own machine, then you are not a user, you are a System Administrator. If you aren’t willing to know how to administer/maintain your Operating System, then you should assign/pay someone else to do it for you.