Octocontrabass wrote:
j4cobgarby wrote:
What I assume is happening is that grub is creating the table, then loading my kernel source right over it, but why is it doing this?
GRUB is designed to load the operating system above 1MB. I wouldn't be surprised if it assumes you will never request a load address below 1MB and doesn't validate the request.
j4cobgarby wrote:
What possible fixes are there?
Tell GRUB to load your OS at 1MB or higher.
j4cobgarby wrote:
Can I tell grub to load the kernel elsewhere?
Yes.
Without seeing your code, I can't point you at exactly what you need to change, but it'll probably be one of the addresses in your linker script.
It seems that my kernel is being loaded at 1MB. Here's my linker script:
Code:
ENTRY(_start)
SECTIONS
{
/* start putting code at 1MB, apparently this is a
* normal place for kernel code to be loaded from*/
. = 0x100000;
/* multiboot header has to be early on in the image so
* that grub finds it */
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot) /* first the multiboot header */
*(.text) /* now the actual entry code */
}
/* now the uninitialised data */
.bss BLOCK(4K) : ALIGN(4K)
{
*(.bss) /* just the stacks */
}
}
Is it the linker script that informs grub of where to load the kernel?