On Wed, Mar 11, 2009 at 1:18 PM, Paulo Cavalcanti <promac@gmail.com> wrote:


On Wed, Mar 11, 2009 at 10:26 AM, Warren Togami <wtogami@redhat.com> wrote:
Hans de Goede wrote:
Please discuss making any changes to grub.conf with Peter Jones
(pjones@redhat.com) he knows grubby best. I'm not sure what to
think about adding an option to grub.conf in general, it does
make sorta sense when people install memtest86 to do that, but
otoh it feels a bit wrong. I think this is best discussed on
Fedora-devel, and then if there is consensus that adding a
grub.conf entry is a good idea Peter Jones is the one yo ask
technical questions about grubby.

Some background:

I initially implemented memtest86+ to automatically add itself to grub.conf in %post.  Jeremy disliked this because it wont work during anaconda where grub.conf did not exist at that point yet.  He suggested just providing a script to add it to grub.conf manually, because doing so automatically would be inconsistent.

As for your proposed build change to memtest86+, I have never seen grub fail to boot memtest86+ in the way that you described, and also upstream doesn't build it in that way.  Please discuss with upstream your proposed build changes.

There are plenty of references to "Error 28: Selected item cannot fit into memory"
on google:

http://ubuntuforums.org/showthread.php?t=706261

http://www.smop.co.uk/blog/index.php/2009/01/04/grub-error-28-selected-item-cannot-fit-into-memory/

http://savannah.gnu.org/bugs/?3404

In fact, I think memtest86 is supposed to be run using a floppy, a CD-Rom
or a Pen-drive. Adding an entry in grub.conf for booting from the HD
is something Linux distributions have done so users may only reboot
and choose memtest86 from the boot menu.
Therefore, this is an issue we have to deal with by
ourselves, because grub is not an upstream's problem.

Unless I am missing something here ....
 

I have a working version, which follows, basically, what has
been proposed here:
 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319837

I have been using it for a long time, and it works just fine.
But it requires a grub entry like this:

title Memtest86+ (2.11)
        kernel --type=netbsd /memtest86+-2.11

I altered the script /usr/sbin/memtest-setup
to accomplish that, but I would like to have some comments
about this issue. The script is supposed to work for lilo also,
but my hack is for grub only.

.....

if [ "$RETVAL" != "0" ]; then
    echo "ERROR: grubby failed to configure your bootloader for $MTPATH."
    exit $RETVAL
else
    sed -i -e's,kernel /memtest86+,kernel --type=netbsd /memtest86+,' /boot/grub/grub.conf
    sed -i -e"s,/memtest86+-$MTVERSION.*,/memtest86+-$MTVERSION," /boot/grub/grub.conf
fi

echo "Setup complete."


--
Paulo Roma Cavalcanti
LCG - UFRJ