grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to implant in GRUB 1.96 and GRUB 2.00+ kernel command from GRUB


From: Colin Watson
Subject: Re: How to implant in GRUB 1.96 and GRUB 2.00+ kernel command from GRUB 0.97?
Date: Tue, 3 Dec 2013 10:17:54 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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] ...<cr>
> 
> 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<cr>
> boot<cr>
> 
> 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<cr> boot<cr>
> [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                                       address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]