LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   GRUB2 and background image (https://www.linuxquestions.org/questions/slackware-14/grub2-and-background-image-4175432321/)

scorpion77 10-15-2012 12:05 PM

GRUB2 and background image
 
Hi, I just installed GRUB2 (slackbuilds.org package) on Slackware64 14. To set up grub I followed the instructions found on this page: https://wiki.archlinux.org/index.php/GRUB2. Everything is ok, but grub is not showing the background image. Just for curiosity, I opened the grub prompt and I typed background_color 1. I got this error: error: no video mode activated. It's weird, because in my grub.cfg video modes are inserted. Maybe it's a compatibility issue with NVIDIA proprietary drivers? I have a GeForce GTX 570.

Thanks for your help.

Scorpion77

ReaperX7 10-15-2012 03:10 PM

Look for this line in /etc/default/grub:

Quote:

"GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and change it to this:

Code:

"GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792"
and re-run

Code:

grub-mkconfig -o /boot/grub/grub.cfg
or

Code:

grub-update
Should work then.

scorpion77 10-15-2012 04:44 PM

Quote:

Originally Posted by ReaperX7 (Post 4806445)
Look for this line in /etc/default/grub:



and change it to this:

Code:

"GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792"
and re-run

Code:

grub-mkconfig -o /boot/grub/grub.cfg
or

Code:

grub-update
Should work then.


I already did it. Unfortunately it does not work. The video mode is passed to the linux kernel, but the boot menu is always set to 640x480 with no background image. I post my grub.cfg:

Code:

#
# 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_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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 {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
else
  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
fi
    font="/usr/share/grub/unifont.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
else
  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
fi
insmod jpeg
background_image -m stretch /boot/grub/slack-background.jpg
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Slackware-14.0 GNU/Linux' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos6'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
        else
          search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
        fi
        echo        'Caricamento Linux 3.2.29...'
        linux        /boot/vmlinuz-huge-3.2.29 root=/dev/sda6 ro  quiet splash vga=792
}
submenu 'Opzioni avanzate per Slackware-14.0 GNU/Linux' $menuentry_id_option 'gnulinux-advanced-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-advanced-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-huge-3.2.29 root=/dev/sda6 ro  quiet splash vga=792
        }
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29 (modalità ripristino)' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-recovery-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-huge-3.2.29 root=/dev/sda6 ro single
        }
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-advanced-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-generic-3.2.29 root=/dev/sda6 ro  quiet splash vga=792
        }
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29 (modalità ripristino)' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-recovery-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-generic-3.2.29 root=/dev/sda6 ro single
        }
}

### 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 ###
menuentry 'Windows 7 (loader) (su /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-D48471A584718AAE' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  D48471A584718AAE
        else
          search --no-floppy --fs-uuid --set=root D48471A584718AAE
        fi
        chainloader +1
}
### 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  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


ReaperX7 10-15-2012 08:11 PM

Can you post a copy of your /etc/default/grub file?

imprazaguy 10-15-2012 10:35 PM

The problem is caused by this reason:
In grub 2.00, if you don't set GRUB_FONT, it will generate config that prefers default font name "unicode.pf2"
However, the SlackBuild script on SBo uses unifont.pf2 instead of unicode.pf2.
Read the generated grub.cfg. You find that if loading font fail, it won't execute load_video.
This is the problem.

The possible solutions are:
1) change SlackBuild script to use "unicode.pf2"
2) use GRUB_FONT

I personally test method 1 and it works.
Remember to rerun grub-install, because it'll install the font to /boot

scorpion77 10-16-2012 10:40 AM

Quote:

Originally Posted by imprazaguy (Post 4806673)
The problem is caused by this reason:
In grub 2.00, if you don't set GRUB_FONT, it will generate config that prefers default font name "unicode.pf2"
However, the SlackBuild script on SBo uses unifont.pf2 instead of unicode.pf2.
Read the generated grub.cfg. You find that if loading font fail, it won't execute load_video.
This is the problem.

The possible solutions are:
1) change SlackBuild script to use "unicode.pf2"
2) use GRUB_FONT

I personally test method 1 and it works.
Remember to rerun grub-install, because it'll install the font to /boot


I have just recompiled grub2 modifying grub2.SlackBuild. Still not working. I post the source of the slackbuild:
Code:

#!/bin/sh

# Slackware build script for grub2

# Written by crocket (crockabiscuit@gmail.com)

PRGNAM=grub2
VERSION=${VERSION:-2.00}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

ARCNAM=grub

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
      *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

FONT_SIZE=${FONT_SIZE:-19}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  # -fPIC generates errors with grub2 1.99
  # SLKCFLAGS="-O2 -fPIC"
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $ARCNAM-$VERSION
tar xvf $CWD/$ARCNAM-$VERSION.tar.xz
cd $ARCNAM-$VERSION
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

# We use initrd.gz here, so look for it too
patch -p1 < $CWD/initrd_naming.patch

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --infodir=/usr/info \
  --mandir=/usr/man \
  --build=$ARCH-slackware-linux \

make
make install DESTDIR=$PKG

mkdir -p $PKG/etc/default
cat $CWD/etc.default.grub > $PKG/etc/default/grub

find $PKG/usr/bin | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/sbin | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# convert gnu-unicode to a font useable by grub2 gfxterm.
$PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/unicode.pf2 -abv \
  -s $FONT_SIZE /usr/share/fonts/TTF/unicode.ttf

rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $(find $PKG/usr/man -type l); do ln -s $(readlink $i).gz $i.gz; rm $i; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

# Add .new extension to all configuration files
# and add them to doinst.sh
for file in $(find $PKG/etc -type f -perm -444)
do
  mv $file $file.new
  # This leads grub-mkconfig to abnormal behaviors.
  # chmod -x $file.new
  echo "config ${file#$PKG/}.new" >> $PKG/install/doinst.sh
done

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

Here it is the new grub.cfg:
Code:

#
# 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_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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 {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
else
  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
else
  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
fi
insmod jpeg
background_image -m stretch /boot/grub/slack-background.jpg
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Slackware-14.0 GNU/Linux' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos6'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
        else
          search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
        fi
        echo        'Caricamento Linux 3.2.29...'
        linux        /boot/vmlinuz-huge-3.2.29 root=/dev/sda6 ro  quiet splash vga=792
}
submenu 'Opzioni avanzate per Slackware-14.0 GNU/Linux' $menuentry_id_option 'gnulinux-advanced-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-advanced-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-huge-3.2.29 root=/dev/sda6 ro  quiet splash vga=792
        }
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29 (modalità ripristino)' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-recovery-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-huge-3.2.29 root=/dev/sda6 ro single
        }
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-advanced-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-generic-3.2.29 root=/dev/sda6 ro  quiet splash vga=792
        }
        menuentry 'Slackware-14.0 GNU/Linux, con Linux 3.2.29 (modalità ripristino)' --class slackware-14.0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.29-recovery-7e8a3222-43c9-4f72-98bb-c52e1b8656b1' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos6'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                else
                  search --no-floppy --fs-uuid --set=root 7e8a3222-43c9-4f72-98bb-c52e1b8656b1
                fi
                echo        'Caricamento Linux 3.2.29...'
                linux        /boot/vmlinuz-generic-3.2.29 root=/dev/sda6 ro single
        }
}

### 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 ###
menuentry 'Windows 7 (loader) (su /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-D48471A584718AAE' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  D48471A584718AAE
        else
          search --no-floppy --fs-uuid --set=root D48471A584718AAE
        fi
        chainloader +1
}
### 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  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Any idea to solve?

scorpion77 10-16-2012 11:48 AM

A little update: I entered the grub command prompt and I typed this command: loadfont /usr/share/grub/unicode.pf2 and I got this error: error: invalid font file: missing some required data. Same error with loadfont /boot/grub/fonts/unicode.pf2.

I hope this is useful.

scorpion77 10-16-2012 12:23 PM

I solved! The font unicode was defective. I created arial.pf2 from windows font Arial and I had the background image. There's only a little issue: the line which delimits the edge of the screen is made by question marks. Probably because the Arial set not includes lines.

Thank you for the clue about font. Obviously it will be better if GRUB2 warns about issues printing a error code in the boot screen.

Scorpion77


All times are GMT -5. The time now is 07:25 PM.