LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-13-2008, 05:51 AM   #1
leedude
Member
 
Registered: Jan 2007
Location: Scotland
Distribution: Fedora, Debian
Posts: 81

Rep: Reputation: 15
how does this work in unix?


hi, just some questions from a wannabe linux/unix guru.

ive just discovered what fstab is for:
defining where things are to be mounted upon startup(correct?)
it also defines what drive is mounted to /.

this is where I am confused. how does this file get read, if it resides in /? (/ being a mountpoint that IT defines)

I am reminded of a curiosity about minix i have:
It says that in minix, the memory management runs as a user process.
How do you start this process if there is no memory manager active?????? Wouldnt the memory manager need to have it's memory allocated....by a memory manager??


also, what are these files:
.bashrc
.bash_profile

I think they are for starting programs, setting variables when a user logs in. if this is the case, why are there two of them?


These things have been bugging me for some time, can somebody please shed some light on the above?

Lee.
 
Old 07-13-2008, 06:07 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
ftsab doesn't just say what filesystems are mounted where, it also says what filesystem options are used.

When booting (either using GRUB or LILO) the system is told where to find the boot partition so that it can read the ftsab file and perform a complete boot (after all, the startup scripts are also located on /).

As a part of the boot process, the fstab file is read and then / is remounted (along with all the other partitions) using the mount options specified in /etc/fstab.

I hope this clarifys things for you.
 
Old 07-13-2008, 08:27 AM   #3
lwasserm
Member
 
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
You are right about the bash files, they set variables and various other things. The reason for 2 files is that .bash_profile is read only when logging in; .bashrc is read whenever a shell is started, for instance when opening a terminal.
 
Old 07-13-2008, 09:42 PM   #4
bcwagne
Member
 
Registered: Feb 2008
Distribution: Debian, OSX, PCBSD
Posts: 162

Rep: Reputation: 31
That is right. The filesystems are mounting read only to start. Once the appropriate files are read, (fstab in this case), the filesystems are mounted with the proper options in place. If you read through all the boot messages carefully, you will see one which says something like "mounted root filesystem read only" and then a little later one which says it has been mounted read/write.
 
  


Reply

Tags
bash, fstab, mounting, process


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
LXer: Make UNIX and Linux work together LXer Syndicated Linux News 0 07-27-2007 12:32 AM
A bit off-topic but what is Unix exactly and how does it work? Mr. Hill Linux - Newbie 19 03-01-2005 12:40 AM
Can Linux work in a Unix mode? police8677 Linux - Software 8 10-21-2003 10:03 AM
EMACS won't work on unix from command line! jcrapps Programming 2 02-03-2003 10:06 PM
a c program written for linux will work in sco unix? cybercop12us Linux - General 3 04-25-2002 07:44 AM


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