Linked by David Adams on Sat 17th May 2008 03:39 UTC, submitted by IdaAshley
General Unix Ever wonder what makes a computer tick or how a UNIX server does what it does? Discover what happens when you push the power button on your computer. This article discusses the different boot types, managing the AIX bootlist and the AIX boot sequence. After reading this article, you will better understand what exactly happens when your server starts.
Thread beginning with comment 314675
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Comment by sonic2000gr
by Doc Pain on Sat 17th May 2008 23:52 UTC in reply to "Comment by sonic2000gr"
Doc Pain
Member since:
2006-10-08

Interesting article. I like this complicated technical stuff. :-) Allthough I don't have much experience with AIX (due to OS/390 running on the AS/400), many things mentioned in the article are understandable, obvious, logical and expectable when you're coming from a UNIX background. So no matter which particular kind of UNIX or Linux you're using, most things look familiar.

Not very different from many other *NIX systems, going through boot loader, kernel and init and using runlevels and an inittab file.


The alternative to the runlevels is the use of an rc script and the rc.d/ entries, such as it is the case in the FreeBSD OS. Refer to "man boot", "man loader", "man init" and "man rc" for further education.

By the way for everyone wishing to learn this stuff in more details and for different systems (Linux, FreeBSD, HP-UX) may I suggest the "Unix System Administration Handbook" (Nemeth et al). It is an excellent read, a real eye opener.


Another interesting read: "The magic garden explained" by Goodheart and Cox, pp 48, 273.

Knowing how your system boots, especially how the init scripts work will make you much more confident in using it and configuring it.


I already hear someone screaming: "But the PC does it on its own! I don't want to know anything!" :-)

Reply Parent Bookmark Score: 2

RE[2]: Comment by sonic2000gr
by kev009 on Sun 18th May 2008 00:49 in reply to "RE: Comment by sonic2000gr"
kev009 Member since:
2006-11-30

You probably don't have much experience with OS/390 either, considering it runs on S/390 (now System z)...

Reply Parent Bookmark Score: 1

RE[3]: Comment by sonic2000gr
by Doc Pain on Sun 18th May 2008 10:05 in reply to "RE[2]: Comment by sonic2000gr"
Doc Pain Member since:
2006-10-08

Long time ago, brain not sufficiently functioning... :-)

//SYSIN DD *

You probably don't have much experience with OS/390 either, considering it runs on S/390 (now System z)...


Of course you're right. It was OS/400 on the AS/400 (the older, beige ones), doing Cobol, Fortran, and of course JCL. By the way, on today's z Series sytems, you'll find z/OS, too (a system which I had the time to play a little with).

Off topic, ABEND. =^_^=

/*

Reply Parent Bookmark Score: 2

RE[2]: Comment by sonic2000gr
by sonic2000gr on Sun 18th May 2008 11:57 in reply to "RE: Comment by sonic2000gr"
sonic2000gr Member since:
2007-05-20


The alternative to the runlevels is the use of an rc script and the rc.d/ entries, such as it is the case in the FreeBSD OS. Refer to "man boot", "man loader", "man init" and "man rc" for further education.


Hehe, I think we are two of the most prominent BSDers in this site ;)

I already hear someone screaming: "But the PC does it on its own! I don't want to know anything!" :-)


We all know which OS users cry out like that ;)

Reply Parent Bookmark Score: 2

parentaladvisory Member since:
2006-12-18

Doc Pain wrote: "The alternative to the runlevels is the use of an rc script and the rc.d/ entries, such as it is the case in the FreeBSD OS. Refer to "man boot", "man loader", "man init" and "man rc" for further education."

I have seen these rcX directories on some Linux distrobutions, and my debian installation has a init.d/ and several rcX.d/ direcotries in /etc.
In these rc0,1,2,3,4,5,6.d/ direcories are symlinks to scripts in /etc/init.d/, and it seems to me at least that this system uses both "rc.d/ entries" and runlevels, so I dont really get the destinction between rc-directories ans runlevels...
Care to explain? ;)

Edited 2008-05-18 19:38 UTC

Reply Parent Bookmark Score: 1

sonic2000gr Member since:
2007-05-20

I have seen these rcX directories on some Linux distrobutions, and my debian installation has a init.d/ and several rcX.d/ direcotries in /etc.
In these rc0,1,2,3,4,5,6.d/ direcories are symlinks to scripts in /etc/init.d/, and it seems to me at least that this system uses both "rc.d/ entries" and runlevels, so I dont really get the destinction between rc-directories ans runlevels...
Care to explain? ;)


Have a look at your /etc/inittab file. You will find a line that says something like:

id:2:initdefault:

This means that when you system, starts normally, it enters runlevel 2. Now move a few lines down, and you will see this:

l2:2:wait:/etc/init.d/rc 2

This basically means the rc script will execute the scripts in /etc/rc2.d

Now, have a look at the scripts in /etc/rc2.d:

An example:

S20ssh -> ../init.d/ssh

this starts the ssh server. Obviously it is just a link to a script in init.d, but the rc script reads this from /etc/rc2.d. The name and number are significant too. The 20 signifies the order of the script. For example this:

S19nis -> ../init.d/nis

executes before ssh. The "S" in the name means the rc script will call this script with a "start" argument. Essentially, S20ssh is like writing:

/etc/init.d/ssh start

If it had a "K" instead of an "S" it would be called with a "stop" argument.

Have a look at your /etc/rc1.d scripts. These are called when you switch to single user mode (runlevel 1). You will see that quite a few services are stopped (or "K"illed) when entering runlevel 1:

K80nfs-kernel-server -> ../init.d/nfs-kernel-server

this calls /etc/init.d/nfs-kernel-server stop, so NFS sharing is stopped when you enter single user mode.

There are also two "special" (or transient) runlevels, namely 0 (for shutdown) and 6 (for reboot). Have a look at the scripts there too.

After all, it is not a difficult system ;)

Reply Parent Bookmark Score: 2