LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-03-2012, 05:33 AM   #1
mhdjavanmardi
LQ Newbie
 
Registered: May 2012
Posts: 5

Rep: Reputation: Disabled
how to boot linux kernel with my own simple bootloader


Hi everyone
I want to develope my own very very simple bootloader which has only a simple jump to the kernel (don't ask the reason plz).
how can I do this? How can I find the physical address of my kernel to load in the memory?? How can I load the kernel? How can I pass the initrd to the kernel? and what is it's physical address? I want to modify the MBR created by LILO and make these changes..
How can I do these??

thank you
Javan
 
Old 05-03-2012, 08:08 AM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Look at how some other bootloader does it or subscribe to LKML. Research how the kernel is loaded with or without and initrd. I might be wrong but I think a non-relocatable kernel loads at 0x100000. Also, you need to know the specifics of passing kernel command line parameters, such as root= to the kernel.
 
Old 05-03-2012, 08:47 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,141

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
In short, there is no such thing as
Quote:
very very simple bootloader which has only a simple jump to the kernel
 
Old 05-09-2012, 01:05 AM   #4
mhdjavanmardi
LQ Newbie
 
Registered: May 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by towheedm View Post
Look at how some other bootloader does it or subscribe to LKML. Research how the kernel is loaded with or without and initrd. I might be wrong but I think a non-relocatable kernel loads at 0x100000. Also, you need to know the specifics of passing kernel command line parameters, such as root= to the kernel.
In the bootloader I should load the kernel to the memory, but I don't know where is address of the kernel. LILO creates offline map file which stores address of the kernel, but I don't know structure or format of that file to decode that. I'm looking at the LILO source code, but it's complex.. my bootloader is simple & doesn't support the file system, therefore I need to know address of the kernel on the HDD.
How can I write very simple bootloader which loads a kernel?? I don't want to use other bootloaders like LILO or GRUB..
Thank you
 
Old 05-09-2012, 01:20 AM   #5
mhdjavanmardi
LQ Newbie
 
Registered: May 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Somebody knows structure of the LILO map file?
 
Old 07-16-2012, 12:15 AM   #6
wang
Member
 
Registered: Dec 2010
Distribution: ubuntu 10.04
Posts: 43

Rep: Reputation: 0
Quote:
Originally Posted by mhdjavanmardi View Post
Somebody knows structure of the LILO map file?
I don't think you should do things like that,nor read any modern source code.they won't help much but bring you set-backs,and it seems that you are not an experienced linux user,after all(sorry if i am wrong).

If your target is to simply boot up the kernel,i will suggest you to study older kernels. 0.11 is a good one.If you understand the several assembly files,you will figure out many things yourself(according to what you asked).I do believe you will understand many aspects about the kernel,not only the boot phase(it is not that simple,of course).

good luck!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How develop a simple boot loader for linux kernel 3.0 vishnugopalakrishnan Linux - Newbie 8 12-23-2011 12:07 PM
how build a simple boot loader for linux kernel 3.0? vishnugopalakrishnan Linux - Newbie 1 12-19-2011 11:58 AM
Help set up Boot to Linux via WinXp Bootloader Halsafar Linux - Newbie 4 09-24-2005 06:04 AM
How to boot Linux from WinXP's bootloader? Z3RatuL Linux - General 3 03-01-2004 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration