Page 1 of 1
What's interface when using Grub to load Linux kernel?
Posted: Mon Mar 07, 2005 2:27 am
by cxsnew
Seems there are not source codes of Linux kenrel to indicates that this kernel is multiboot compliant. So my question is:
how the Grub can load a non-multiboot-compliant OS kernel?
Some hints here?
And also if I want the Grub to load the Linux kernel image into another memory place, say 0x200000, how can I get this targer?
Thanks!!
Re:What's interface when using Grub to load Linux kernel?
Posted: Mon Mar 07, 2005 2:34 am
by Solar
cxsnew wrote:
Seems there are not source codes of Linux kenrel to indicates that this kernel is multiboot compliant. So my question is:
how the Grub can load a non-multiboot-compliant OS kernel?
Some hints here?
In the GRUB manual...
For a non-ramdisk boot with /boot on /dev/hda5 and / on /dev/hda6, try:
Code: Select all
title Linux
root (hd0,4)
kernel /linux-2.6.10 root=/dev/hda6
Adjust the name of your kernel file accordingly. For a ramdisk boot:
Code: Select all
title Linux
root (hd0,4)
kernel /linux-2.6.10 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda6
initrd /initrd-2.6.10
Adjust the name of your kernel and ramdisk file accordingly.
And also if I want the Grub to load the Linux kernel image into another memory place, say 0x200000, how can I get this targer?
Don't know if that is possible.
Re:What's interface when using Grub to load Linux kernel?
Posted: Mon Mar 07, 2005 2:41 am
by cxsnew
Maybe your answer doesn't hit my point.
I just want to know how the Grub can load a non-multiboot-compliant OS kernel image? Because I can't find that Linux define a multi_boot_header in its source codes.
Re:What's interface when using Grub to load Linux kernel?
Posted: Mon Mar 07, 2005 3:33 am
by Pype.Clicker
that's just because GRUB does *more* than multiboot compliance. It also knows what Linux kernel looks like and how to load it. (for instance, it is likely to refuse loading it without the appropriate vmlinuz=... file)
Re:What's interface when using Grub to load Linux kernel?
Posted: Mon Mar 07, 2005 5:22 am
by Solar
GRUB can also (chain)load Windows, load NetBSD, GNU/Hurd and a variety of others.
Above two examples are taken right from my grub.conf, and are fully functional.
Re:What's interface when using Grub to load Linux kernel?
Posted: Mon Mar 07, 2005 8:00 am
by cxsnew
Thanks!
But for my second question, can I let Grub load the Linux kernel image to the 0x200000?
Since Linux itself doesn't define a multiboot related header in its code, so I guess Grub maybe can get the kernel location info which defined in the vmlinux.lds, if that true does that mean the only thing that I should do is to modify the vmlinux.lds?
Re:What's interface when using Grub to load Linux kernel?
Posted: Tue Mar 08, 2005 3:05 am
by Pype.Clicker
i'm not 100% sure of this, but imho, if the kernel hasn't been compiled to be loaded at a given location, loading it at that location will fail most painfully ...
I admit i don't see at all why you'd like to have linux loaded at a specific target address (and a technical linux-specific forum would probably be a better place to ask ...)