grub.cfg gets saved as grub.cfg.new so is not ACTIVE

Asked by Andy on 2011-10-20

Running version 2.2.1 earlier version worked okay. Now if I make any changes using grub-customizer it saves the grub.cfg. file as grub.cfg.new. This means of course that the file is not active. This is on Ubuntu 11.04 (64 bit version) not that that should make any difference.

On start up it does ask for my password so it is running as root, in fact it has to be to write to the /boot/grub directory!

I'm using the launchpad ppa to get the latest versions.

Thanks - andy

Question information

Language:
English Edit question
Status:
Answered
For:
Grub Customizer Edit question
Assignee:
No assignee Edit question
Last query:
2011-10-21
Last reply:
2011-10-21

Grub Customizer doesn't write the grub.cfg directly. After you've clicked the save button, your changes will be written to the /etc/default/grub and /etc/grub.d - and then, Grub Customizer simply runs update-grub which generates this file finally. This command may be broken on your system.

Please run `sudo update-grub` using a terminal and tell me its output.

Andy (andylhart) said : #2

hi Daniel

here is the output of update-grub

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-11-generic
Found initrd image: /boot/initrd.img-2.6.38-11-generic
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found Windows Vista (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
error: syntax error.
error: Incorrect command.
error: syntax error.
error: line no: 116
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

here is an extract from the grub.cfg.new

======================
103: menuentry "Ubuntu, with Linux 2.6.38-11-generic (recovery mode)"
--class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fb7fc5a4-e1a2-4d0c-ad6a-70c93546779d
echo 'Loading Linux 2.6.38-11-generic ...'
linux /boot/vmlinuz-2.6.38-11-generic
root=UUID=fb7fc5a4-e1a2-4d0c-ad6a-70c93546779d ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-11-generic
}
submenu "Previous Linux versions"{
116: }
### END /etc/grub.d/10_linux_proxy ###

============================

I have manually added the line numbers. There does not appear to be any
error here. So I have attached the entire files both the .cfg and .cfg.new
and /etc/default/grub

thanks for your time

Andrew Hart C.Eng. MRINA
amateur radio calls G8VTV / VE3NVK locator FN25bh

28, Chimo Drive, Kanata, ON, K2L 1A5 Canada

tel: 613 592 5043

The content of this message is *NOT* intended for the public, and is a
private communication.

On 20 October 2011 17:40, Daniel Richter <
<email address hidden>> wrote:

> Your question #175491 on Grub Customizer changed:
> https://answers.launchpad.net/grub-customizer/+question/175491
>
> Status: Open => Needs information
>
> Daniel Richter requested more information:
> Grub Customizer doesn't write the grub.cfg directly. After you've
> clicked the save button, your changes will be written to the
> /etc/default/grub and /etc/grub.d - and then, Grub Customizer simply
> runs update-grub which generates this file finally. This command may be
> broken on your system.
>
> Please run `sudo update-grub` using a terminal and tell me its output.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/grub-customizer/+question/175491
>
> You received this question notification because you asked the question.
>

ah ok, I see it.

Grub doesn't allow empty submenus, but the Grub Customizer Proxy writes them anyway. I'll fix this.

This is what you can do, until I release the fix: use Grub Customizer to disable the whole submenu ("Previous Linux versions"), instead of its contents only.

Can you help with this problem?

Provide an answer of your own, or ask Andy for more information if necessary.

To post a message you must log in.