Bug#562036: grub-pc: Add support for GFXPAYLOAD same as for GFXMODE
A message that is not in the archive (sent off-list or not yet received): [email protected]
---------- Forwarded message ----------
From: Jan Muszynski <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Tue, 22 Dec 2009 01:12:54 -0500
Subject: Bug#562036: grub-pc: Add support for GFXPAYLOAD same as for GFXMODE
Package: grub-pc
Version: 1.98~20091210-1
Severity: normal
Tags: patch
Currently console resolution defaults to 640x480, even if GFXMODE is set. Changing this requires modifying the scripts in /etc/grub.d, which is not very user friendly and also makes it a pain when the scripts are changed due to updates.
Instead I would propose to add support for GFXPAYLOAD in /etc/default/grub. Attached patch should do the job. You'll notice I switched the -e from the shebang line to an explicit set -e For why see:
http://blog.andrew.net.au/2009/11/20#dash_e_shebang_bad
Need anything further, just holler. I'll have a few more bug reports (some with patches)
coming up in the near future. I'll wait for the version currently in incoming first.
(For starters the custom menu entry listed below is ignored, but I need to look at things closer first)
-jcm
----- Start Patches -----
etc/grub.d/00_header.new 2009-12-21 23:27:41.743930730 -0500 renamed from etc/grub.d/00_header 2009-12-14 09:05:26.000000000 -0500 +2 -1
@@ -1,4 +1,5 @@ -#! /bin/sh -e +#! /bin/sh +set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
@@ -36,6 +37,7 @@
if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
+if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=${GRUB_GFXMODE} ; fi cat << EOF
set default=${GRUB_DEFAULT}
@@ -78,6 +80,7 @@
cat << EOF
if loadfont make_system_path_relative_to_its_root ${GRUB_FONT_PATH} ; then set gfxmode=${GRUB_GFXMODE}
+ set gfxpayload=${GRUB_GFXPAYLOAD}
insmod gfxterm
insmod ${GRUB_VIDEO_BACKEND}
if terminal_output gfxterm ; then true ; else
usr/sbin/grub-mkconfig.new 2009-12-21 23:28:06.119931605 -0500 renamed from usr/sbin/grub-mkconfig 2009-12-14 09:05:26.000000000 -0500 +2 -1
@@ -1,4 +1,5 @@ -#! /bin/sh -e +#! /bin/sh +set -e
# Generate grub.cfg by inspecting /boot contents.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc. @@ -224,6 +225,7 @@
GRUB_DISABLE_LINUX_UUID \
GRUB_DISABLE_LINUX_RECOVERY \
GRUB_GFXMODE \
+ GRUB_GFXPAYLOAD \
GRUB_DISABLE_OS_PROBER
if test "x${grub_cfg}" != "x"; then
usr/share/grub/default/grub.new 2009-12-21 23:55:39.510931300 -0500 renamed from usr/share/grub/default/grub 2009-12-09 18:47:36.000000000 -0500 +0 -0
@@ -15,6 +15,10 @@
# you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480
+# The resolution used on the console. The default will be the same as GRUB_GFXMODE
+# The same modes as for GRUB_GFXMODE are valid here, with the addition of the "keep" keyword.
+#GRUB_GFXPAYLOAD=keep
+
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true
----- End Patches -----
-- Package-specific info:
*********************** BEGIN /proc/mounts /dev/mapper/serenityVG1-debian--root / ext4 rw,noatime,errors=remount-ro,barrier=0,nodelalloc,stripe=48,data=journal 0 0/dev/sde1 /boot ext3 rw,noatime,errors=continue,user_xattr,acl,data=journal 0 0 /dev/mapper/serenityVG2-home /home ext4 rw,noatime,barrier=0,nodelalloc,stripe=32,data=journal 0 0 /dev/mapper/serenityVG1-postgres.data /srv/postgresql ext4 rw,noatime,barrier=0,stripe=48,data=writeback 0 0 /dev/mapper/serenityVG1-postgres.xlog /srv/postgresql/8.4/poker/pg_xlog ext4 rw,noatime,barrier=0,data=writeback 0 0/dev/sda4 /var/lib/backuppc ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered 0 0/dev/sdb5 /media/music ext4 rw,noatime,barrier=1,nodelalloc,data=journal 0 0 /dev/sde3 /media/music.work ext4 rw,noatime,barrier=1,nodelalloc,data=journal 0 0 *********************** END /proc/mounts
*********************** BEGIN /boot/grub/device.map (hd0) /dev/sde
(hd1) /dev/sda
(hd2) /dev/sdb
(hd3) /dev/sdc
(hd4) /dev/sdd
*********************** 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 f08bb834-f81c-4eac-bdf5-1847c411ad30 if loadfont /grub/unicode.pf2 ; then
set gfxmode=640x480
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=en insmod gettext set timeout=5 ### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/00_header.new ###
set default=0
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 if loadfont /grub/unicode.pf2 ; then
set gfxmode=640x480
set gfxpayload=640x480
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=en insmod gettext set timeout=5 ### END /etc/grub.d/00_header.new ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 insmod png
if background_image /grub/moreblue-orbit-grub.png ; then
set color_normal=black/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_debian_theme ###
### BEGIN /etc/grub.d/05_debian_theme.new ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 insmod png
if background_image /grub2-background/MilkyWay.png ; then set color_normal=yellow/black
set color_highlight=light-red/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme.new ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "GNU/Linux, with Linux 2.6.32.2+00.amd64.fbcondecor" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32.2+00.amd64.fbcondecor root=/dev/mapper/serenityVG1-debian--root ro
initrd //initrd.img-2.6.32.2+00.amd64.fbcondecor
}
menuentry "GNU/Linux, with Linux 2.6.32.2+00.amd64.fbcondecor (recovery mode)" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32.2+00.amd64.fbcondecor root=/dev/mapper/serenityVG1-debian--root ro single
initrd //initrd.img-2.6.32.2+00.amd64.fbcondecor
}
menuentry "GNU/Linux, with Linux 2.6.32.1+00.amd64.fbcondecor" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32.1+00.amd64.fbcondecor root=/dev/mapper/serenityVG1-debian--root ro
initrd //initrd.img-2.6.32.1+00.amd64.fbcondecor
}
menuentry "GNU/Linux, with Linux 2.6.32.1+00.amd64.fbcondecor (recovery mode)" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32.1+00.amd64.fbcondecor root=/dev/mapper/serenityVG1-debian--root ro single
initrd //initrd.img-2.6.32.1+00.amd64.fbcondecor
}
menuentry "GNU/Linux, with Linux 2.6.32-trunk-amd64" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32-trunk-amd64 root=/dev/mapper/serenityVG1-debian--root ro
initrd //initrd.img-2.6.32-trunk-amd64
}
menuentry "GNU/Linux, with Linux 2.6.32-trunk-amd64 (recovery mode)" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32-trunk-amd64 root=/dev/mapper/serenityVG1-debian--root ro single
initrd //initrd.img-2.6.32-trunk-amd64
}
menuentry "GNU/Linux, with Linux 2.6.32+01.amd64.fbcondecor" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32+01.amd64.fbcondecor root=/dev/mapper/serenityVG1-debian--root ro
initrd //initrd.img-2.6.32+01.amd64.fbcondecor
}
menuentry "GNU/Linux, with Linux 2.6.32+01.amd64.fbcondecor (recovery mode)" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux //vmlinuz-2.6.32+01.amd64.fbcondecor root=/dev/mapper/serenityVG1-debian--root ro single
initrd //initrd.img-2.6.32+01.amd64.fbcondecor
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30 linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ### menuentry "Fedora release 12 (Constantine) (on /dev/mapper/serenityVG1-fedora.root)" {
set root=(serenityVG1-fedora.root) linux /boot/vmlinuz-2.6.31.5-127.fc12.x86_64 root=/dev/mapper/serenityVG1-fedora.root
}
menuentry "Fedora release 12 (Constantine) (on /dev/mapper/serenityVG1-fedora.root)" {
set root=(serenityVG1-fedora.root) linux /boot/vmlinuz-2.6.31.6-145.fc12.x86_64 root=/dev/mapper/serenityVG1-fedora.root
}
### 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.
menuentry "Fedora (2.6.31.5-127.fc12.x86_64)" {
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set f08bb834-f81c-4eac-bdf5-1847c411ad30
kernel /fedora/vmlinuz-2.6.31.5-127.fc12.x86_64 ro
root=/dev/mapper/serenityVG1-fedora.root hpet=force clocksource=hpet
printk.time=1 noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16
KEYBOARDTYPE=pc KEYTABLE=us rhgb
initrd /fedora/initramfs-2.6.31.5-127.fc12.x86_64.img
}
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (900, 'testing'), (100, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32.2+00.amd64.fbcondecor (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-pc depends on:
ii debconf [debconf-2.0] 1.5.28 Debian configuration management sy ii grub-common 1.98~20091210-1 GRand Unified Bootloader, version ii libc6 2.10.2-2 GNU C Library: Shared libraries ii ucf 3.0025 Update Configuration File: preserv
grub-pc recommends no packages.
Versions of packages grub-pc suggests:
ii desktop-base 5.0.5 common files for the Debian Deskto
-- debconf information:
grub2/kfreebsd_cmdline:
* grub2/linux_cmdline: hpet=force clocksource=hpet printk.time=1 splash=verbose,theme:earthrise
* grub-pc/chainload_from_menu.lst: true grub-pc/kopt_extracted: true grub-pc/postrm_purge_boot_grub: false grub2/kfreebsd_cmdline_default: quiet
* grub2/linux_cmdline_default:
* grub-pc/install_devices: /dev/sdd