diff -urN --exclude=.deps grub-0.5.91/docs/commands.txt grub-0.5.91-dk3/docs/commands.txt
--- grub-0.5.91/docs/commands.txt	Mon Feb 22 04:06:26 1999
+++ grub-0.5.91-dk3/docs/commands.txt	Tue Jul 13 23:58:41 1999
@@ -144,6 +144,11 @@
 	Loads an initial ramdisk for a Linux format boot image and sets
 	the appropriate parameters in the Linux setup area in memory.
 
+  --  "vga= <mode>"
+  	Sets the initial video mode for a Linux format boot image. Decimal
+	and hexadecimal mode numbers are understood as well as the special
+	values "normal", "extended" and "ask" (or any abbreviation of them).
+
   --  "install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]"
 	This command is fairly complex, and for detailed examples one
 	should look at the install documentation.  In short, it will
diff -urN --exclude=.deps grub-0.5.91/docs/errors.html grub-0.5.91-dk3/docs/errors.html
--- grub-0.5.91/docs/errors.html	Mon Feb 22 04:06:26 1999
+++ grub-0.5.91-dk3/docs/errors.html	Tue Jul 13 23:59:36 1999
@@ -164,8 +164,8 @@
 a Multiboot kernel.  It only makes sense in this case anyway, as GRUB
 has no idea how to communicate the presence of location of such modules
 to a non-Multiboot-aware kernel.<P>
-<LI><B>23</B> : <B>"Must load Linux kernel before initrd"</B><P>
-This error is returned if the initrd command is used before loading
+<LI><B>23</B> : <B>"Must load Linux kernel before initrd/vga"</B><P>
+This error is returned if the initrd or vga command is used before loading
 a Linux kernel.  Similar to the above error, it only makes sense in that
 case anyway.<P>
 <LI><B>24</B> : <B>"Cannot boot without kernel loaded"</B><P>
diff -urN --exclude=.deps grub-0.5.91/shared_src/cmdline.c grub-0.5.91-dk3/shared_src/cmdline.c
--- grub-0.5.91/shared_src/cmdline.c	Mon Mar 15 03:08:06 1999
+++ grub-0.5.91-dk3/shared_src/cmdline.c	Wed Jul 14 00:11:20 1999
@@ -102,17 +102,19 @@
 
 #ifdef DEBUG
 char commands[] =
- " Possible commands are: \"pause= ...\", \"uppermem= <kbytes>\", \"root= <device>\",
-  \"rootnoverify= <device>\", \"chainloader= <file>\", \"kernel= <file> ...\",
-  \"testload= <file>\", \"read= <addr>\", \"displaymem\", \"impsprobe\", \"fstest\",
-  \"module= <file> ...\", \"modulenounzip= <file> ...\", \"makeactive\", \"boot\", and
-  \"install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]\"\n";
+ " Possible commands are: \"pause= ...\", \"uppermem= <kbytes>\", \"vga= <mode>\",
+ \"root= <device>\", \"rootnoverify= <device>\", \"chainloader= <file>\", 
+ \"kernel= <file> ...\", \"testload= <file>\", \"read= <addr>\", \"displaymem\",
+ \"impsprobe\", \"fstest\", \"module= <file> ...\", \"modulenounzip= <file> ...\",
+ \"makeactive\", \"boot\", and
+ \"install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]\"\n";
 #else  /* DEBUG */
 char commands[] =
- " Possible commands are: \"pause= ...\", \"uppermem= <kbytes>\", \"root= <device>\",
-  \"rootnoverify= <device>\", \"chainloader= <file>\", \"kernel= <file> ...\",
-  \"module= <file> ...\", \"modulenounzip= <file> ...\", \"makeactive\", \"boot\", and
-  \"install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]\"\n";
+ " Possible commands are: \"pause= ...\", \"uppermem= <kbytes>\", \"vga= <mode>\",
+ \"root= <device>\", \"rootnoverify= <device>\", \"chainloader= <file>\", 
+ \"kernel= <file> ...\", \"module= <file> ...\", \"modulenounzip= <file> ...\",
+ \"makeactive\", \"boot\", and
+ \"install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]\"\n";
 #endif /* DEBUG */
 
 #ifdef DEBUG
@@ -347,6 +349,59 @@
       if (type == 'L' || type == 'l')
 	{
 	  load_initrd ();
+	}
+      else
+	errnum = ERR_NEED_LX_KERNEL;
+    }
+  else if (substring("vga", cur_heap) < 1)
+    {
+      if (type == 'L' || type == 'l')
+	{
+	  short sign = 1;
+	  short vgamode = 0;
+	  short *lxptr = (short *) ((char *) LINUX_SETUP 
+			  		+ LINUX_VGA_MODE_OFFSET); 
+
+	  if (*cur_cmdline == '-')
+	    {
+	      sign = -1;
+	      cur_cmdline++;
+	    }
+
+	  if (*cur_cmdline >= '0' && *cur_cmdline <= '9')
+	    {
+	      int tmpmode = 0;
+	      /* vgamode is a short but safe_parse_maxint() handles int,
+	       * so let's close our eyes and use it.
+	       */
+	      if (safe_parse_maxint (&cur_cmdline, &tmpmode))
+		vgamode = sign * (short) tmpmode;
+	    }
+	  else if (sign == 1) /* Don't want "-ask" or the like */
+	    {
+	      short i = 0;
+	      char *special_modes[] = { "normal", "extended", "ask", NULL};
+	      while (special_modes[i])
+		{
+		  /* Note the order. Only partial matches required. */
+		  if (substring(cur_cmdline, special_modes[i++]) < 1)
+	 	    {
+		       vgamode = -i;
+		       break;
+		    }
+		}
+	    }
+	  
+	  if (vgamode != 0)
+	    {
+	       *lxptr = vgamode;
+	       printf (" VGA mode set to 0x%x.\n", (int) vgamode & 0x0000ffff);
+	    }
+	  else
+	    {
+	       printf (" VGA mode unknown. Leaving current setting 0x%x.\n",
+		         (int) *lxptr & 0x0000ffff);
+	    }
 	}
       else
 	errnum = ERR_NEED_LX_KERNEL;
diff -urN --exclude=.deps grub-0.5.91/shared_src/common.c grub-0.5.91-dk3/shared_src/common.c
--- grub-0.5.91/shared_src/common.c	Mon Mar 15 03:08:07 1999
+++ grub-0.5.91-dk3/shared_src/common.c	Tue Jul 13 23:51:16 1999
@@ -61,7 +61,7 @@
   [ERR_FSYS_CORRUPT] = "Inconsistent filesystem structure",
   [ERR_FSYS_MOUNT] = "Cannot mount selected partition",
   [ERR_GEOM] = "Selected cylinder exceeds maximum supported by BIOS",
-  [ERR_NEED_LX_KERNEL] = "Must load Linux kernel before initrd",
+  [ERR_NEED_LX_KERNEL] = "Must load Linux kernel before initrd/vga",
   [ERR_NEED_MB_KERNEL] = "Must load Multiboot kernel before modules",
   [ERR_NO_DISK] = "Selected disk does not exist",
   [ERR_NO_PART] = "No such partition",
diff -urN --exclude=.deps grub-0.5.91/shared_src/shared.h grub-0.5.91-dk3/shared_src/shared.h
--- grub-0.5.91/shared_src/shared.h	Mon Mar 15 03:08:11 1999
+++ grub-0.5.91-dk3/shared_src/shared.h	Tue Jul 13 11:48:48 1999
@@ -78,6 +78,7 @@
 #define LINUX_KERNEL_MAXLEN       0x7F000
 #define LINUX_SETUP_SEG           0x9020
 #define LINUX_INIT_SEG            0x9000
+#define LINUX_VGA_MODE_OFFSET     0x1FA
 #define LINUX_KERNEL_LEN_OFFSET   0x1F4
 #define LINUX_SETUP_LEN_OFFSET    0x1F1
 #define LINUX_SETUP_STACK         0x3FF4
