Page 3 of 3
Re: MX-Linux doesn't see Arch Linux in grub
Posted: Mon Mar 11, 2024 2:35 pm
by popjah
Charlie Brown wrote: ↑Mon Mar 11, 2024 1:34 pm
I was just going to write that. If you change kernel etc. you need to do (kind of "update") it again.
However unlike MX / Debian no kernel versions stated:
Code: Select all
linux /vmlinuz-linux-lts
initrd /amd-ucode.img /initramfs-linux-lts.img
So, first compare the new grub.cfg and do it if necessary. You can simply take this part (between these two)
Code: Select all
### BEGIN /etc/grub.d/10_linux ###
...
...
### END /etc/grub.d/10_linux ###
On MX just saving the file is enough, no need to update-grub :)
Excellent, thank you Charlie Brown for your time and expertise, and a thank you to all the others who suggested solutions as well!
Re: MX-Linux doesn't see Arch Linux in grub
Posted: Mon Mar 11, 2024 2:43 pm
by Charlie Brown
Thank you, too for the feedback.
In the meantime I just remembered it wrong, as if there was such a file ootb , just empty, so you did well creating it, also you did well creating with exactly that name, cause it's defined so in another place (/etc/grub.d/41_custom) (to be scanned and added), say Custom.cfg won't work :)
Just btw: it's also possible to use the /etc/grub.d/40_custom file keeping the existing lines (pasting under them), then sudo update-grub
Re: MX-Linux doesn't see Arch Linux in grub
Posted: Mon Mar 11, 2024 3:03 pm
by popjah
Charlie Brown wrote: ↑Mon Mar 11, 2024 2:43 pm
Thank you, too for the feedback.
In the meantime I just remembered it wrong, as if there was such a file ootb , just empty, so you did well creating it, also you did well creating with exactly that name, cause it's defined so in another place (/etc/grub.d/41_custom) (to be scanned and added), say Custom.cfg won't work :)
Just btw: it's also possible to use the /etc/grub.d/40_custom file
keeping the existing lines (pasting under them), then
sudo update-grub
I learned a lot of things today, thanks to you!

Re: MX-Linux doesn't see Arch Linux in grub
Posted: Mon Mar 11, 2024 3:09 pm
by Charlie Brown
Re: MX-Linux doesn't see Arch Linux in grub
Posted: Mon Mar 11, 2024 9:12 pm
by asqwerth
Charlie Brown wrote: ↑Mon Mar 11, 2024 2:43 pm
Thank you, too for the feedback.
In the meantime I just remembered it wrong, as if there was such a file ootb , just empty, so you did well creating it, also you did well creating with exactly that name, cause it's defined so in another place (/etc/grub.d/41_custom) (to be scanned and added), say Custom.cfg won't work :)
Just btw: it's also possible to use the /etc/grub.d/40_custom file
keeping the existing lines (pasting under them), then
sudo update-grub
The OP should only do changes in his /boot/grub/custom.cfg file, and NOT in /etc/grub.d/41_custom. The latter is the script that tells grub that if there exists /boot/grub/custom.cfg file on the system, to display the grub menu entries within after the normal grub menu entries.
Additional tip if you have quite a few distros on your machine (which show up in the normal grub menu entries), and you want your custom entries to come first, and not after the whole string of standard boot entries:
Open root Thunar.
Go to /etc/grub.d/ and rename the
41_custom file as
09_custom (make a copy somewhere else first!). It needs to be a number smaller than 10 (but don't use a number that is already used/taken by one of the other scripts), because 10_linux is the script that tells the system to display the standard grub menu entries within your /boot/grub/grub.cfg.
After changing the name of script to 09_custom, you will need to run a
sudo update-grub
However, if there is a future update to the grub package, it will reinstate 41_custom into your system, then you will have the custom boot entry appear both before and after the normal grub entries. If that happens [not often on a debian stable distro], then open root thunar to remove 41_custom again and then sudo update-grub.
I don't like incorporating custom entries into 40_custom itself as any changes to your custom entries will require a sudo update-grub thereafter. For custom.cfg, changes within that file do not need sudo update-grub.
Re: MX-Linux doesn't see Arch Linux in grub
Posted: Tue Mar 12, 2024 6:32 am
by popjah
asqwerth wrote: ↑Mon Mar 11, 2024 9:12 pm
The OP should only do changes in his /boot/grub/custom.cfg file, and NOT in /etc/grub.d/41_custom. The latter is the script that tells grub that if there exists /boot/grub/custom.cfg file on the system, to display the grub menu entries within after the normal grub menu entries.
Thanks, asqwerth.
Re: MX-Linux doesn't see Arch Linux in grub
Posted: Tue Mar 12, 2024 8:40 am
by Charlie Brown
asqwerth wrote: ↑Mon Mar 11, 2024 9:12 pm... and NOT in /etc/grub.d/41_custom...
Yep. That was just for info (what makes custom.cfg to be added to the menu and why the name should be exactly).
asqwerth wrote: ↑Mon Mar 11, 2024 9:12 pm
I don't like incorporating custom entries into 40_custom itself as any changes to your custom entries will require a sudo update-grub thereafter.
Me, too.
On this opportunity just a humble suggestion
@dolphin_oracle
Maybe (next releases) you make this file present ootb, just empty (or 1-2 explanation lines commented out), otherwise most users don't know even the existence of such an easy to use feature.
Also (though not urgent or very important) maybe adding 5 more lines just with the name
Custom makes both of them usable, say, when the user creates one starting with a capital unknowingly. (Both
custom.cfg and
Custom.cfg would work (I guess) )
Code: Select all
if [ -f \${config_directory}/Custom.cfg ]; then
source \${config_directory}/Custom.cfg
elif [ -z "\${config_directory}" -a -f \$prefix/Custom.cfg ]; then
source \$prefix/Custom.cfg;
fi