LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-04-2006, 09:32 PM   #1
ltordsen
LQ Newbie
 
Registered: Aug 2005
Distribution: suse 9.3
Posts: 16

Rep: Reputation: 0
what happens before the file system is mounted?


Hi.

Can anyone point me to some documentation on what happens before the file system is mounted? I've been googling, but maybe not using the right key words or something.
 
Old 10-04-2006, 09:48 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Basically it goes like this.

The motherboard BIOS loads and runs the boot loader from the MBR of the specifiied boot device.
The bootloader loads and runs the kernel.
The kernel starts the init process.
The init process mounts the root file system read only and reads the /etc/inittab file.
At this point different distributions do different things.
The init process may execute the rc.local script or it might execute the /etc/init.d/boot script or some other script.
This script will eventually call all of the other boot scripts one way or another. One of these scripts will fsck the root partition and then mount it read/write.
Then the init process goes back to the /etc/inittab file to see what should be done last such as spawining sulogin or login on all of the virtual console terminals. The part of the inittab file that says things like 2:2345:respawn:/sbin/mingetty tty2 will be read by the init process and the init process will make sure that the respawn is done whenever it is required, such as when someone logs in and then logs off of a console terminal.

And that's it.

It's basically like a badly written application with subroutines that call other subroutines but eventually all of the subroutines exit and you get back to the main() function, which is where the init process remains running for the duration of the operating system incarnation. This style of programming is called spaghetti code.

Last edited by stress_junkie; 10-04-2006 at 09:59 PM.
 
Old 10-06-2006, 11:49 AM   #3
ltordsen
LQ Newbie
 
Registered: Aug 2005
Distribution: suse 9.3
Posts: 16

Original Poster
Rep: Reputation: 0
Ok thanks. That helps a little.
 
Old 10-06-2006, 05:44 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by ltordsen
Ok thanks. That helps a little.
What do you mean "... a little." That's the whole story unless you want someone to type in the code.
 
Old 10-07-2006, 12:57 PM   #5
ltordsen
LQ Newbie
 
Registered: Aug 2005
Distribution: suse 9.3
Posts: 16

Original Poster
Rep: Reputation: 0
I was looking for documentation.
 
Old 10-07-2006, 02:17 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
tldp.org is a good place to start looking for Linux documentation.

http://tldp.org/HOWTO/Linux-Init-HOWTO.html

http://tldp.org/HOWTO/Linux-Init-HOWTO-2.html

Last edited by stress_junkie; 10-07-2006 at 02:31 PM.
 
Old 10-07-2006, 06:34 PM   #7
ltordsen
LQ Newbie
 
Registered: Aug 2005
Distribution: suse 9.3
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks.

That is more what I was looking for. I had been googling it, but couldnt seem to find the right key words or something.
 
  


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
Detect storage device by checking mounted file system to Linux syseeker Programming 4 02-06-2006 10:14 AM
mounted Operating System sailu_mvn Linux - Software 4 10-17-2005 04:39 AM
browsing mounted file system explorer Linux - General 4 05-02-2003 07:55 PM
A mounted file system inside an NFS mount paradoxlight Linux - Networking 1 04-24-2002 08:34 PM


All times are GMT -5. The time now is 08:12 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