From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HtQTR-000707-RG for mharc-grub-devel@gnu.org; Wed, 30 May 2007 11:52:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HtQTQ-0006zU-9P for grub-devel@gnu.org; Wed, 30 May 2007 11:52:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HtQTP-0006z8-Cc for grub-devel@gnu.org; Wed, 30 May 2007 11:52:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HtQTP-0006z2-2O for grub-devel@gnu.org; Wed, 30 May 2007 11:52:31 -0400 Received: from smtp.freemail.gr ([81.171.104.107]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HtQTO-00068f-HG for grub-devel@gnu.org; Wed, 30 May 2007 11:52:30 -0400 Received: from [192.168.1.35] (athedsl-10820.home.otenet.gr [87.202.42.152]) by smtp.freemail.gr (Postfix) with ESMTP id 3E2D4A08411 for ; Wed, 30 May 2007 18:52:27 +0300 (EEST) Message-ID: <465D9D89.1010904@freemail.gr> Date: Wed, 30 May 2007 18:51:37 +0300 From: Constantine Kousoulos User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: The development of GRUB 2 References: <465C756E.8000506@freemail.gr> In-Reply-To: <465C756E.8000506@freemail.gr> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: multiboot header error X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2007 15:52:32 -0000 Here is a sample kernel, built as elf64, that simply refuses to boot. It consists of only two files: boot.S and multiboot.h. It does absolutely nothing and it is a cut-down version of the kernel found at http://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Example-OS-code or in grub-0.97/docs. boot.S: #include "multiboot.h" .text .globl start, _start start: _start: jmp multiboot_entry /* Align 64 bits boundary. */ .align 8 multiboot_header: .long MULTIBOOT_HEADER_MAGIC .long MULTIBOOT_HEADER_FLAGS /* .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)*/ multiboot_entry: /* Initialize the stack pointer. */ movq $(stack + STACK_SIZE), %rsp /* Reset EFLAGS. */ pushq $0 popf /* Push the pointer to the Multiboot information structure. */ pushq %rbx /* Push the magic value. */ pushq %rax loop: hlt jmp loop /* Our stack area. */ .comm stack, STACK_SIZE multiboot.h: #define MULTIBOOT_HEADER_MAGIC 0xe85250d6 #define MULTIBOOT_HEADER_FLAGS 0x00000000 #define STACK_SIZE 0x4000 Makefile.am: noinst_PROGRAMS = kernel kernel_SOURCES = boot.S multiboot.h kernel_CFLAGS = -fno-builtin -nostdinc -O -g -Wall kernel_LDFLAGS = -nostdlib All i get from GRUB2 is "error: No multiboot header found". I have tried changing the magic number to 0xd65052e8 to make sure i got it ok, but it still doesn't boot. The flags are all zero according to the next version of the Multiboot Spec. The same document doesn't say anything about a checksum in the multiboot header, so i commented it out. What do you think is to blame for this behaviour? Thanks, Constantine