I want to customize my Grub bootloader. I tried Grub Customizer. It is very good but I can't do what I want.
I want to add icons for every option. No problem with normal entries. I delete them, copy their scripts from grub.cfg, add a '(script code)' entry, paste code there and add a class in script (--class favorite_icon_name).
When I want to add a class to a submenu (--class folder), I do the same but submenu doesn't appear there (and also while booting).
I know I can directly edit /boot/grub/grub.cfg, but if I run grub-mkconfig, changes will revert. I don't want to copy and paste grub.cfg everytime!
What can I do? Can I edit grub.cfg and generate files in /etc/grub.d using it? (something like grub-mkconfig but reverse!)
And something else: How can I get rid of 'Removed items' in grub customizer?

  • I'm still waiting for an answer... – AmirSina Jan 11 at 12:35

Well, I found the solution myself!
I found that I my custom scrips in the /etc/grub.d/40_custom. I wanted to edit them but they were very messy. So I booted to a live Ubuntu usb and copied grub.d folder from live Ubuntu to Home folder in main Ubuntu.
After creating a backup from grub.d folder, I deleted files in it and copied files from Home folder. Then renamed and deleted some entries using 'Grub Customizer'.
After that, I copied my favorite scripts to /etc/grub.d/40_custom file using gedit. Finally, I ran sudo update-grub. Now everything is as I wanted!
If you know another solution, please post it here. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.