The new Grub configuration cannot be saved

Bug #1614753 reported by Roger Peartree
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Grub Customizer
New
Undecided
Unassigned

Bug Description

In Linux Mint 18 "Sarah" Cinnamon x64 I get the following error when trying to save my customized version of grub.cfg:
<code>failed running 'grub-mkconfig -o "/boot/grub/grub.cfg"' output:
Generating grub configuration file ...
using custom appearance settings
Found background image: /media/roger/Data/0 - Linux/Boot tga's, & Login Face/BlueEyeGirl.tga
Found linux image: /boot/vmlinuz-4.4.0-34-generic
Found initrd image: /boot/initrd.img-4.4.0-34-generic
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
File descriptor 9 (/proc/5723/mounts) leaked on lvs invocation. Parent PID 8549: /bin/sh
Found Windows 7 (loader) on /dev/sda1
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 342
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<code>
I'm attaching the text above, the grub.cfg file and the grub.cfg.new files as a .zip file
Any help with this bug will be much appreciated, thanks.

Revision history for this message
Roger Peartree (pereiradorogerio) wrote :
Revision history for this message
Daniel Richter (danielrichter2007) wrote :

It's the old known problem of /etc/grub.d/05_debian_theme which is not quoting the background image path in any way. It's not a bug of grub customizer, it's a bug of debians version of grub2.

Make sure your selected background image path has no spaces, no & and no '.

Another problem that will come up:
There's a /etc/grub.d/06_mint_theme. This overwrites selected colors. So better remove it or disable its "script code" entry using grub customizer (previously show these at View -> Show placeholders).

Revision history for this message
Roger Peartree (pereiradorogerio) wrote : Re: [Bug 1614753] Re: The new Grub configuration cannot be saved

Many thanks. It's fixed now. I removed the mint_theme_06 placeholders (yes
there were 2!) from Grub Customizer and to make sure I went to /etc/grub.d
and renamed that file with a bak extension. No need to touch
debian_theme_05 because you don't say to remove it and I'm not sure if it's
needed. Also gave a simpler path to background image:
/usr/share/images/grub/ImageNameNoSpaces.tga. This /images folder doesn't
exist by default so I created it and also created /grub inside that one. I
found out by looking at other people's themes that you should convert your
background image to the tga format (just use GIMP). That way it will stay
there. Of course, until the next Grub update :-)
Many thanks again for your precious help and can't thank you enough for
your amazing work.

On Aug 25, 2016 6:05 PM, "Daniel Richter" <email address hidden> wrote:

> It's the old known problem of /etc/grub.d/05_debian_theme which is not
> quoting the background image path in any way. It's not a bug of grub
> customizer, it's a bug of debians version of grub2.
>
> Make sure your selected background image path has no spaces, no & and no
> '.
>
> Another problem that will come up:
> There's a /etc/grub.d/06_mint_theme. This overwrites selected colors. So
> better remove it or disable its "script code" entry using grub customizer
> (previously show these at View -> Show placeholders).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1614753
>
> Title:
> The new Grub configuration cannot be saved
>
> Status in Grub Customizer:
> New
>
> Bug description:
> In Linux Mint 18 "Sarah" Cinnamon x64 I get the following error when
> trying to save my customized version of grub.cfg:
> <code>failed running 'grub-mkconfig -o "/boot/grub/grub.cfg"' output:
> Generating grub configuration file ...
> using custom appearance settings
> Found background image: /media/roger/Data/0 - Linux/Boot tga's, & Login
> Face/BlueEyeGirl.tga
> Found linux image: /boot/vmlinuz-4.4.0-34-generic
> Found initrd image: /boot/initrd.img-4.4.0-34-generic
> Found linux image: /boot/vmlinuz-4.4.0-31-generic
> Found initrd image: /boot/initrd.img-4.4.0-31-generic
> Found memtest86+ image: /boot/memtest86+.elf
> Found memtest86+ image: /boot/memtest86+.bin
> File descriptor 9 (/proc/5723/mounts) leaked on lvs invocation. Parent
> PID 8549: /bin/sh
> Found Windows 7 (loader) on /dev/sda1
> error: out of memory.
> error: syntax error.
> error: Incorrect command.
> error: syntax error.
> Syntax error at line 342
> 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<code>
> I'm attaching the text above, the grub.cfg file and the grub.cfg.new
> files as a .zip file
> Any help with this bug will be much appreciated, thanks.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/grub-customizer/+bug/1614753/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.