Problem with upgrading GRUB, with new kernel.

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Problem with upgrading GRUB, with new kernel.

Postby vfafou » Thu May 24, 2012 23:02

Hi!
During upgrading, I faced the following problem:

Generating grub.cfg ...
Found background image: default-splash.png
Found linux image: /boot/kernel-genkernel-x86_64-3.3.0-sabayon
Found initrd image: /boot/initramfs-genkernel-x86_64-3.3.0-sabayon
Found linux image: /boot/kernel-genkernel-x86_64-3.2.0-sabayon
Found initrd image: /boot/initramfs-genkernel-x86_64-3.2.0-sabayon
No volume groups found
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
error: line no: 146
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.


I have attached the grub.cfg.new, in case someone can help me!
Thank you in advance!
vfafou
Young Hen
 
Posts: 33
Joined: Mon May 14, 2012 22:40

Re: Problem with upgrading GRUB, with new kernel.

Postby elliptical_clocks » Mon May 28, 2012 12:45

vfafou wrote:Hi!
During upgrading, I faced the following problem:

Generating grub.cfg ...
Found background image: default-splash.png
Found linux image: /boot/kernel-genkernel-x86_64-3.3.0-sabayon
Found initrd image: /boot/initramfs-genkernel-x86_64-3.3.0-sabayon
Found linux image: /boot/kernel-genkernel-x86_64-3.2.0-sabayon
Found initrd image: /boot/initramfs-genkernel-x86_64-3.2.0-sabayon
No volume groups found
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
error: line no: 146
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.


I have attached the grub.cfg.new, in case someone can help me!
Thank you in advance!


Where is the attachment?

Also, if you want to use grub.cfg.new, you'd have to rename the file to grub.cfg, which will overwrite the existing grub.cfg. It would be in your best interest to first rename the existing grub.cfg to 'grub.cfg.old'. Then rename 'grub.cfg.new' to 'grub.cfg'. You can do this on the command line with the following commands:
Code: Select all
sudo mv /boot/grub/grub.cfg /boot/grub/grub.cfg.old

sudo mv /boot/grub/grub.cfg.new /boot/grub/grub.cfg


Please attach the existing grub.cfg as well as grub.cfg.new. However, grub indicates that the syntax error(s) might exist in a file within the /etc/default/grub or /etc/grub.d directory. If that is the case, then I will find out after examining grub.cfg and grub.cfg.new.
Every time I compile Gentoo I feel like I should sacrifice a goat.

<3 Gentoo, Sabayon, & Arch Linux
elliptical_clocks
Baby Hen
 
Posts: 9
Joined: Wed May 09, 2012 5:54
Location: Chicago, IL, USA

Re: Problem with upgrading GRUB, with new kernel.

Postby vfafou » Tue May 29, 2012 21:37

Hello elliptical_clocks and thank you for your reply!
I tried to attach the file again and the page returns the error "Extension is not allowed". What else can I do in order to send you the file? If it helps, a text copy-paste is following:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_fonts ###
can't open file /usr/share/fonts/unifont/unifont.pcf.gz, index 0: error 1: cannot open resource
### END /etc/grub.d/00_fonts ###

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="${saved_entry}"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768
load_video
# vga= is deprecated, grub2 handles this just fine
# making grub2 res == linux fb res
set gfxpayload=keep
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if sleep --interruptible 0 ; then
set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_distro_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
insmod png
if background_image /boot/grub/default-splash.png ; then
set color_normal=white/black
set color_highlight=magenta/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_distro_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Sabayon GNU/Linux, with Linux x86_64-3.3.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
echo 'Loading Linux x86_64-3.3.0-sabayon ...'
linux /boot/kernel-genkernel-x86_64-3.3.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 console=tty1 quiet dokeymap keymap=gr domdadm resume=swap:UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b real_resume=UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b root=UUID=f279a539-3f1e-44d8-b90e-d40d7c6c2918 docrypt
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.3.0-sabayon
}
menuentry 'Sabayon GNU/Linux, with Linux x86_64-3.3.0-sabayon (recovery mode)' --class sabayon --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
echo 'Loading Linux x86_64-3.3.0-sabayon ...'
linux /boot/kernel-genkernel-x86_64-3.3.0-sabayon ro single init_opts=single init=/linuxrc splash=verbose,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 console=tty1 quiet dokeymap keymap=gr domdadm resume=swap:UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b real_resume=UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b root=UUID=f279a539-3f1e-44d8-b90e-d40d7c6c2918 docrypt
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.3.0-sabayon
}
menuentry 'Sabayon GNU/Linux, with Linux x86_64-3.2.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
echo 'Loading Linux x86_64-3.2.0-sabayon ...'
linux /boot/kernel-genkernel-x86_64-3.2.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 console=tty1 quiet dokeymap keymap=gr domdadm resume=swap:UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b real_resume=UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b root=UUID=f279a539-3f1e-44d8-b90e-d40d7c6c2918 docrypt
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.2.0-sabayon
}
menuentry 'Sabayon GNU/Linux, with Linux x86_64-3.2.0-sabayon (recovery mode)' --class sabayon --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root f279a539-3f1e-44d8-b90e-d40d7c6c2918
echo 'Loading Linux x86_64-3.2.0-sabayon ...'
linux /boot/kernel-genkernel-x86_64-3.2.0-sabayon ro single init_opts=single init=/linuxrc splash=verbose,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 console=tty1 quiet dokeymap keymap=gr domdadm resume=swap:UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b real_resume=UUID=15e486ce-e2a9-4e2c-9bd0-2eef3615f94b root=UUID=f279a539-3f1e-44d8-b90e-d40d7c6c2918 docrypt
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.2.0-sabayon
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
vfafou
Young Hen
 
Posts: 33
Joined: Mon May 14, 2012 22:40

Re: Problem with upgrading GRUB, with new kernel.

Postby elliptical_clocks » Thu May 31, 2012 15:49

Hello,

Your config files do not appear to have anything out of the ordinary. Try running this command to generate a new grub.cfg:
Code: Select all
sudo grub-mkconfig -o /boot/grub/grub.cfg

And if it says 'grub-mkconfig: command not found', then try this:
Code: Select all
sudo grub2-mkconfig -o /boot/grub/grub.cfg


If neither of those solutions work, then purge (remove) grub and reinstall, which should give you a fresh set of config files.
Every time I compile Gentoo I feel like I should sacrifice a goat.

<3 Gentoo, Sabayon, & Arch Linux
elliptical_clocks
Baby Hen
 
Posts: 9
Joined: Wed May 09, 2012 5:54
Location: Chicago, IL, USA

Re: Problem with upgrading GRUB, with new kernel.

Postby cwright80 » Thu May 31, 2012 21:29

i might be way off here, somebody correct me if im wrong, maybe config in /etc?? #equo conf update
cwright80
Baby Hen
 
Posts: 13
Joined: Sun Apr 15, 2012 3:15


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 3 guests

cron