Tue 07 Feb 2006 10:50:01 PM UTC, comment #6:
There is a bug in stage2/char_io.c where addresses are treated as signed, causing this issue as well as similar ones with memdisk on systems with a large amount of memory. I'm attacing a patch below against grub 0.97:
diff -burN grub-0.97/stage2/char_io.c grub-0.97-patched/stage2/char_io.c
--- grub-0.97/stage2/char_io.c 2005-02-01 15:51:23.000000000 -0500
+++ grub-0.97-patched/stage2/char_io.c 2006-02-07 16:42:49.674855440 -0500
@@ -1175,7 +1175,7 @@
#endif /* ! STAGE1_5 */
int
-memcheck (int addr, int len)
+memcheck (unsigned int addr, int len)
{
#ifdef GRUB_UTIL
auto int start_addr (void);
@@ -1220,7 +1221,7 @@
void *
grub_memmove (void to, const void from, int len)
{
- if (memcheck ((int) to, len))
+ if (memcheck ((unsigned int) to, len))
{
/* This assembly code is stolen from
linux-2.2.2/include/asm-i386/string.h. This is not very fast
@@ -1258,7 +1259,7 @@
{
char *p = start;
- if (memcheck ((int) start, len))
+ if (memcheck ((unsigned int) start, len))
{
while (len -- > 0)
*p ++ = c;
diff -burN grub-0.97/stage2/shared.h grub-0.97-patched/stage2/shared.h
--- grub-0.97/stage2/shared.h 2004-06-19 12:40:09.000000000 -0400
+++ grub-0.97-patched/stage2/shared.h 2006-02-07 16:44:11.288448288 -0500
@@ -911,7 +911,7 @@
int nul_terminate (char *str);
int get_based_digit (int c, int base);
int safe_parse_maxint (char *str_ptr, int myint_ptr);
-int memcheck (int start, int len);
+int memcheck (unsigned int start, int len);
void grub_putstr (const char *str);
#ifndef NO_DECOMPRESSION
|
Tue 27 Sep 2005 10:20:24 AM UTC, comment #5:
dear Bernhard,
we have facing with the same problem with an HP DL-145 (totally diskless machine, w/o floppy and cd-rom).
in our case Grub don't want to load memtest86+ even with chainloader. after I the boot start it prints:
chainloader (hd0,0)/memtest86plus/memtest.bin
and after that the screen filled with the following number:
0104
repeating it endlessly.
thanks for your help!
|
Mon 06 Jun 2005 01:37:49 PM UTC, comment #4:
Two small comments:
1. If it is working on some chipsets/MBs then it might
not be the fault of Grub (see also Peter Anwin's comments
on buggy BIOSes and memdisk).
2. If this works (as noted in a very early comment):
> Copy memtest.bin to a floppy disk:
> dd if=3D/boot/memtest86/memtest.bin of=3D/dev/fd0
> Boot with the floppy.
please try:
chainloader (dev,part)/boot/memtest86/memtest.bin
(don't forget to add boot, if you are trying that on
the Grub command line) Grub can boot off any saved
boot sectors ...
regards
Bernhard
|