Update-grub failed. someone help please

There it is, your failure.

4 Likes

Smartie!

And you hate systemd because of the bloat? :rofl:

2 Likes

I have it set up in a virtual box to run the Tamriel Trade Center client for eso but I couldnā€™t get it to run under wine.

I encountered the same problem of not being able to run the command ā€œ#update-grubā€
So, I created the command following the instructions below and it works!

bash: update-grub: command not found

So I manually created one as below:

sudo nano /usr/sbin/update-grub

This will create a new empty file.

Type the following in the empty file:

#!/bin/sh

set -e

exec grub-mkconfig -o /boot/grub/grub.cfg ā€œ$@ā€

save the file and exit.

Then I ran in the terminal:

sudo chown root:root /usr/sbin/update-grub

sudo chmod 755 /usr/sbin/update-grub

This way I manually created an update-grub command just like many other distributions. Then I ran:

sudo update-grub

This is not how you update grub on an Arch based system. Those are ubuntu based commands!

Edit: Please use the following.

sudo grub-mkconfig -o /boot/grub/grub.cfg

Edit2: Please refer to the Arch Wiki

https://wiki.archlinux.org/title/GRUB

Edit: Sorry i misunderstood your post at first as i skimmed only the first few lines. I see what you did after realizing you couldnā€™t use sudo update-grub. :wink:

Pssstā€¦

AUR (en) - update-grub (archlinux.org)

1 Like

welcome on the forum @diyako indeed creating the script manually will work in the same way ā€¦ you could also use an alias in your terminalRC or use the script by installing from AUR:
yay -S update-grub

aur/update-grub 0.0.1-7 (+93 2.48) 
    Simple wrapper around grub-mkconfig

In addition, keep in mind to not post in year old postsā€¦ it will get lost and it is always recommended to open a new post instead.

3 Likes

:wink:

I didnā€™t know that even existed. :thinking:

1 Like

What is the set -e to make it executable? I thought the exec does that? Iā€™m bash illiterate! :sweat_smile:

:eyeglasses: set --help
:slightly_smiling_face:

I donā€™t RTFM. :sunglasses:

Edit: Okayā€¦

-e Exit immediately if a command exits with a non-zero status.

ā€“closingā€“

If the honored gentlemen have no objection to it? :blush: