From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JnBVo-0003mZ-OZ for mharc-grub-devel@gnu.org; Sat, 19 Apr 2008 07:45:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnBVm-0003li-2p for grub-devel@gnu.org; Sat, 19 Apr 2008 07:45:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnBVl-0003lI-GH for grub-devel@gnu.org; Sat, 19 Apr 2008 07:45:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnBVl-0003lF-9P for grub-devel@gnu.org; Sat, 19 Apr 2008 07:45:41 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JnBVl-0007l3-4S for grub-devel@gnu.org; Sat, 19 Apr 2008 07:45:41 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JnBVg-0000PD-8f for grub-devel@gnu.org; Sat, 19 Apr 2008 11:45:36 +0000 Received: from cable-87-78-199-75.netcologne.de ([87.78.199.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Apr 2008 11:45:36 +0000 Received: from patrick by cable-87-78-199-75.netcologne.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Apr 2008 11:45:36 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: Patrick Georgi Date: Sat, 19 Apr 2008 11:45:27 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cable-87-78-199-75.netcologne.de User-Agent: Pan/0.132 (Waxed in Black) Sender: news X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: Issue with OpenSolaris kernels on GRUB2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2008 11:45:42 -0000 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