All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Georgi <patrick@georgi-clan.de>
To: grub-devel@gnu.org
Subject: Issue with OpenSolaris kernels on GRUB2
Date: Sat, 19 Apr 2008 11:45:27 +0000 (UTC)	[thread overview]
Message-ID: <fucm0n$dct$1@ger.gmane.org> (raw)

Hi,

OpenSolaris uses GRUB (legacy) to boot using the multiboot interface. I 
tried loading the kernel with GRUB2 tonight, and it failed (with a very 
confusing message: "attempt to seek outside of the file").

Investigating this a bit, I found the issue:
It's the aout loader that complains, and it fails because it gets to 
parse an ELF file.
How comes this? The kernel contains the MULTIBOOT_AOUT_KLUDGE in the 
header flags (0x10000), while it's delivered as ELF image. I reported 
this to OpenSolaris, and I guess they'll fix it eventually.

Yet, GRUB2 differs in behaviour from GRUB legacy:

GRUB first looks if the file is multiboot and an ELF image. If not, it 
looks for the aout flag, and handles the file accordingly. So in case of 
the OpenSolaris kernel, it never looks at the flag.

GRUB2 first looks if the flag is set and assumes the file is aout (and 
fails), and only if not, tries ELF.

I'm not sure if that change in behaviour is intended, which is why I ask 
here. If the new behaviour is to stay, making the aout parser more 
robust, and fail with a more meaningful error, might be a good idea.


Thanks,
Patrick Georgi




             reply	other threads:[~2008-04-19 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-19 11:45 Patrick Georgi [this message]
2008-04-25 13:46 ` Issue with OpenSolaris kernels on GRUB2 Yoshinori K. Okuji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fucm0n$dct$1@ger.gmane.org' \
    --to=patrick@georgi-clan.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.