Bug 494157 - Broken memtest86+ boot from syslinux
Summary: Broken memtest86+ boot from syslinux
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: memtest86+
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Paulo Roma Cavalcanti
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11Preview
TreeView+ depends on / blocked
 
Reported: 2009-04-05 04:43 UTC by Warren Togami
Modified: 2013-01-10 05:08 UTC (History)
6 users (show)

Fixed In Version: 2.11-9.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-24 21:04:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Warren Togami 2009-04-05 04:43:31 UTC
The fix for Bug #472981 that was supposed to make it boot on grub broke memtest's ability to boot from syslinux.  This means memtest on the Fedora installer and Fedora LiveCD's do not work from the syslinux menu.  syslinux says the kernel image is corrupted.

Curiously enough, I haven't seen memtest86+ fail booting from grub as mentioned in Bug #472981.

I might note this is *exactly* why I suggested the new maintainer talk to upstream about upstreaming these proposed changes.  They might have told us that these changes would break non-grub ways of booting it like syslinux.  It appears that it breaks PXE netboot memtest as well.

[warren@newcaprica tmp]$ file memtest86+-2.11-3.fc11.x86_64/boot/memtest86+-2.11
memtest86+-2.11-3.fc11.x86_64/boot/memtest86+-2.11: Linux x86 kernel
[warren@newcaprica tmp]$ file memtest86+-2.11-6.fc11.x86_64/boot/memtest86+-2.11
memtest86+-2.11-6.fc11.x86_64/boot/memtest86+-2.11: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped

memtest86+-2.11-3.fc11 boots successfully from syslinux.
memtest86+-2.11-6.fc11 fails to boot.

If a fix cannot be found before the Fedora 11 development freeze, we should revert to -3, because it is more important that the install media memtest86+ works.  The -3 did successfully boot and run from grub on many machines.

Comment 1 Paulo Roma Cavalcanti 2009-04-05 10:27:35 UTC
We could have two different rpm versions for memtest86+.

Maybe 

memtest86+-2.11-3 and

memtest86+.elf-2.11-6 

Is this acceptable?

Comment 2 Warren Togami 2009-04-05 15:52:10 UTC
How about memtest86+ .src.rpm build two copies of itself, the "old" type at the current filename, and ELF at a new filename?  Then memtest-setup configures only the ELF file.

Comment 3 Paulo Roma Cavalcanti 2009-04-05 19:58:13 UTC
I built another version

http://orion.lcg.ufrj.br/RPMS/src/memtest86+-2.11-7.fc10.src.rpm


It should create two rpms:

memtest86+-elf-2.11-7.fc10.x86_64.rpm

memtest86+-2.11-7.fc10.x86_64.rpm


I tested the elf version and it is working for me.
Now I have a /boot/memtest86+-elf-2.11, and the two scripts
were adapted for using the new name.


Could you please rebuilt the rpms and test the bin version?

The bin version only has three files:

/boot/memtest86+-2.11
/usr/share/doc/memtest86+-2.11
/usr/share/doc/memtest86+-2.11/README

Of course, one can install both versions, if wanted.

Thanks.

Comment 4 Warren Togami 2009-04-06 00:45:26 UTC
Is it really necessary to have two separate binary RPMS?

Comment 5 Warren Togami 2009-04-06 01:33:00 UTC
BTW, have you asked upstream about the original bug?  Presumably it is a problem that they need to solve?  Please talk to upstream.

The -3 binary worked fine on all of my systems via grub.  Perhaps this bug is only on rare systems?

You might also want to consider trying mkelfimage to make an ELF bootable image during memtest-setup instead of shipping a separate binary.  Have you tested that?

wraplinux will also wrap a kernel image and output ELF.  mklefimage however has the benefit that it boots on coreboot systems as well.

Comment 6 Paulo Roma Cavalcanti 2009-04-06 02:10:01 UTC
(In reply to comment #5)
> BTW, have you asked upstream about the original bug?  Presumably it is a
> problem that they need to solve?  Please talk to upstream.


I saw the problem reported on the x86-secret forum a couple of years ago
(http://www.x86-secret.com/), but the thread does not exist any more.
The solution came from there too. Therefore, I am pretty sure they know about this issue.


> 
> The -3 binary worked fine on all of my systems via grub.  Perhaps this bug is
> only on rare systems?

I only use Intel motherboards. They are very common. The problem is worse with
with newer BIOS.

The best explanation for the problem can be found here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319837#21


> 
> You might also want to consider trying mkelfimage to make an ELF bootable image
> during memtest-setup instead of shipping a separate binary.  Have you tested
> that?

No. I have never used mkelfimage before.

I think we need a temporary solution that works either for the install media
or a grub.conf on a workstation. Having two binaries should allow us
to automatically update grub.conf, the same way it is done for new kernels.
Specially if grubby is improved a bit.

The two binaries can be in the same rpm if you prefer.

Comment 7 Warren Togami 2009-04-06 02:28:21 UTC
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319837#21
"Memtest uses the old format."

Then why can't memtest86+ instead be fixed to use the new kernel format?  That seems like the proper fix?

Until the proper fix can be done, shipping a second memtest86+ binary in the same RPM used by memtest-setup script seems OK.  Please do this for now so Fedora 11 can ship.  Just be sure the original binary is at the old filename.

Comment 8 Paulo Roma Cavalcanti 2009-04-06 17:13:07 UTC
(In reply to comment #7)
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319837#21
> "Memtest uses the old format."
> 
> Then why can't memtest86+ instead be fixed to use the new kernel format?  That
> seems like the proper fix?

Anything can be fixed, once there is good will. 
In memtest86+/memtest86 case, I think the developers do not see
booting via grub as an important issue. Their main target is any type
of external media (CD, floppy, or pendrive).  


> 
> Until the proper fix can be done, shipping a second memtest86+ binary in the
> same RPM used by memtest-setup script seems OK.  Please do this for now so
> Fedora 11 can ship.  Just be sure the original binary is at the old filename.  

I changed the .src.rpm and both binaries are in a single rpm.
My question is, should I update grub.conf automatically? 
Since you are going to use the bin version, if I update grub.conf
for adding an entry for the elf version, do you see any issue for the
install media?

When the F11 version is ready, I will see with the developers what
can be done to fix memtest86+ once for all.


http://orion.lcg.ufrj.br/RPMS/src/memtest86+-2.11-7.fc10.src.rpm

Comment 9 Warren Togami 2009-04-06 17:38:07 UTC
No, do not update grub.conf automatically.  Jeremy Katz said this is not desired, and you also have the problem of it adding as the first entry in grub.conf.


Don't post packages here.  Just commit it to rawhide.

Comment 10 Paulo Roma Cavalcanti 2009-04-06 21:48:34 UTC
Done.

Comment 11 Fedora Update System 2009-04-12 11:29:12 UTC
memtest86+-2.11-7.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/memtest86+-2.11-7.fc10

Comment 12 Fedora Update System 2009-04-12 11:29:32 UTC
memtest86+-2.11-7.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/memtest86+-2.11-7.fc9

Comment 13 Warren Togami 2009-04-13 03:04:15 UTC
The long-term bug is filed as Bug 49444.

Comment 14 Fedora Update System 2009-04-13 19:32:57 UTC
memtest86+-2.11-7.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update memtest86+'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3511

Comment 15 Fedora Update System 2009-04-13 19:34:46 UTC
memtest86+-2.11-7.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update memtest86+'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-3526

Comment 16 Warren Togami 2009-04-13 20:28:38 UTC
Oops, I mean Bug #494448.

Comment 17 Tom "spot" Callaway 2009-04-15 20:42:24 UTC
Should this be closed out?

Comment 18 Warren Togami 2009-04-15 21:10:58 UTC
Did somebody test it?

Comment 19 Paulo Roma Cavalcanti 2009-04-15 21:27:33 UTC
(In reply to comment #18)
> Did somebody test it?  

I tested the elf version, booting via grub. No problem.

Have you tried booting from syslinux with the bin version?

I also posted a message on memtest86+ forum, but no answer yet.

Comment 20 Jesse Keating 2009-04-16 18:57:36 UTC
Putting on Preview and marking as NEEDSRETESTING

Comment 21 Warren Togami 2009-04-24 15:27:15 UTC
Bad news, new liveimg built today, it is still broken.  Investigating.

Comment 22 Will Woods 2009-04-24 16:30:04 UTC
Works for me, using the staged Preview i686 live image. Maybe your build is bad?

Comment 23 Warren Togami 2009-04-24 17:18:36 UTC
imgcreate/live.py
    def __get_memtest_stanza(self, isodir):
        memtest = glob.glob(self._instroot + "/boot/memtest86*")
        if not memtest:
            return ""

        shutil.copyfile(memtest[0], isodir + "/isolinux/memtest")

The glob is pulling in the wrong memtest binary that is incapable of booting from syslinux.  I'm rebuilding memtest86+ with the elf binary renamed to workaround this issue.  The elf binary will need to disappear when Bug #494448 is fixed later.

Comment 24 Warren Togami 2009-04-24 21:04:48 UTC
OK, that wasn't it.  This exposed two separate bugs.

* memtest86+ uninstall no longer removes the grub.conf stanza, fixed in -9.
* livecd-iso-to-disk was failing to overwrite the memtest binary.  Curiously, after blowing away the directories and writing from scratch, I cannot reproduce this bug again. =(

In any case, I'm pretty sure this is fixed.  Closing.

Comment 25 Fedora Update System 2009-05-12 04:09:39 UTC
memtest86+-2.11-9.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2009-05-19 02:05:38 UTC
memtest86+-2.11-9.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Andre Robatino 2009-05-20 08:22:43 UTC
After updating memtest86+ in F10 from 2.10 to 2.11, the old Memtest86+ stanza in grub.conf was NOT deleted, unlike the previous version's behavior.  However, after running memtest-setup and fixing grub.conf, if I then delete the memtest86+ package, THAT causes the Memtest86+ stanza to be deleted.  Is this behavior intentional?

Comment 28 Paulo Roma Cavalcanti 2009-05-20 09:45:10 UTC
We are shipping now two versions of memtest86+:

  elf-memtest86+-2.11 and memtest86+-2.11

The first one is intended to be used for booting from grub, and
memtest-setup produces an entry like this for it: 

title Memtest86+ (2.11)
        root (hd0,0)
        kernel --type=netbsd /elf-memtest86+-2.11


The previous version did not have "elf-" in its name, and this is the reason for the stanza not being deleted in the update process, I guess.
However, from now on, everything should work as before, for future new versions.


Note You need to log in before you can comment on or make changes to this bug.