7

Does Grub2 support Memtest86+ iso files? If it's supported: How could I write a grub entry in grub.cfg in order to boot the Memtest86+ iso file?

1
  • Grub doesn't support ISOs natively. Typical solution is to use GRUB to load a Linux install and use it's CDROM driver to load the ISO.
    – surfasb
    Nov 9 '11 at 17:57
3

There are ways of adding ISO's to grub2 configurations. It is easier to use other options, however.

  1. Download memtest86+-4.20.bin (Latest as of 11/2011)
  2. Place it in your /boot partition. (Just like your Linux kernels)
  3. Add the following to /etc/grub.d/40_custom (It should be on three lines, like this)
menuentry "Memtest 86+" { 
linux16 /memtest86+.bin
}

Final. Update your grub and reboot

sudo grubupdate && sudo reboot
1
  • gparted (which is something else you may want to have as a boot option) has a detailed explanation of how to add Grub2 menu entries of many of it's available builds (iso, vmlinux). gparted.sourceforge.net/livehd.php
    – earthmeLon
    Nov 9 '11 at 18:11
3

Six years late to this party, but seeing as I couldn't find the answer anywhere either, here's what I did to work it out.

  • Mount the memtest ISO
  • Look at mount-point/isolinux/isolinux.cfg
  • Convert isolinux config to GRUB2 config

Note that that method works for other ISOs, not just Memtest86+.

Doing the above yields multiple isolinux configs depending on how you want to start Memtest86+, so you end up with multiple menuentries:

submenu "> MemTest86+ 7.2" {
    menuentry "MemTest86" {
        set isofile="/Memtest86-7.2.iso"
        echo "Mounting Memtest86-7.2.iso"
        loopback loop $isofile
        echo "Loading kernel"
        linux16 (loop)/isolinux/memtest iso-scan/filename=$isofile
        echo "Starting MemTest86+ 7.2"
    }

    menuentry "MemTest86 (one pass)" {
        set isofile="/Memtest86-7.2.iso"
        echo "Mounting Memtest86-7.2.iso"
        loopback loop $isofile
        echo "Loading kernel"
        linux16 (loop)/isolinux/memtest iso-scan/filename=$isofile onepass
        echo "Starting MemTest86+ 7.2"
    }

    menuentry "MemTest86 (btrace)" {
        set isofile="/Memtest86-7.2.iso"
        echo "Mounting Memtest86-7.2.iso"
        loopback loop $isofile
        echo "Loading kernel"
        linux16 (loop)/isolinux/memtest iso-scan/filename=$isofile btrace
        echo "Starting MemTest86+ 7.2"
    }

    menuentry "MemTest86 (single CPU)" {
        set isofile="/Memtest86-7.2.iso"
        echo "Mounting Memtest86-7.2.iso"
        loopback loop $isofile
        echo "Loading kernel"
        linux16 (loop)/isolinux/memtest iso-scan/filename=$isofile maxcpus=1
        echo "Starting MemTest86+ 7.2"
    }

    menuentry "MemTest86 (serial output)" {
        set isofile="/Memtest86-7.2.iso"
        echo "Mounting Memtest86-7.2.iso"
        loopback loop $isofile
        echo "Loading kernel"
        linux16 (loop)/isolinux/memtest iso-scan/filename=$isofile console=ttyS0,9600
        echo "Starting MemTest86+ 7.2"
    }
}
1
  • Thanks, man. That is not late, that was very helpful, just right in present moment! ;-)
    – xakepp35
    Apr 24 '17 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.