Issues with customising GRUB

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
Ganelon
Level 1
Level 1
Posts: 19
Joined: Fri Aug 12, 2016 11:38 am
Location: London

Issues with customising GRUB

Post by Ganelon » Mon Aug 15, 2016 2:07 am

I'm trying to customise my GRUB menu using this tool but it's not working. Throws up an error about syntax errors in the GRUB config file.

I tried using the Grub reinstall command, which in my understanding generates a whole new GRUB:

Code: Select all

sudo grub-install /dev/sda
Which apparently ran without an issue:

Code: Select all

corwin@Avalon ~ $ sudo grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
But then whenever I try to update-grub for any reason:

Code: Select all

corwin@Avalon ~ $ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found Windows 7 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 212
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done
It's broken again?

What's going on? I'm afraid to shut down or reboot at this point because I feel like the bootloader will just be broken and I don't have any way to fix that if it happens again.
(█▉▌‖‖|‖‖|‖‖|‖‖▐°█╟☴ϡ█████████████████████████████████████████████████████████████████)

Apathy is death.

kb5050
Level 1
Level 1
Posts: 11
Joined: Sun Jul 20, 2014 3:45 am

Re: Using Grub Customiser

Post by kb5050 » Mon Aug 15, 2016 2:36 am

I have it and works great with Linux Mint 17.2 ..

I discovered that if you want a background image, it has to be saved in .png format.
I also saved it in 640X480 resolution. Gimp imge editor has an Scale which you can use to set resolution of any loaded image, and then you can export it from File Export into the .png format. I placed mine in the Home folder, but if you put it on the Desktop that will work too.
Then you can go into Grub-Customizer, go into the Advanced section, and load that background.

Now the thing I am trying to figure out. I want large font and I can get that, as well as changing colors etc.
Normally it will draw a rectangle around the overlaid text, during boot grub2 menu.
But mine changed the rectangl;e into these weird ? mark looking characters. I think it has to do with the Font selection.
I try different ones, sometimes the warning comes up sometimes not. So I wonder if anyone knows the proper font and font size to use?
I would like to just eliminate this rectangle border actually.

Anyone know what I should be using whether you can have custom colors and so on? Appreciate any help.

User avatar
Ganelon
Level 1
Level 1
Posts: 19
Joined: Fri Aug 12, 2016 11:38 am
Location: London

Re: Issues with customising GRUB

Post by Ganelon » Mon Aug 15, 2016 2:49 am

Update: I just did a FULL PURGE AND REINSTALL OF GRUB and I still get errors when I run update-grub:

Code: Select all

corwin@Avalon ~ $ sudo update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found Windows 7 (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
grub-script-check: malloc.c:2395: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done
Are these errors something to worry about, or is it just "noticing" that my resolution settings have gone back to default? Can I reboot without worrying about the bootloader failing entirely?

EDIT: I did another full purge and reinstall, and it threw up errors with the brand-new fresh-downloaded GRUB files... I don't know what to do?!

Code: Select all

corwin@Avalon ~ $ sudo apt-get install grub-pc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  grub-common grub-gfxpayload-lists grub-pc-bin grub2-common
Suggested packages:
  multiboot-doc grub-emu xorriso desktop-base
The following NEW packages will be installed
  grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common
0 to upgrade, 5 to newly install, 0 to remove and 30 not to upgrade.
Need to get 0 B/3,302 kB of archives.
After this operation, 16.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package grub-common.
(Reading database ... 196082 files and directories currently installed.)
Preparing to unpack .../grub-common_2.02~beta2-36ubuntu3.2_amd64.deb ...
Unpacking grub-common (2.02~beta2-36ubuntu3.2) ...
Selecting previously unselected package grub2-common.
Preparing to unpack .../grub2-common_2.02~beta2-36ubuntu3.2_amd64.deb ...
Unpacking grub2-common (2.02~beta2-36ubuntu3.2) ...
Selecting previously unselected package grub-pc-bin.
Preparing to unpack .../grub-pc-bin_2.02~beta2-36ubuntu3.2_amd64.deb ...
Unpacking grub-pc-bin (2.02~beta2-36ubuntu3.2) ...
Selecting previously unselected package grub-gfxpayload-lists.
Preparing to unpack .../grub-gfxpayload-lists_0.7_amd64.deb ...
Unpacking grub-gfxpayload-lists (0.7) ...
Selecting previously unselected package grub-pc.
Preparing to unpack .../grub-pc_2.02~beta2-36ubuntu3.2_amd64.deb ...
Unpacking grub-pc (2.02~beta2-36ubuntu3.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up grub-common (2.02~beta2-36ubuntu3.2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up grub2-common (2.02~beta2-36ubuntu3.2) ...
Setting up grub-pc-bin (2.02~beta2-36ubuntu3.2) ...
Setting up grub-pc (2.02~beta2-36ubuntu3.2) ...

Creating config file /etc/default/grub with new version
Installing for i386-pc platform.
Installation finished. No error reported.
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found Windows 7 (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 387
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done
Setting up grub-gfxpayload-lists (0.7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
(█▉▌‖‖|‖‖|‖‖|‖‖▐°█╟☴ϡ█████████████████████████████████████████████████████████████████)

Apathy is death.

turtlebay
Level 5
Level 5
Posts: 629
Joined: Mon Apr 01, 2013 12:33 pm

Re: Issues with customising GRUB

Post by turtlebay » Mon Aug 15, 2016 10:53 pm

I use this which works with Mints 13, 17 and 18:

https://launchpad.net/~danielrichter200 ... customizer

Once it's installed, you will find it in Control Centre in the Admin section.

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Issues with customising GRUB

Post by austin.texas » Tue Aug 16, 2016 12:41 am

Code: Select all

sudo apt-get install --reinstall grub-pc
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

User avatar
trytip
Level 11
Level 11
Posts: 3577
Joined: Tue Jul 05, 2016 1:20 pm

Re: Issues with customising GRUB

Post by trytip » Tue Aug 16, 2016 2:43 am

i hate giving advice on grub cause it always gets different results but today i used this command to fix my boot loader. good luck

sudo grub-install --root-directory=/mnt/ /dev/sdx <<<*x being your boot drive so use sda or sdb or sdc
sudo update-grub
Image

User avatar
Pjotr
Level 21
Level 21
Posts: 13222
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Issues with customising GRUB

Post by Pjotr » Tue Aug 16, 2016 4:27 am

Don't use grub-customizer for customizing Grub.... Your bootloader is far too vital and fundamental to be tampered with by risky stuff that's not even in the official repo's. :shock:

If you simply want to set a nice holiday picture of your latest city trip to Paris, as background for the Grub menu, that's easy to do without such dangerous tools:
https://sites.google.com/site/easylinux ... autifygrub
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

turtlebay
Level 5
Level 5
Posts: 629
Joined: Mon Apr 01, 2013 12:33 pm

Re: Issues with customising GRUB

Post by turtlebay » Tue Aug 16, 2016 5:53 am

Why is it dangerous? It's even suggested by Ubuntu themselves! :D

If we can't trust the Ubuntu forums why should we place any trust in the Mint forums, as Mint is a form of Ubuntu?

https://ubuntuforums.org/showthread.php?t=1664134

User avatar
Pjotr
Level 21
Level 21
Posts: 13222
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Issues with customising GRUB

Post by Pjotr » Tue Aug 16, 2016 5:56 am

turtlebay wrote:Why is it dangerous? It's even suggested by Ubuntu themselves! :D

https://ubuntuforums.org/showthread.php?t=1664134
Not by Ubuntu itself, but only by a member of the Ubuntu forum.... So: just a guy like you and I, "staff emeritus" or not. :)

If grub-customizer would be recommended by Ubuntu itself, it would be in the official repositories of Ubuntu.

By the way: look at what that Ubuntu forum guy posted last, in that ancient thread from 2011:
https://ubuntuforums.org/showthread.php ... st12219197

It's tools like this, that can be classified as typical "rat traps" for newbies.... They look easy and nice, but can thoroughly mess up vital parts of your operating system. And your bootloader is as vital as it gets.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Issues with customising GRUB

Post by Cosmo. » Tue Aug 16, 2016 6:08 am

The problem with grub customizer is, that it heavily changes the content of /etc/grub.d. If something goes wrong with the program, you will have to recover the changes, possibly you are not able to do that.

Take the value of those customization for a screen, that you will see at every reboot for a few seconds (and does not provide the least productivity advantage): If the computer is a playground, than it is OK, if the computer is needed for productivity, than it can lead to a dead end. Only you can decide, how important the reliability of the computer is for you ......

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Issues with customising GRUB

Post by austin.texas » Tue Aug 16, 2016 6:46 am

Cosmo. wrote:The problem with grub customizer is, that it heavily changes the content of /etc/grub.d. If something goes wrong with the program, you will have to recover the changes, possibly you are not able to do that.
I agree that Grub Customizer should not be used. I described the problem here
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

User avatar
Pjotr
Level 21
Level 21
Posts: 13222
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Issues with customising GRUB

Post by Pjotr » Tue Aug 16, 2016 8:33 am

austin.texas wrote:
Cosmo. wrote:The problem with grub customizer is, that it heavily changes the content of /etc/grub.d. If something goes wrong with the program, you will have to recover the changes, possibly you are not able to do that.
I agree that Grub Customizer should not be used. I described the problem here
Weird, how a tool that provides such an easy graphical user interface, adds such a huge layer of complexity "under the hood". :shock:
Last edited by Pjotr on Tue Aug 16, 2016 2:37 pm, edited 1 time in total.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
chrisuk
Level 5
Level 5
Posts: 593
Joined: Thu Jun 12, 2008 6:16 am

Re: Issues with customising GRUB

Post by chrisuk » Tue Aug 16, 2016 9:58 am

It seems that Grub Customiser is another Bleach Bit... some swear by it's usefulness... others swear about it ;)

(I've used both for years, I've no memory of any problems with either... guess I'm lucky ;))
Chris

Manjaro MATE - MX Linux - LMDE MATE

Post Reply

Return to “Newbie Questions”