Just now I got the problem,too!
I have read
The Multiboot Specification version 1.6,but nothing is found.
The wiki has this code:
The multiboo specification has this code:
Code: Select all
.short MULTIBOOT_HEADER_TAG_END
.short 0
.long 8
I changed them to these:
Code: Select all
.short MULTIBOOT_HEADER_TAG_END
.short 0
.long 0
It works!!!!

But I don't know why it can work.
EDIT: Maybe I found the problem, GRUB2 need an align8 between two tags:
Code: Select all
multibootHeader:
.long 0xe85250d6
.long 0
.long multibootHeaderEnd - multibootHeader
.long -(0xe85250d6 + 0 + multibootHeaderEnd - multibootHeader)
.word 2,1
.long 24
.long multibootHeader
.long multibootHeaderEnd
.long multibootLoadEnd
.long multibootAllEnd
.align 8
.word 3,1
.long 12
.long _start
.align 8
.word 5,1
.long 20
.long 1024
.long 768
.long 32
.align 8
.word 0,0
.long 8
multibootHeaderEnd:
If I delete the '.align 8',this code can't work! Am I right??