This patch adds GRUB_GFXMODE_LINUX user variable to make it easy for
users to set graphical mode before booting Linux.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
2009-03-29  Robert Millan  <r...@aybabtu.com>

	* util/grub-mkconfig.in (GRUB_GFXMODE_LINUX): Export variable.
	* util/grub.d/10_linux.in (linux_entry): If $GRUB_GFXMODE_LINUX
	was set by the user, set mode as per specified before boot.

Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in	(revision 2048)
+++ util/grub.d/10_linux.in	(working copy)
@@ -107,6 +107,11 @@ EOF
 	initrd	${rel_dirname}/${initrd}
 EOF
   fi
+  if [ "$GRUB_GFXMODE_LINUX" ] ; then cat << EOF
+	set gfxmode=$GRUB_GFXMODE_LINUX
+	terminal_output gfxterm
+EOF
+  fi
   cat << EOF
 }
 EOF
Index: util/grub-mkconfig.in
===================================================================
--- util/grub-mkconfig.in	(revision 2047)
+++ util/grub-mkconfig.in	(working copy)
@@ -173,7 +173,8 @@ esac
 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_OUTPUT 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_OUTPUT \
+	GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE GRUB_GFXMODE_LINUX
 
 if test "x${grub_cfg}" != "x"; then
   rm -f ${grub_cfg}.new
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to