[2052] 2009-03-30 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2052
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2052
Author:   robertmh
Date:     2009-03-30 22:22:31 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
2009-03-30  Robert Millan  <[email protected]>

        * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
        checking for abi version.  Improve error messages on BIOS to notify
        user about `linux16' command.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/loader/i386/linux.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-03-30 22:20:16 UTC (rev 2051)
+++ trunk/grub2/ChangeLog	2009-03-30 22:22:31 UTC (rev 2052)
@@ -1,3 +1,9 @@
+2009-03-30  Robert Millan  <[email protected]>
+
+	* loader/i386/linux.c (grub_cmd_linux): Check for zImage before
+	checking for abi version.  Improve error messages on BIOS to notify
+	user about `linux16' command.
+
 2009-03-29  Vladimir Serbinenko  <[email protected]>
 
 	Leak fixes

Modified: trunk/grub2/loader/i386/linux.c
===================================================================
--- trunk/grub2/loader/i386/linux.c	2009-03-30 22:20:16 UTC (rev 2051)
+++ trunk/grub2/loader/i386/linux.c	2009-03-30 22:22:31 UTC (rev 2052)
@@ -492,18 +492,26 @@
       goto fail;
     }
 
-  /* FIXME: Is 2.02 recent enough for 32-bit boot?  */
-  if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
-      || grub_le_to_cpu16 (lh.version) < 0x0203)
+  if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL))
     {
-      grub_error (GRUB_ERR_BAD_OS, "too old version");
+      grub_error (GRUB_ERR_BAD_OS, "zImage doesn't support 32-bit boot"
+#ifdef GRUB_MACHINE_PCBIOS
+		  " (try with `linux16')"
+#endif
+		  );
       goto fail;
     }
 
-  /* zImage doesn't support 32-bit boot.  */
-  if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL))
+  /* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
+     still not support 32-bit boot.  */
+  if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
+      || grub_le_to_cpu16 (lh.version) < 0x0203)
     {
-      grub_error (GRUB_ERR_BAD_OS, "zImage is not supported");
+      grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot"
+#ifdef GRUB_MACHINE_PCBIOS
+		  " (try with `linux16')"
+#endif
+		  );
       goto fail;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.