Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: Kakvo pravi komputara pri startirane na LInux?


  • Subject: Re: lug-bg: Kakvo pravi komputara pri startirane na LInux?
  • From: raptor <raptor@xxxxxxxxxx>
  • Date: Wed, 27 Aug 2003 11:39:58 +0300
  • Cc: ohtya@xxxxxxxxxxxxxxxxx

On Wed, 27 Aug 2003 09:57:22 +0300
Yasen Atanasov <ohtya@xxxxxxxxxxxxxxxxx> wrote:

|	Mogebi ne sum se izrazil suvsem yaseno no ideyata e slednata: v erata na 
|DOS se zaneshe, che sled POST se chete bootsektora.Tam ima informaciya kude 
|sa sistemnite failove zaregdat tezi sistemni failove(*IO.SYS i *DOS.SYS) 
|sled koeto se tursi CONFIG.SYS zaregdat se fajlovete ukazani v nego, 
|zaregdase chast ot COMMAND.COM, tursise AUTOEXEC.BAT, ispulnyavat se 
|komandite zapisani v nego i se dozaregda COMMAND.COM. Iteresuva me dali 
|sushtestvuva nyakade podobno opisnanie za LInux.
|

Tyrsi w google.com - grub/lilo, initrd ..za towa kakwo stawa predi da zapochne init procesa...
man inittab
man init


Inache eto kratko opisanie... (pisal sam go edno wreme sorry che e na angliiski, prosto cut&paste)

 In the Unix world initial system initialization is handled by the "init", and the main configuration file is /etc/inittab, which describes so called "runlevels".Runlevels are software configurations of the system which allows only selected group of processes to exist i.e. system states. There is 6 runlevels.
Runlevel 0 - is used to halt the system.
Runlevel 1 - is single user mode
Runlevel 2-5 - are multiuser levels, where all the necessary daemons are started i.e. working states. different unixes use them in different way.
Runlevel 6 - is used to reboot the system
Runlevel S or s - is used to execute scripts when entering runlevel 1.
There is two main "initialization sequences" used in todays unixes. BSD style (mostly used by BSD unixes) and SysV style(most of the Linux distributions use this style, even the latest Slackware Linux).
-----+ redhat +-----
RedHat uses SysV like initialization.
Here is the purpose of runlevels under it :
0 - halt (Do NOT set initdefault to this)
1 - Single user mode
2 - Multiuser, without NFS (The same as 3, if you do not have networking)
3 - Full multiuser mode
4 - unused
5 - X11
6 - reboot (Do NOT set initdefault to this)
There is two main directories that are responsible for the 90% of the work involved to bringing the system up /etc/rc.d/ and /etc/sysconfig.
As we may see from /etc/inittab first is started
/etc/rc.d/rc.system - this script takes care about loading keymap and system fonts, setting host and NIS name, checking filesystems, activating the SWAP, mounting filesystems, setting PNP devices, checking quotas, loading all necessary kernel modules, setting RAID devices, cleaning lock,pid etc files, setting the clock, setting serial ports(/etc/rc.serial), setting preffered display manager link ...
Next, as you may see from /etc/inittab : id:3:initdefault: the system goes to runlevel 3, l3:3:wait:/etc/rc.d/rc 3 which start /etc/rc.d/rc 3, then this script executes all the scripts from /etc/rc.d/rc3.d directory. ( The rcx.d directoiries contains links to the scripts that are located under /etc/rc.d/init.d)
If you look at this directory you will see two type of files begining with K(kill) and S(start). Every script has a number those of them with lower number take precedence.
The scripts that begin with K are executed first, these files are for the deamons that must be shuted down in this runlevel.
Next those beginng with S are started.
What really RedHat do ? Let's take for example /etc/rc.d/rc3.d/S10network for this link /etc/rc.d/rc executes this : /etc/rc.d/init.d/network start And for the /etc/rc.d/rc3.d/K50inet executes : /etc/rc.d/init.d/inet stop What really is happening is ... If the deamon is started in the right way the start script must create a lock file in /var/lock/sybsys directory, so if this file is missing but the daemon is still started RedHat will kill or shutdown him.
There is one subtle thing to note here the last script that is started is /etc/rc.d/rc3.d/S99local i.e. /etc/rc.d/rc.local start If you want something to be executed every time the system is startes you can put your own code here. When all the deamons for this runlevel are started the system is in its working state. Now when you know what overally is happening at boot time, take closer look at the networking part below.

============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.