Zmiana ekranu startowego w GRUB2
Zmiana ekranu startowego w GRUB2
Cześć. Zainspirowany artykułem http://www.ubucentrum.net/2009/08/zmian ... rub-2.html postanowiłem zmienić ekran startowy u siebie. Wszystko idzie jak w opisanym artykule, mam do wyboru te obrazki tga. Zmieniam /etc/grub.d/05_debian_theme. Ale po restarcie brak efektów. Jakieś pomysły?
Po zmianie w 05_debian_theme wydajesz polecenie
?
Kod: Zaznacz cały
update-grub
Kod: Zaznacz cały
#!/bin/bash -e
source /usr/lib/grub/grub-mkconfig_lib
set_blue_theme()
{
cat << EOF
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
EOF
}
# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
for i in {/boot/grub,/usr/share/images/desktop-base}/Hortensia-1.{png,tga} ; do
if is_path_readable_by_grub $i ; then
bg=$i
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
if test -e /boot/grub/${reader}.mod ; then
echo "Found Debian background: `basename ${bg}`" >&2
use_bg=true
break
fi
fi
done
fi
# set the background if possible
if ${use_bg} ; then
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=black/black
set color_highlight=magenta/black
else
EOF
fi
# otherwise, set the traditional Debian blue theme
if ${use_bg} ; then
set_blue_theme | sed -e "s/^/ /g"
echo "fi"
else
set_blue_theme
fi
Powinno być:
Kod: Zaznacz cały
#!/bin/bash -e
source /usr/lib/grub/grub-mkconfig_lib
set_blue_theme()
{
cat << EOF
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
EOF
}
# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Hortensia-1.{png,tga}; do
if is_path_readable_by_grub $i ; then
bg=$i
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
if test -e /boot/grub/${reader}.mod ; then
echo "Found Debian background: `basename ${bg}`" >&2
use_bg=true
break
fi
fi
done
fi
# set the background if possible
if ${use_bg} ; then
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=black/black
set color_highlight=magenta/black
else
EOF
fi
# otherwise, set the traditional Debian blue theme
if ${use_bg} ; then
set_blue_theme | sed -e "s/^/ /g"
echo "fi"
else
set_blue_theme
fi