Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: dxrobertson on 18 July 2019, 15:37:50

Title: How to update-grub
Post by: dxrobertson on 18 July 2019, 15:37:50
Hello.   New Artix user here.  I installed Artix artix-lxqt-openrc-20181008-x86_64.iso, upgraded, and manually installed kde starting with  plasma-desktop package.  All is well with my system.

I need to modify the grub config file at /etc/default/grub.  I have made my changes, but cant figure out how to update grub.  What I normally do is  enter update-grub and this will use the grub conf file to update /boot/grub/grub.cfg.  But there is no update-grub on my system.

Grub is at version 2:2.04-1:
Code: [Select]

[dxrobertson@acer ~]$ pacman -Q grub
grub 2:2.04-1



No update-grub:
Code: [Select]
[dxrobertson@acer ~]$ sudo whereis grub
[sudo] password for dxrobertson:
grub: /usr/lib/grub /etc/grub.d /usr/share/grub /usr/share/info/grub.info.gz
[dxrobertson@acer ~]$ sudo whereis update-grub
update-grub:
[dxrobertson@acer ~]$



Am I missing update-grub, or does Artix use a different method to update?

Thanks in advance.

Title: Re: How to update-grub
Post by: cynicfm on 18 July 2019, 15:49:43
I have seen guides on internet that uses this command set for grub update
Try this
Code: [Select]
# pacman -S grub os-prober
# grub-install --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
Title: Re: How to update-grub
Post by: dxrobertson on 18 July 2019, 18:38:27
Thanks @cynicfm!

I recall using grub-mkconfig in the past but had forgotten about it.  All I needed was to run grub-mkconfig, didn t need grub-install.


Code: [Select]

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

Title: Re: How to update-grub
Post by: cynicfm on 18 July 2019, 21:56:54
So you managed to update grub??/ If yes i am glad and very happy that i was able to help you with your concern :))) Thanks :)))))
Title: Re: How to update-grub
Post by: xanadu on 19 July 2019, 13:16:40
BTW: Since I always had trouble because of the missing auto scan function in GRUB2 (e.g. after updating a kernel or replacing the root filesystem), I replaced it tonight with rEFInd. For now, everything works fine.
Title: Re: How to update-grub
Post by: dxrobertson on 23 July 2019, 01:21:54


So you managed to update grub??/ If yes i am glad and very happy that i was able to help you with your concern :))) Thanks :)))))

Yes, grub update success; thanks again!


To clarify and help others coming from  other distros that may encounter lack of update-grub in Artix:

If you are used to entering:

Code: [Select]
update-grub

Enter this instead:

Code: [Select]
grub-mkconfig -o /boot/grub/grub.cfg




Title: Re: How to update-grub
Post by: ####### on 21 September 2019, 23:16:24
I just spotted there is a /usr/bin/update-grub which is part of the Artix grub package. Sadly if you run update-grub it says command not found - because the file is not set as executable.
But at least you can do:
Code: [Select]
$ sudo /bin/sh update-grub
( or su / doas etc as preferred) which does work! That's progress  ;D

Code: [Select]
install -m0644 "${srcdir}/update-grub" "${pkgdir}/usr/bin"
install -m0755 "${srcdir}/update-grub" "${pkgdir}/usr/bin"
(Should be 0755 at the end of the PKGBUILD I think)
Title: Re: How to update-grub
Post by: dxrobertson on 22 September 2019, 12:33:05
Yes, I see I now have update-grub in /usr/bin.  Dated 07/31/2019 and exec permissions are not set on mine either.  Thanks; will change permissions and start using this for updating grub.