Proposed change: Invoke memtest as kernel

Post there if you plan to contribute to this SystemCd
argonavis
Posts: 9
Joined: 09 Apr 2008, 22:55

Proposed change: Invoke memtest as kernel

Postby argonavis » 08 Dec 2009, 02:09

Issue Type: Proposed enhancement

Version: sysresccd-1.3.2, memtest-4.00

Description:
On some older machines with less RAM, invoking memtest by using the memtest floppy image with the Syslinux memdisk utility seems to cause a memory management conflict resulting in spurious error messages. Observations:

  • Produces errors - Invoking memtest with memdisk
  • No errors - Using "probed" memory map rather than BIOS map
  • No errors - Booting memtest directly from floppy
  • No errors - Booting memtest as kernel image from sysresccd
  • No errors - Previous versions of memtest

Here are some screen captures to further illustrate the situation. All tests were run on the same machine using memtest-4.00:

  • These are the errors that are generated when memtest is invoked with memdisk:
    Image
    Larger image
    .
  • This is a memtest error summary:
    Image
    Larger image
    .
  • This shows that memtest can run correctly if using the "probed" memory map rather than the BIOS memory map:
    Image
    Larger image
    .
  • This capture was produced when sysresccd-1.3.2 was booted with a modified image which invoked memtest using a kernel binary as described below. Note that the BIOS e820 memory map was used, and that the amount of RAM shown as being under test is the largest of all the examples:
    Image
    Larger image


Resolution:
I received the following response on the memtest forum from Wichetael, who I believe is one of the memtest developers. S/he writes:
you don't need to use memdisk to boot memtest from syslinux, you can load memtest directly as a kernel from syslinux. The only thing you need to do is remove the .bin extension from the memtest filename, since syslinux and friends assume .bin files to be boot sectors.

Ref: http://forum.canardpc.com/showthread.php?t=41497

As shown above, when memtest is invoked in this manner, not only does it not produce errors on my test system, but it also tests a larger amount of RAM than if invoked with memdisk. Presumably this is because memdisk must "claim" some RAM to emulate the virtual floppy disk.

As Wichetael describes, download the memtest kernel image and rename it to remove the .bin extension. It is probably suboptimal to use the bootdisk subdirectory for a kernel image, but it will suffice for this example:

Code: Select all

$ cd sysresccd-1.3.2/bootdisk
$ wget http://www.memtest.org/download/4.00/memtest86+-4.00.bin.gz
$ gunzip memtest86+-4.00.bin.gz
$ mv memtest86+-4.00.bin memtestp.img


Then, apply the following patch to pxelinux.cfg/default:

Code: Select all

--- isolinux.cfg        2009-11-02 14:42:15.000000000 -0600
+++ isolinux.cfg.new    2009-12-07 19:46:28.000000000 -0600
@@ -56,8 +56,8 @@
   kernel memdisk
   append initrd=/bootdisk/freedos.img floppy
 label memtest
-  kernel memdisk
-  append initrd=/bootdisk/memtestp.img floppy
+  kernel /bootdisk/memtestp.img
+  append -
 label ranish
   kernel memdisk
   append initrd=/bootdisk/ranish.img floppy


Thanks,

AN.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: Proposed change: Invoke memtest as kernel

Postby admin » 12 Dec 2009, 17:32

Thanks for these very good instructions, I have done that change in sysresccd-1.3.4-beta3.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: Proposed change: Invoke memtest as kernel

Postby admin » 12 Dec 2009, 20:08

Unfortunately it does not work.
It prints "8000" on the screen

I have seen that it may be because the filename has to be "memtest86+" but even with that name it does not work.
http://osdir.com/ml/debian-bugs-dist/20 ... 03793.html

Anyway this name does not respect the DOS 8.3 filename convention so this is very likely to fail because it requires specific extensions to handle long file names and that sort of things.
If they could use a very simple name such as "memtestp.bin", with no special characters it would be really much better. It's like this very good idea that Microsoft had to call a directory "Program Files". It breaks all the programs that consider space as a separator, and require special things to work.

Let me know if you manage to fix that, I will be happy to make that change.

argonavis
Posts: 9
Joined: 09 Apr 2008, 22:55

Re: Proposed change: Invoke memtest as kernel

Postby argonavis » 13 Dec 2009, 22:52

admin wrote:Unfortunately it does not work.
It prints "8000" on the screen

I must apologize, this was my error. The procedure I initially outlined works with pxelinux, but not with isolinux. Isolinux uses the .img extension on the kernel statement to indicate a disk image. To indicate a Linux kernel, one must either use the linux statement, or remove any extension on the kernel statement.

This procedure should work. First, prepare the memtest-4.00 linux kernel image:

Code: Select all

$ cd sysresccd-1.3.2/bootdisk
$ wget http://www.memtest.org/download/4.00/memtest86+-4.00.bin.gz
$ gunzip memtest86+-4.00.bin.gz
$ mv memtest86+-4.00.bin memtestp


Then, apply this patch to sysresccd-1.3.2/isolinux/isolinux.cfg as follows:

Code: Select all

--- isolinux.cfg        2009-11-02 14:42:15.000000000 -0600
+++ isolinux.cfg.new    2009-12-13 16:42:23.000000000 -0600
@@ -56,8 +56,8 @@
   kernel memdisk
   append initrd=/bootdisk/freedos.img floppy
 label memtest
-  kernel memdisk
-  append initrd=/bootdisk/memtestp.img floppy
+  kernel /bootdisk/memtestp
+  append -
 label ranish
   kernel memdisk
   append initrd=/bootdisk/ranish.img floppy

Note the absence of the .img extension on the memtestp filename in both cases.

Thanks for your patience,

AN.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: Proposed change: Invoke memtest as kernel

Postby admin » 14 Dec 2009, 23:19

It seems to work. Thanks a lot.
That modification will be in SystemRescueCd-1.3.4-beta6.


Return to “Contributions”

Who is online

Users browsing this forum: No registered users and 1 guest