Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291729 - sys-apps/memtest86+-4.00: Grub installation instructions incorrect
Summary: sys-apps/memtest86+-4.00: Grub installation instructions incorrect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 17:26 UTC by Clemens Rabe
Modified: 2009-11-24 09:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for grub installation instructions and install memtest file as well. (memtest86+-4.00.ebuild.patch,861 bytes, patch)
2009-11-03 17:28 UTC, Clemens Rabe
Details | Diff
Patch updated to work with current CVS version 1.5 (memtest86+-4.00.ebuild.patch,825 bytes, patch)
2009-11-22 21:59 UTC, Clemens Rabe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Rabe 2009-11-03 17:26:54 UTC
The ebuild suggests to install memtest.bin with the --type=netbsd option. However, this option should only be used in combination with the (not installed) memtest file. So the grub options that work for me are:

kernel /boot/memtest86plus/memtest.bin

and

kernel --type=netbsd /boot/memtest86plus/memtest

The last one requires to install the file memtest as well. It should be installed in addition to memtest.bin, because the first one may cause a grub error 28 on systems where the lower memory is limited. (On one of my systems due to a big BIOS).

I'll attach a patch for the ebuild.

Clemens Rabe

Reproducible: Always

Steps to Reproduce:
1. Follow instructions.
2. Reboot and choose the grub entry
3. See the grub error message
4. Remove the --type=netbsd option in grub and try again - it should work.

Actual Results:  
Grub gives an error message about the kernel... command.

Expected Results:  
Should start the memtest86+.
Comment 1 Clemens Rabe 2009-11-03 17:28:48 UTC
Created attachment 209143 [details, diff]
Fix for grub installation instructions and install memtest file as well.
Comment 2 Michal Januszewski (RETIRED) gentoo-dev 2009-11-22 15:24:51 UTC
Which version of grub are you using?  For me, using grub-0.97-r9, --type=netbsd with the 'memtest' file doesn't work at all.
Comment 3 Clemens Rabe 2009-11-22 16:10:59 UTC
I'm using grub-0.97-r9 too, just checked by reinstalling it. Are you using a 64-bit version? I'm using the 32-bit stuff.
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2009-11-22 16:24:47 UTC
(In reply to comment #3)
> I'm using grub-0.97-r9 too, just checked by reinstalling it. Are you using a
> 64-bit version? I'm using the 32-bit stuff.

I have a 64-bit system, yes, but as far as I can tell both grub and memtest86+ are compiled as 32-bit binaries.  The -m32 flag is used during compilation, grub is using files from /lib/grub/i386-pc and 'file memtest' says:

memtest: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
Comment 5 Clemens Rabe 2009-11-22 17:37:36 UTC
(In reply to comment #4)
> I have a 64-bit system, yes, but as far as I can tell both grub and memtest86+
> are compiled as 32-bit binaries.

Yes, I've compiled and installed both grub and memtest86+ on the amd64 profile, just to be sure, and it still works like charm. Are there any errors from grub, does it reboot immediately or just hang? I suspect the memtest.bin file (without the netbsd stuff) works?
Btw, I'm using a separate partition for /boot (hd0,0).

Cheers,
 Clemens
Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2009-11-22 17:40:10 UTC
(In reply to comment #5)
> Yes, I've compiled and installed both grub and memtest86+ on the amd64 profile,
> just to be sure, and it still works like charm. Are there any errors from grub,
> does it reboot immediately or just hang? I suspect the memtest.bin file
> (without the netbsd stuff) works?
> Btw, I'm using a separate partition for /boot (hd0,0).

The memtest.bin file works indeed.  Grub says that the 'memtest' file has an invalid binary format and returns me to the boot menu screen.  Could you please send me your 'memtest' binary to my @gentoo.org e-mail address?
Comment 7 Clemens Rabe 2009-11-22 18:46:36 UTC
(In reply to comment #6)
> The memtest.bin file works indeed.  Grub says that the 'memtest' file has an
> invalid binary format and returns me to the boot menu screen.  Could you please
> send me your 'memtest' binary to my @gentoo.org e-mail address?
> 

The binary should be on its way...

I'll get the grub error 13 (Invalid or unsupported executable format) when using
 kernel /boot/memtest86plus/memtest
or when using the memtest86.bin file with the --type=netbsd option (In the latter case, grub also says that it is a Linux-zImage).
Comment 8 Michal Januszewski (RETIRED) gentoo-dev 2009-11-22 20:33:10 UTC
(In reply to comment #7)
> The binary should be on its way...

OK, so your binary works.  It also seems to about 10% in size of the binary I get when building memtest.  Could you please post your `emerge --info`?
Comment 9 Clemens Rabe 2009-11-22 21:06:03 UTC
(In reply to comment #8)
> OK, so your binary works.  It also seems to about 10% in size of the binary I
> get when building memtest.  Could you please post your `emerge --info`?
> 


emerge --info of the 32-Bit System:

Portage 2.1.6.13 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r8-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 22 Nov 2009 15:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j5"
PKGDIR="/mnt/portage/binary_packages/x86_gcc4.3.4_Core2"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=10"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups dbus divx4linux dri dts dvd dvdr eds emboss encode evo fam ffmpeg firefox flac fortran gdbm gif glibc-omitfp gpm gstreamer gtk hal iconv ieee1394 imlib ipv6 jpeg jpeg2k kde libnotify mad mikmod mmx mmx2 mng modules mozilla mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png povray ppds pppd pthreads python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tetex theora thunar tiff truetype type1 unicode usb v4l v4l2 vorbis webkit win32codecs x264 x86 xcb xinerama xml xml2 xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS



emerge --info of the 64-Bit system:

Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Extreme_CPU_X7900_@_2.80GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 22 Nov 2009 15:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=10"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://kerberosng/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups dbus divx4linux dri dts dvd dvdr eds emboss encode evo fam ffmpeg firefox flac fortran gdbm gif glibc-omitfp gpm gstreamer gtk hal iconv ieee1394 imlib ipv6 jpeg jpeg2k kde libnotify mad mikmod mmx mmx2 mng modules mozilla mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png povray ppds pppd pthreads python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tetex theora thunar tiff truetype type1 unicode usb v4l v4l2 vorbis webkit x264 xcb xinerama xml xml2 xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 10 Clemens Rabe 2009-11-22 21:59:37 UTC
Created attachment 210934 [details, diff]
Patch updated to work with current CVS version 1.5

I've just encountered that there was an update of the ebuild in the CVS, that installs memtest.bin as memtest and creates the symlink memtest.bin -> memtest.

The modified patch installs the original memtest file as memtest.netbsd, suitable for the alternative grub "kernel --type=netbsd /boot/memtest86plus/memtest.netbsd" method.
Comment 11 Michal Januszewski (RETIRED) gentoo-dev 2009-11-23 23:38:51 UTC
I added your patch to CVS, thanks!

It turns out that the non-working ELF binary is a binutils problem.  After downgrading to the version you're using, GRUB was able to run it with the --netbsd option just fine.
Comment 12 Clemens Rabe 2009-11-24 09:43:42 UTC
(In reply to comment #11)
> I added your patch to CVS, thanks!

Thank you! I have verified that the official ebuild works on my x86 and amd64 system.