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: Stojsavljevic, Zoran
Subject: RE: How to implant in GRUB 1.96 and GRUB 2.00+ kernel command from GRUB 0.97?
Date: Tue, 3 Dec 2013 11:54:25 +0000

Hello Colin,

Yes, I discovered it myself. I somehow found one HDD with 32bit GRUB... Version 
1.96. Lazy to pull and install from grub git the latest snapshot, since I am 
busy with many other stuff (and I should do that, this is the proper way).

But anyway, thank you for the tip. For both versions (1.96 and 2.00+) exactly 
what you wrote there:

multiboot (hd0,1)/images/kernel
boot

Best Regards,
Zoran
_______
Most of The Time you should be "intel inside" to be capable to think "out of 
the box".

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Colin Watson
Sent: Tuesday, December 03, 2013 11:18 AM
To: address@hidden
Subject: Re: How to implant in GRUB 1.96 and GRUB 2.00+ kernel command from 
GRUB 0.97?

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

_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052




reply via email to

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