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!!
What's interface when using Grub to load Linux kernel?
Re:What's interface when using Grub to load Linux kernel?
In the GRUB manual...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?
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
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
Don't know if that is possible.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?
Every good solution is obvious once you've found it.
Re:What's interface when using Grub to load Linux kernel?
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.
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.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:What's interface when using Grub to load Linux kernel?
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?
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.
Above two examples are taken right from my grub.conf, and are fully functional.
Every good solution is obvious once you've found it.
Re:What's interface when using Grub to load Linux kernel?
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?
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?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:What's interface when using Grub to load Linux kernel?
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 ...)
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 ...)