Package: grub-pc
Version: 1.98~20100101-1
Severity: wishlist
Tags: patch
Hello,
I have created a patch, so update-grub will automaticly create a splashimage
of the size, that is set in /etc/default/grub.
Should I send this patch to the grub developers?
hefee
--- System information. ---
Architecture: i386
Kernel: Linux 2.6.32-2.slh.4-sidux-686
Debian Release: squeeze/sid
500 unstable/snapshots stable unofficial.debian-maintainers.org
500 unstable www.debian-multimedia.org
500 unstable sidux.wuertz.org
500 unstable sidux.com
500 unstable ftp.debian.org
500 unstable deb.opera.com
500 testing ftp.debian.org
500 stable/backports stable unofficial.debian-maintainers.org
1 experimental ftp.debian.org
--- Package information. ---
Depends (Version) | Installed
===================================-+-====================
libc6 (>= 2.3) | 2.10.2-3
debconf (>= 0.5) | 1.5.28
OR debconf-2.0 |
grub-common (= 1.98~20100101-1) | 1.98~20100101-1
ucf | 3.0025
Package's Recommends field is empty.
Suggests (Version) | Installed
===========================-+-===========
desktop-base (>= 4.0.6) |
--- Output from package bug script ---
*********************** BEGIN /proc/mounts
/dev/mapper/vg-root / ext4 rw,noatime,errors=remount-ro,barrier=0,data=ordered
0 0
/dev/sda1 /boot ext2 rw,noatime,errors=continue 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/device.map
(hd0) /dev/sda
*********************** END /boot/grub/device.map
*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
set default=0
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
if loadfont /grub/unicode.pf2 ; then
set gfxmode=1024x768
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
set locale_dir=/boot/grub/locale
set lang=de
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
insmod tga
if background_image /grub/splashimages/Hortensia-1-1024x768.tga ; then
set color_normal=black/black
set color_highlight=white/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, with Linux 2.6.32-2.slh.4-sidux-686" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
linux //vmlinuz-2.6.32-2.slh.4-sidux-686 root=/dev/mapper/vg-root ro
quiet
vga=794 quiet
initrd //initrd.img-2.6.32-2.slh.4-sidux-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-2.slh.4-sidux-686 (recovery
mode)" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
linux //vmlinuz-2.6.32-2.slh.4-sidux-686 root=/dev/mapper/vg-root ro
single
quiet vga=794
initrd //initrd.img-2.6.32-2.slh.4-sidux-686
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### 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 ###
*********************** END /boot/grub/grub.cfg
--- /etc/grub.d/05_debian_theme 2010-01-04 16:59:42.123993633 +0100
+++ /etc/grub.d/05_debian_theme.new 2010-01-04 16:31:47.916994483 +0100
@@ -4,6 +4,7 @@
# this allows desktop-base to override our settings
f=/usr/share/desktop-base/grub_background.sh
+WALLPAPER_PATH=/boot/grub/splashimages/
if test -e ${f} ; then
source ${f}
else
@@ -23,7 +24,12 @@
# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
- for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
+ if [ ! -e ${WALLPAPER_PATH}`basename ${WALLPAPER}` ] && [ ! `is_path_readable_by_grub ${WALLPAPER}` ] ; then
+ echo "File is not readable by grub -> copying file to ${WALLPAPER_PATH}" >&2
+ mkdir -p ${WALLPAPER_PATH}
+ cp ${WALLPAPER} ${WALLPAPER_PATH}`basename ${WALLPAPER}`
+ fi
+ for i in ${WALLPAPER_PATH}`basename ${WALLPAPER}` ${WALLPAPER}; do
if is_path_readable_by_grub $i ; then
bg=$i
case ${bg} in
@@ -43,6 +49,17 @@
# set the background if possible
if ${use_bg} ; then
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
+
+ #resize the image, if nessesary
+ if [ "x${GRUB_GFXRESIZE}" != "x" ]; then
+ extension="${bg##*.}"
+ newname=${WALLPAPER_PATH}/`basename ${bg} .${extension}`-${GRUB_GFXMODE}.${extension}
+ if [ ! -e ${newname} ] ; then
+ echo "resizing splashimage...">&2
+ convert ${bg} -resize ${GRUB_GFXMODE}! ${newname}
+ fi
+ bg=${newname}
+ fi
cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
--- /etc/default/grub 2010-01-04 17:01:42.231995940 +0100
+++ /etc/default/grub.new 2010-01-04 17:02:58.290995324 +0100
@@ -20,3 +20,7 @@
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"
+
+#Resizing the splashimage, if one is available to the right size
+#needs the command `convert`
+#GRUB_GFXRESIZE=true
--- /usr/sbin/grub-mkconfig 2010-01-01 12:13:03.000000000 +0100
+++ /usr/sbin/grub-mkconfig.new 2010-01-04 16:33:01.603994215 +0100
@@ -220,6 +220,7 @@
GRUB_DISABLE_LINUX_UUID \
GRUB_DISABLE_LINUX_RECOVERY \
GRUB_GFXMODE \
+ GRUB_GFXRESIZE \
GRUB_DISABLE_OS_PROBER
if test "x${grub_cfg}" != "x"; then