LinuxQuestions.org
Register a domain and help support LQ
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-05-2010, 04:07 AM   #1
tuhin_chatt
LQ Newbie
 
Registered: May 2010
Posts: 9

Rep: Reputation: 0
Boot process in Linux.


Assuming that root partition houses the kernel.
Once the BIOS loads the first 512 bytes of the disk, i.e. the MBR, the MBR will load GRUB. My questions:
1).Is GRUB present on the root partition,which also houses the kernel? If so, then does the root partition need to be mounted at this point of time to load GRUB? If not, then:
2).When exactly is the root partition mounted? because I read that GRUB reads its default boot configuration from /boot/grub/grub.conf. Hence to access this file, doesn't the root partition need to be mounted at max. after GRUB is loaded? (assuming that loading GRUb doesn't req. mounting the partition).
------------------------------------------------------------------------
Assuming that kernel is present on a separate partition (/boot), how do things work this time? I mean,

/boot partition houses the kernel.After GRUB is loaded,doesn't the root partition need to be mounted first, then the /boot partition under the /boot directory and then finally loading the kernel?

I'm having all the confusion because I saw the contents of the /etc/fstab file in a book I was reading the other day and there the first entry was that of the root partition and it said that the kernel mounts these partitions after reading the fstab file. But if this happens, how will GRUB actually access its conf file? Moreover, if it is the kernel mounting the root partition, how is the god damn fstab file actually accessible? Please help. This is really confusing me.

Last edited by tuhin_chatt; 05-05-2010 at 04:20 AM.
 
Old 05-05-2010, 04:36 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by tuhin_chatt View Post
Assuming that root partition houses the kernel.
Once the BIOS loads the first 512 bytes of the disk, i.e. the MBR, the MBR will load GRUB. My questions:
1).Is GRUB present on the root partition,which also houses the kernel? If so, then does the root partition need to be mounted at this point of time to load GRUB? If not, then:
2).When exactly is the root partition mounted? because I read that GRUB reads its default boot configuration from /boot/grub/grub.conf. Hence to access this file, doesn't the root partition need to be mounted at max. after GRUB is loaded? (assuming that loading GRUb doesn't req. mounting the partition).
------------------------------------------------------------------------
Assuming that kernel is present on a separate partition (/boot), how do things work this time? I mean,

/boot partition houses the kernel.After GRUB is loaded,doesn't the root partition need to be mounted first, then the /boot partition under the /boot directory and then finally loading the kernel?

I'm having all the confusion because I saw the contents of the /etc/fstab file in a book I was reading the other day and there the first entry was that of the root partition and it said that the kernel mounts these partitions after reading the fstab file. But if this happens, how will GRUB actually access its conf file? Moreover, if it is the kernel mounting the root partition, how is the god damn fstab file actually accessible? Please help. This is really confusing me.
There are three stages. Firstly GRUB reads the file system containing grub/menu.lst to read its configuration. Secondly, based on its configuration, it then reads the file system containing the chosen OS' boot files (typically the same file system, but not necessarily), loads the appropriate boot executable and starts it, replacing itself. Thirdly the chosen OS does whatever it does -- in the case of Linux it mounts the root file system and a later reads /etc/fstab from it and mounts further file systems according to what is configured in fstab.

Here is a good description of the Linux boot process.
 
  


Reply


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
Modifying the Linux boot process.... jackstrat Linux - Newbie 3 01-15-2008 03:57 PM
Linux boot up process Vs. Windows boot up process darkskull Linux - Software 7 12-30-2006 04:21 PM
controlling the linux boot up process bahadur Linux - Software 4 07-14-2005 06:55 AM
Linux CD boot process amnesty_puppy Linux - General 1 11-29-2004 06:41 AM
A Question .. Linux boot process pyramid Linux - General 3 03-23-2001 06:43 AM


All times are GMT -5. The time now is 09:23 PM.

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