Am Donnerstag, den 31.07.2008, 13:58 +0200 schrieb spamgrinder:

> My only change in 00_header script is "set gfxmode=1024x768". It
> overwrites default 640x480.
> 
> I would like to keep the gfxmode variable in /etc/default/grub.

Attached is a patch which adds GRUB_GFXMODE to /etc/default/grub
--- /etc/default/grub	2008-07-31 16:34:38.000000000 +0200
+++ /etc/default/grub	2008-07-31 16:33:23.000000000 +0200
@@ -10,3 +10,8 @@
 
 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
 #GRUB_DISABLE_LINUX_UUID=true
+
+# The resolution used on graphical terminal
+# note that you can use only modes which your graphic card supports with vbe
+# you can see them in grub with command vbeinfo
+GRUB_GFXMODE=640x480
--- /etc/grub.d/00_header	2008-07-31 16:23:09.000000000 +0200
+++ /etc/grub.d/00_header	2008-07-31 16:25:02.000000000 +0200
@@ -31,6 +31,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
 
 cat << EOF
 set default=${GRUB_DEFAULT}
@@ -43,7 +44,7 @@
     prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`
     cat << EOF
 if font `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
-  set gfxmode=640x480
+  set gfxmode=${GRUB_GFXMODE}
   insmod gfxterm
   insmod vbe
   terminal gfxterm
--- /usr/sbin/update-grub	2008-07-31 16:32:05.000000000 +0200
+++ /usr/sbin/update-grub	2008-07-28 12:51:00.000000000 +0200
@@ -152,7 +152,7 @@
 export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
 
 # These are optional, user-defined variables.
-export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE
+export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID
 
 exec > ${grub_cfg}.new
 

Reply via email to