I just installed EndeavourOS on a very old machine, like 10 years old or more.
During installation I did not have sytemd-boot as default, I had only Grub, so I had no option.
As you may remember or find here I have bootloader hopped between systemd-boot and Grub several times, several installations… etc till I settled finally on systemd-boot.
During my boot loader hopping, with the help and guidance of our friends here I could make “hook” that looks after the issue of Grub breaking and not booting the system by automatically reinstalling it if needed. (you may check Grub Hook to grub-install and grub-mkconfig?)
I got 2 text files containing my BIOS data (name reflects command)
in case anything needed from them.
I tell you what, feel free to simply ignore the question, I am just curious, I am using this laptop for backup purpose and as a personal cloud storage, and I do not mind doing another fresh install if needed.
I honestly don’t know why you are going through this all the time? I use grub on all my systems. Some dual boot, some with nvidia some with btrfs. Have i had grub break? Only on a few occasions. Sometimes it happens when updating UEFI firmware because it wipes out the nvram entries. It happens! Not every time but it has on occasion. It’s not like I’m updating the UEFI firmware that often but whenever there are newer updates I always update it. This has required me to arch-chroot and reinstall grub and run the update grub command to get the entry back in order to boot from the drive that EndeavourOS is installed. Other than that i have only run into it when the original grub fiasco happened and that was a matter of timing. It didn’t happen on all my systems because it depended on when i did the updates and once i became aware there was an issue i knew there would be manual intervention in order to deal with that situation. Other than that i rarely have any issues with grub or updating. Updates install and the systems work. I don’t do anything, i don’t change anything. I just use endeavourOS as it is installed.
Currently i am using Wayland both on Nvidia hardware and amdgpu with btrfs and the Nvidia system is dual boot Win 11. They are both on KDE Plasma and they work so well i will never change to any other desktop or stop using grub.
I don’t know if it’s an answer to your question? I’m just pointing out that grub issues shouldn’t be that prevalent. They do happen but they shouldn’t be happening on the basis that i see in this forum. I don’t know much about hooks and writing scripts and all that stuff. I leave that to the people who know what they are doing and have more knowledge than i do i that regard. The hook you are using if i recall was to run the grub update command? I’m not sure how you have it set up to work but i can say that i do use the update grub command when necessary. That is if i add something to the grub command line such as a kernel parameter or if there is a new grub version package. In that case i would reinstall grub and run the update grub command.
Edit: I’m no expert and i just do what i think is correct and what works for me.
you mean explicitly specifying where to install?
Shouldn’t it default to /dev/sda or wherever as it is supposed to be installed by default to the default location?
(as I searched I guess my system is BIOS as there is no folder /sys/firmware/efi/
I remember some time ago I believe @dalto asked me to change a certain setting in BIOS to have it, I searched that old reply to me, but for some reason the same that worked before made the machine unable to read USB, so I couldn’t install. So I just went with defaults.
But I don’t mind trying again
If your hook works for you, then that’s all you need to answer your question. I actually use a more complicated grubfix.sh type script that tests for UEFI or BIOS, tests for NVME vs SATA disk type and runs the appropriate command depending on the results. Since my script does a bit more than just run the grub-install, it was necessary to make the hook run a script.
OK, so that user did this: grub-install ...
That is the example from the output of pacman after grub is updated. That is meant to indicate that grub-install should be run with the correct settings for your system. The “…” means to follow the grub-install command with whatever settings are appropriate for your use case. The OP of that thread did not know that and messed up their system.
So it has everything to do with the dots…
Arch’s pacman messages do not assume one is running EndeavourOS or zsh, The … means what it means for all Arch based systems and specifying the options for grub-install is never a bad idea. It may not be necessary on EndeavourOS, but pacman does not know that.
That might work for many packages, but grub is special in that the package will update, but that does not mean the grub version on the boot sector is updated. Grub is different in that way from most packages. When the grub package is upgraded, it should be reinstalled to the boot device, to be safe, every time. Most distros do this by default. Arch is more manual and puts that responsibility on the user.