All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue with OpenSolaris kernels on GRUB2
@ 2008-04-19 11:45 Patrick Georgi
  2008-04-25 13:46 ` Yoshinori K. Okuji
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Georgi @ 2008-04-19 11:45 UTC (permalink / raw)
  To: grub-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Issue with OpenSolaris kernels on GRUB2
  2008-04-19 11:45 Issue with OpenSolaris kernels on GRUB2 Patrick Georgi
@ 2008-04-25 13:46 ` Yoshinori K. Okuji
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshinori K. Okuji @ 2008-04-25 13:46 UTC (permalink / raw)
  To: The development of GRUB 2

On Saturday 19 April 2008 13:45, Patrick Georgi wrote:
> 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.

I think you refer to an older version of GRUB Legacy here. This behavior has 
been fixed.

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

This is correct, and consistent with the latest GRUB Legacy.

> 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.

Yes, I agree. There must be a bug. :)

Okuji



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-25 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-19 11:45 Issue with OpenSolaris kernels on GRUB2 Patrick Georgi
2008-04-25 13:46 ` Yoshinori K. Okuji

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.