From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vnn3K-0008Kz-Ot for mharc-grub-devel@gnu.org; Tue, 03 Dec 2013 05:18:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vnn3I-0008IO-E0 for grub-devel@gnu.org; Tue, 03 Dec 2013 05:18:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vnn3H-0002J3-4W for grub-devel@gnu.org; Tue, 03 Dec 2013 05:18:00 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:35220 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vnn3G-0002Io-Uz for grub-devel@gnu.org; Tue, 03 Dec 2013 05:17:59 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1Vnn3F-0004dG-7s for grub-devel@gnu.org; Tue, 03 Dec 2013 10:17:57 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Vnn3E-00048G-7v for grub-devel@gnu.org; Tue, 03 Dec 2013 10:17:56 +0000 Date: Tue, 3 Dec 2013 10:17:54 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: How to implant in GRUB 1.96 and GRUB 2.00+ kernel command from GRUB 0.97? Message-ID: <20131203101754.GA7810@riva.ucam.org> References: <67BFA875989E5748A862DFF55409F2A21B13CB10@IRSMSX104.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67BFA875989E5748A862DFF55409F2A21B13CB10@IRSMSX104.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 10:18:01 -0000 On Mon, Dec 02, 2013 at 03:38:16PM +0000, Stojsavljevic, Zoran wrote: > I have old 32bit GRUB version 0.97 installed long time ago on HDD. I > am adding to it 32bit kernels for testing with the command: linux > (hd0, 1)/images/bzImage_x.y.z [options] ... > > I was able to add and boot standalone Bare Metal environment (around > 60KB in size) using the following two lines: > kernel (hd0,1)/images/kernel > boot > > This does boot my CPUs to use cases I would like them to execute. > > I tried the same for GRUB version 1.96, but this does not work > anymore! Did not try it for GRUB 2.00+... > > The question is: what are the substitutes for commands (in GRUB 0.97): kernel (hd0,1)/images/kernel boot > [1] For GRUB 1.96? I'm pretty sure nobody cares about 1.96 any more; it was a five-year-old version of a development branch. I'm certainly not going to try to go back and work out what would have worked with it. Sorry. You could always try going with the instructions for 2.00 if you're desperate, but please just upgrade instead. > [2] For GRUB 2.00+? GRUB Legacy's "kernel" command was a magic thing that tried to detect the kernel type and implement appropriate loading. In GRUB 2, there's instead a loader command for each kernel type: "linux", "multiboot2", "knetbsd", etc. Given that your kernel worked with GRUB 0.97, my guesses would be that either it's a Multiboot 1 kernel (since GRUB Legacy didn't support Multiboot 2), in which case you want the "multiboot" command; or it was relying on the 16-bit Linux boot protocol, in which case you want the "linux16" command. The other thing to bear in mind is that GRUB 2 numbers partitions starting at 1, not 0, so (hd0,1) in GRUB Legacy typically becomes (hd0,2) in GRUB 2. So, putting that all together, my guess is that a menu entry declaration for your kernel in GRUB 2 would be something like this: menuentry "My bare-metal environment" { multiboot (hd0,2)/images/kernel } ... or, if you just want to type directly at the GRUB shell: multiboot (hd0,2)/images/kernel boot Cheers, -- Colin Watson [cjwatson@ubuntu.com]