Grub Updated Seamlessly

Did you reboot?

I did before and it booted. But the grub-install gave errors and couldn’t find the efi partition.

Did you run it without sudo maybe?

Yes actually i did… :man_facepalming:
Just rebooted again and okay.

Edit: I didn’t run the update command though.

So if we get an updated grub what are we supposed to do run the commands or not if it boots okay?

The recommended action is to run grub-install and grub-mkconfig after every grub update.

3 Likes

I just think it will be confusing for many users when updating and it tells you to run grub-install and update command.

Yes, it probably will.

Although, to be honest, most probably won’t even notice the message.

If I may say (or “recommend”), for making a long long story short, what do you thing about the script I made in the first post? Should it be enough to answer/solve all hassles of updating Grub? It is applicable to any system?

By the way I just used in the first line not just yay I used yay -Syu (don’t ask me why, this is how I learned to do it)

It went perfect with me. Just a click of a button in the toolbar. Absolutely nothing more.

What you think guys? Anybody tried the script? Would somebody or some having more than one machine take the risk and try it? (Or perhaps restore to an earlier snapshot before and try).

I think using a script is absolutely the wrong solution

No, it fails to address situations in grub can be updated by other means. It would also be better use --no-nvram in my opinion.

It is not, it won’t work for all systems.

Mine are purple!

Edit: Also seamless… :rofl:

Why? Isn’t it the same as doing it manually?
Update system, if Grub updated run the 2 commands as you mentioned.

Sorry for my ignorance! I do not know how it would get updated by other means other than yay -Syu or so? As a dependency as you mentioned perhaps?

So, for me at least, I better add

`sudo grub-install --no-nvram`

just before the 2 commands?

This is what I tried to do.
Instead of doing it manually, or not noticing Grub was updated… just to be sure the 2 commands will be done in case Grub was updated.

So, I just count myself lucky it worked for me this time and I did not break my system as I always do.

Thank you @dalto and to all of you for all your inputs.
I can say for now, for me, I am glad I am lucky it worked for me. Hopefully it will work for me next time as I do not intend to make any system change other than updating through the button on the toolbar.

Sorry for taking much of your time!

Thank you all.

Luckily this was the case with me! I deserve to be lucky at least once, and not break my system (as usual) at least once. :rofl:

Sorry @ricklinux
Well,from now on I will just ask for help if you don’t mind. I won’t get myself into anything technical.

Sorry if I bothered or confounded anybody.

Personally i agree with @Kresimir
Grub has been around since 1995. UEFI has taken over from Bios and they implemented some new feature that caused problems. I don’t think it’s necessary to run grub update every time although it may be at times necessary. I think the issue is basically dealt with and although it’s recommended it may not always be necessary. I think this is just adding more unnecessary confusion. :thinking:

1 Like

I just noticed a tiny error (two actually) in the message when GRUB is updated:

:: To use the new features provided in this GRUB update, it is recommended
   to install it to the MBR or UEFI. Due to potential configuration
   incompatibilities, it is advised to run both, installation and generation
   of configuration:
     $ grub-install ...
     $ grub-mkconfig -o /boot/grub/grub.cfg

Do you see it? :slight_smile:

Of course, it should be # instead of $. :frog:

5 Likes

Oh, they should be commented out? :rofl:
Like a no-operation… :wink:

1 Like

I think it should have sudo? I ran the grub-install without sudo. I know i needs sudo with the grub update command but I’m not used to seeing grub-install … This to me is like update-grub. It’s just not familiar to me. For those of us that are not versed with all things Arch. We tend to follow whats in text in front of us. It doesn’t dawn on all of us to know that we need sudo or what ever the case may be. But i agree with @Kresimir because this is what the Arch wiki shows. When you see # it means to use sudo with the command. So i don’t know what to say? Is it commenting out or is it telling me to use sudo? and in that case $ means i don’t need sudo? :thinking: I know in other instances it’s used to comment out text in files.

Edit: I’m so confused… :confounded: :rofl:

The # prompt traditionally indicates that the command is being run as root. Sure, sudo is one way of doing it, but not the only way, and some systems do not even have sudo installed, so it’s good that sudo is not explicitly mentioned.

However, if you look at pretty much any page on Arch Wiki, the convention is that $ prompt means “run as your user”, and # prompt means “run as root”. E.g. https://wiki.archlinux.org/title/Pacman

So to have $ here in the message is simply incorrect (at least according to the prevailing convention) because running grub-install or grub-mkconfig as a regular user will not do much except print an error message.

Yes that is what i was getting at. For me that is usually what i look for because i don’t know otherwise.

Edit: So I’m not sure i understand the posts above? Which way is it?