bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mod so GRUB works on systems w/ no video card


From: Eric Malkowski
Subject: Re: Mod so GRUB works on systems w/ no video card
Date: Tue, 24 Dec 2002 01:58:41 -0500

Hi -

I found that LILO didn't work w/ no video card for my case, so I switched to
GRUB hoping it would solve my problem, but it didn't.

So I modified GRUB to work w/ no video board (for my situation anyway).  It
appears the very early stages try to just write straight to VGA.  When
there's no card there, things go astray.  I suppose some "smarter" BIOS'
handle this sitution, but my BIOS is an older Phoenix BIOS that doesn't do
anything special to help run without VGA.

All my changes do is prevent GRUB from writing anything to VGA in the very
early boot stages i.e. the "GRUB loading stage 1.5..." message.  This was
accomplished by simply compiling out code that does the printing -- very
simple.

Included is a patch against version 0.92, sorry I haven't had time to create
one against 0.93, but I suspect it'll be trivial to apply to 0.93.  I hope
it helps you out.  I had envisioned making the removal of these messages a
configurable option at GRUB build time.  Perhaps someone can do this and
incorporate it into master GRUB source so folks in situations similar to
mine (and perhaps yours) can select the option to compile out these early
messages that make my box freeze up.  You don't miss much by not seeing the
very early messages.  One the serial is up and going, you still get the nice
menu on your serial port to get your system booted.

Enjoy and Happy Holidays,

--
Eric Malkowski
Principal Software Engineer
ADC - The Broadband Company


diff -urN grub-0.92/stage1/stage1.S grub-0.92-no-vga/stage1/stage1.S
--- grub-0.92/stage1/stage1.S Sun Dec 30 03:23:16 2001
+++ grub-0.92-no-vga/stage1/stage1.S Tue Oct 29 09:49:13 2002
@@ -30,7 +30,18 @@
 #define ABS(x) (x-_start+0x7c00)

  /* Print message string */
+/* E. Malkowski, ADC  Oct 29, 2002
+   Don't print any messages to VGA in stage1 to
+   allow booting of systems w/ no VGA card whatsoever
+   (Cuda embedded cards) */
+
+#if 0
 #define MSG(x) movw $ABS(x), %si; call message
+#else
+#define MSG(x)
+#endif
+
+/* E. Malkowski, ADC End of changes */

  /* XXX: binutils-2.9.1.0.x doesn't produce a short opcode for this. */
 #define MOV_MEM_TO_AL(x) .byte 0xa0;  .word x
diff -urN grub-0.92/stage2/stage1_5.c grub-0.92-no-vga/stage2/stage1_5.c
--- grub-0.92/stage2/stage1_5.c Thu Feb  7 18:28:47 2002
+++ grub-0.92-no-vga/stage2/stage1_5.c Tue Oct 29 09:50:28 2002
@@ -30,7 +30,18 @@
 void
 cmain (void)
 {
+
+  /* E. Malkowski ADC  Oct 29, 2002
+
+     Don't print anything to VGA in stage 1.5
+     to support booting systems that have no
+     VGA card installed (Cuda embedded cards) */
+
+#if 0
   grub_printf ("\n\nGRUB loading, please wait...\n");
+#endif
+
+  /* E. Malkowski ADC End of changes */

   /*
    *  Here load the true second-stage boot-loader.
diff -urN grub-0.92/stage2/start.S grub-0.92-no-vga/stage2/start.S
--- grub-0.92/stage2/start.S Sun Dec 30 03:23:16 2001
+++ grub-0.92-no-vga/stage2/start.S Tue Oct 29 09:53:19 2002
@@ -38,7 +38,20 @@
 #endif /* STAGE1_5 */

  /* Print message string */
+
+/* E. Malkowski ADC  Oct 29, 2002
+
+   Don't print anything to VGA to allow
+   systems w/ no VGA card at all to boot.
+   (Cuda embedded cards have no VGA) */
+
+#if 0
 #define MSG(x) movw $ABS(x), %si; call message
+#else
+#define MSG(x)
+#endif
+
+/* E. Malkowski ADC End of change */

  .file "start.S"

----- Original Message -----
From: NJI Customer Service <address@hidden>
To: <address@hidden>
Sent: Monday, December 23, 2002 4:21 PM
Subject: Mod so GRUB works on systems w/ no video card


> Eric,
>
> I feel this is a critical requirement for grub.
>
> I also feel that grub should work with no video card with no
> special configuration option.
>
> I hope this is possible in the same way that other loaders like lilo
> always work when the video card is removed.
>
> Thank You Kindly
>
> Art
>
> P.S. I see no mention of your mod in 0.93 tarball -- please reply
> asap if the feature is now possible.
>
> --
> NJI Customer Service
> 1-888-432-1654
> address@hidden
>
> -------------------------------------------------
> This mail sent through NJI: http://nji.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]