Booting in GRUB says multiboot header is "bad"

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gsingh2011
Member
Member
Posts: 83
Joined: Tue Feb 03, 2009 11:37 am

Booting in GRUB says multiboot header is "bad"

Post by gsingh2011 »

After following the bare bones tutorial, I tried booting my kernel up in GRUB. After typing kernel 200+9, I got this message,

Code: Select all

[Multiboot-elf, <0x100000:0x80:0x4008>(bad), entry=0x10000c]
I'm not sure what the three addresses in the center mean, but I think they have to do with the sections

Code: Select all

$ objdump -h kernel.bin 

kernel.bin:     file format elf32-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000046  00100000  00100000  00001000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .eh_frame     00000038  00100048  00100048  00001048  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .bss          00004008  00100080  00100080  00001080  2**2
                  ALLOC
  3 .comment      0000002a  00000000  00000000  00001080  2**0
                  CONTENTS, READONLY
So for example, I think it's saying bad because .bss should be at 0x100080 but it actually is at 0x80. Is that correct? If so what could cause this? Here is my linker.ld

Code: Select all

ENTRY (loader)

SECTIONS {
    . = 0x00100000;

    .text ALIGN (0x1000): {
        *(.text)
    }

    .rodata ALIGN (0x1000) :
    {
        *(.rodata*)
    }

    .data ALIGN (0x1000) :
    {
        *(.data)
    }

    .bss :
    {
        sbss = .;
        *(COMMON)
        *(.bss)
        ebss = .;
    }
}
gsingh2011
Member
Member
Posts: 83
Joined: Tue Feb 03, 2009 11:37 am

Re: Booting in GRUB says multiboot header is "bad"

Post by gsingh2011 »

For anyone else experiencing the same problem, the (bad) just means you aren't loading enough blocks. I switched from kernel 200+9 to kernel 200+10 and it worked.

I still want to know what the three address (<0x100000:0x80:0x4008>) represent, if anyone knows.
Post Reply