Grub-customizer

I did not come to Garuda with the intention of installing the distro and expecting to never have to reinstall or not have any issues whatsoever. In my first few posts on the forum I did mention that I wanted to run it alongside Arch, which I was able to do, but then after that I started completely fresh with Garuda, no Arch. I am in no way shape or form tied to grub-customizer. As I stated in my original post on this topic, I found grub-customizer on the Arch wiki, and have had 0 issue with it since I started using it. It's become second nature on all of my installs, no problems. I am not one of those people who are married to their installs. I have all of my important stuff backed up to NAS, and I will only lose settings after a reinstall, aside from virtualbox files. I am not claiming to be some type of know-it-all saying "I'M GOING TO USE GRUB-CUSTOMIZER WETHER YOU ALL LIKE IT OR NOT!", I am not married to any software, and I am absolutely willing to learn the correct way of doing things. Grub-customizer just made things easier.

I am not nor do I claim to be an expert. I am a casual Arch user. But I do feel that I was attacked for posting a screenshot of 13 lines of text. I did not realize that the forum would become unfriendly if I did that, and that you were having an issue with this, prior to my arrival. Was told of my "flawed thinking" for that. To add, I would never post an explanation such as this, if my "flawed thinking" wasn't pointed out. I've been a user of Garuda since Thursday, and it's taken a few weeks of hearing about it to persuade me to give it a go.

There is literally 0 issue with my system, currently. I just wanted to move the boot option for the kernel I want to run from "Advanced Options", to the top level menu, so I could save myself from few keyboard strokes, and for the sake of aesthetics.

It was mentioned that I should post the contents of /etc/default/grub and /boot/grub/grub.cfg.new

/etc/default/grub

/boot/grub/grub.cfg.new

I am not sure how to rectify this, but I think the problem is that your grub.config is being generated with an "if" statement that has no value attached.

Your error message states that there is a syntax error at line 232; lines 232 and 233 are:

if [ ${grub_platform} == "efi" ]; then
fi

There is no resolution to the "if" statement. Something should follow then, before the fi (end of the statement). It's an incomplete statement.

Hopefully someone with a bit more experience in this area will be able to verify if I'm correct here.

3 Likes

My apologies if I offended you with my prior comments. I'm glad to hear you are not married to grub customizer, because as many have mentioned it can cause serious problems.

Sorry, if I made you feel unwelcome here. That wasn't my intention, and I hope you get everything fixed up, so you can enjoy Garuda.

5 Likes

Hmm...I just looked at your /etc/default/grub - it looks just a wee bit odd; were you trying to set GRUB_DEFAULT=saved by any chance?

3 Likes

there's some more information about rEFInd on endeavourOS wiki, as well as from some stranger on the internet, if you're still interested. https://endeavouros.com/docs/installation/how-to-install-refind/
https://www.zdnet.com/article/the-refind-boot-loader-for-uefi-systems-a-life-and-sanity-saver/#!

1 Like

I did a re-install and have installed the kernel I want with Garuda settings manager and now it is booting that kernel by default. So, we're good.

1 Like

I ran into something similar today. That bad if statement was in /etc/grub.d/61_custom . I removed it and grub-customizer worked as expected. I'm not sure if that's a default file or not but my Garuda installation is very new so it feels like it.

1 Like

But maybe it is needed for expected functioning.

pacman -Qo /etc/grub.d/*

Do you mean this file?

/etc/grub.d/61_custom_leave_options is owned by garuda-common-settings
1 Like

I didn't remove the file. I removed bad syntax if statement.

If you think it is bad syntax, don't you want to correct this for all Garuda users?
If you want to act like normal Linux ethics, please help correct a possible bug.
Post

pacman -Qo /etc/grub.d/*
for file in /etc/grub.d/61_custom* ; do echo ------ ; echo -E $file ; echo ------ ; grep [[:print:]] $file ; done
2 Likes

My system was installed yesterday with the Gnome Garuda, fyi.

This is the output.

/etc/grub.d/00_header is owned by grub 2:2.04-8
error: No package owns /etc/grub.d/06_grub-customizer_menu_color_helper
/etc/grub.d/10_linux is owned by grub 2:2.04-8
/etc/grub.d/20_linux_xen is owned by grub 2:2.04-8
error: No package owns /etc/grub.d/30_os-prober_proxy
/etc/grub.d/41_custom is owned by grub 2:2.04-8
/etc/grub.d/41_snapshots-btrfs is owned by grub-btrfs 4.7.1-1
/etc/grub.d/60_memtest86+ is owned by memtest86+ 5.01-4
error: No package owns /etc/grub.d/61_custom
error: No package owns /etc/grub.d/backup
error: No package owns /etc/grub.d/bin
error: No package owns /etc/grub.d/proxifiedScripts
/etc/grub.d/README is owned by grub 2:2.04-8
------
/etc/grub.d/61_custom
------
zsh: no matches found: [[:print:]]

Here is the code for my 61_custom

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.



menuentry "Shutdown" --class shutdown {
	echo "System shutting down..."
	halt
}
menuentry "Restart" --class restart {
	echo "System rebooting..."
	reboot
}
menuentry "Firmware Setup (UEFI)" --class recovery {
		fwsetup
}

As @tardy had found earlier there was a bad if statement in the grub.config that was getting generated by grub_customizer. That if statement was in 61_custom.

if [ ${grub_platform} == "efi" ]; then
fi

Not a Garuda file, as you see.

It seems you removed grub-customizer, so you have to remove remaining files. They will brake your system, sooner or later.

3 Likes

Thanks for the help. After testing again It's definitely a grub-customizer issue that creates that bad 61_custom file.

1 Like

Just to follow up. The reason I used grub customizer in the first place was that Garuda boot options didn't appear to save my default boot preference when I switched it to Windows. I'll try to get some more info a create a new thread.

It seems btrfs FS is not "working out with grub environment variables", so it is preferred/suggested to NOT set GRUB_DEFAULT=saved, as grub cannot read or write environment var saved_entry.

1 Like

I don't know how many times we can repeat this.

Do not install grub-customizer!!!

It can create very serious problems that will not be cured by simply uninstalling grub-customizer.

It is like the old saying:

It's pretty hard to unscramble scrambled eggs.

Unless you really know what you are doing often the only solution to fixing a severe mess that grub-customizer has created is to do a clean install.

Please do not install grub-optimizer., or you may greatly regret it.

5 Likes

Please do not install grub-optimizer., or you may greatly regret it.

Is there a grub-optimizer now? I'll have to try that :smiley:

If Garuda is still around in 10 years, this thread will still be referenced as to why to not use grub-customizer.

Ahh..well I'm so old I still use LILO, so I can be excused if a few items slip my memory now and then. :rofl:

2 Likes

hehe its literally the story of every linux distro. almost every forum post of common issues is many many years old

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.