-   Linux - Newbie (
-   -   how to create a kernel bootable image (

aloktiagi 04-21-2010 06:05 AM

how to create a kernel bootable image

the things i've tried:

1. Created an asm bootloader code that calls a c function which just prints a hello message.
2. Compiled both and linked them using LD command using a .ld file available.

Steps followed from

I get a kernel.bin file which is of ELF format. I've set up a tftp server using tftpd32 tool and created the necessary pxelinux.cfg files.

Now how do i create a bootable kernel image out of the elf file. The steps given in the above website to create an image doesn't help!!!

Any help is appreciated


onebuck 04-23-2010 07:15 AM


What part of the 'Booting the kernel' section is confusing you? If you followed the example all the way then you should have a bootable kernel image;

excerpt from 'Overview';

Even when using GRUB, some setup is required before entering an int main() type function. The most basic setup to get an ELF format kernel to be booted by GRUB consists of three files:

* loader.s - assembler "glue" between bootloader and kernel
* kernel.c - your actual kernel routines
* linker.ld - for linking the above files

The second part of this tutorial briefly describes how to boot the compiled kernel.
Other boot options or techniques are exampled.

So again I ask, Where are you having difficulty?

All times are GMT -5. The time now is 11:32 PM.