LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-29-2010, 01:23 PM   #1
vmkaarthik
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Help : Process control from Boot loader to User Space


Short intro about me is that I am a new bee to this forum.....I just started my career in Linux driver development for embedded devices...

For the past few days I was putting effort on understanding the software control flow starting from "Boot loader" to "Linux User space".

I am consolidating the entire process and putting forth in this forum...It would be great if someone can validate this..It might be useful to other new bees too.

Step 1 : Power up the board

Step 2 : The CPU control goes to EEPROM/storage memory where BIOS resides

Step 3: BIOS gets loaded in RAM and gets executed

Step 4: During execution, the selection of Boot device has to be done with the help of BIOS Menu [Blue screen appearance during start up in normal PC's]

Step 5: BIOS shall access the Bootloader stored in boot device [for eg.,Hard disk]. Boot loader is stored in MBR area.

for explanation purpose I take the following configurations

Bootloader = GRUB
Boot Device = Hard Disk

Step 6: GRUB shall be loaded in RAM and gets executed

Step 7: GRUB shall load the KERNEL image to RAM. Kernel image is stored in Hard Disk.

The question of "How the GRUB knows where the Kernel image is stored".

The answer is

1. In the "Grub.config" file, the location of "Kernel Image"
and " Ramdisk Image" [which will be discussed later in the section]
is being given.

Step 8: Kernel Image followed by Ramdisk Image is loaded in RAM by GRUB bootloader

Step 9: Kernel Image gets executed...During execution, top portion of the code shall make initial hardware initialization and latter part
of the code shall just decompress the Kernel Image

Step 10 : After decompressing the Kernel Image, it shall decompress
the already loaded Ramdisk Image

Ram disk is just creating a temporary hard disk in RAM. The main responsibility includes it consists of minimal driver files, executables, directory structures to created a TEMPORARY ROOT FILE SYSTEM.

This Temporary Root File system shall be used by Kernel Image

1. Execute the executables to access the Hard disk
2. For creating Permanent Root File System in HARD DISK

Step 11 : Kernel Shall look for the file /Linuxrc in Ramdisk. Linuxrc
is a USER script file [not sure]

Step 12: At the end of script file Linuxrc, the Ramdisk shall give the
control to "USER SPACE" [path for writing the script not known]in Linux kernel

Step 13: USER SPACE is the normal shell

Thanks for the patience.
 
Old 06-29-2010, 02:33 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,281
Blog Entries: 3

Rep: Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446Reputation: 1446
Hi,

Welcome to LQ!

'Anatomy of the Linux kernel' would be very helpful for better understanding of operations as related to your title.

'Resources' from the above link provides even more information;

"Inside the Linux boot process" is a better explanation of the boot process.



BTW, the usage of the vbcode tags # or quote will make your post cleaner therefore easier to read.

 
Old 06-29-2010, 11:23 PM   #3
vmkaarthik
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for teh immediate reply.
 
  


Reply

Tags
boot loader


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 to send events from kernel module to user space process yugandhar Linux - Kernel 2 02-21-2011 10:39 AM
Virtual space seen by each new process in User space shreshtha Linux - General 2 06-22-2010 05:47 AM
How to make a (user space )process pre emptive? in 2.6 kernel papunb Programming 3 12-11-2008 07:11 AM
How to access device from user space process stardust496 Linux - Hardware 3 07-23-2008 01:40 PM
grub boot loader and single user mode midnightcommander Linux - General 1 04-02-2001 04:12 AM


All times are GMT -5. The time now is 06:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration