[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a segue from Lilo to Linux boot



>I did something different. If you look at the script that calls
>rc.local, you'll see a statement that says (in pseudocode)
>
>if rc.serial exists then
>    execute rc.serial
>fi
>So, instead of modifying rc.local, it makes better sense to
>create a rc.serial that has the single line:
>stty -F /dev/ttyS0 19200
>The good thing is that this happens (i think) before lpd gets
>launched. and thus the lpd stop/start is unnecessary. methinks
>that rc.serial is the right answer, because that's when Linux
>expects ttys to be set to custom settings. (but what do i know?)

Yes, this is the right place to do that.  Most RH boxes 
don't have an rc.serial as PC hardware typically doesn't 
do much with serial (unfortunately).  The nice thing about 
a seperate rc.serial files is you can run it again later 
to restore your serial setting to a known default if 
you louse them up.

>i didn't know about the "setup" command, it was one of those
>cool things i hoped was in RedHat, and was probably documented
>up the wazoo, but i managed to not see, and thus worked 10x
>harder than i had to. this is a major good thing to know.

I think the RH tools are poorly documented, in fact, is is easily possible to over look that they even exist.

>So, what is the *first* thing that RedHat does when it comes up?
>I see the letters "LI"
>and if my hard disks aren't wacked, the letters "LO" follow
><grin>
>That's LILO (duh!), and I figure it reads the command line (or
>times out) and gets the selected (or default) Linux image off
>disk (or the network???idunno???) and loads the image, passing
>various params (from command line or lilo.conf) to it.

LILO is a boot loader and not really Linux.  The number of letters that appears tells you how far LILO got, and is very usefull for debugging boot realted problems.  What Lilo does and how the kernel gets loaded is actually a large and fasicnating topic.

>So, this Linux image gets loaded into RAM and then it does
>something (WHAT?) along the way it goes to /etc and(or)
>/etc/rc.d/init.d reads some shell scripts and executes them.

The kernel mount the root filesystem (which is defined in 
the kernel image itself or as a lilo parameter that is 
passed to the kernel) and runs a program called "init".  
init is the father of all processes.

>Depending upon something i don't understand called a "Run
>Level," one of many families of scripts are selected in the step
>above.

init reads a config file called /etc/inittab and find the default run
level there.  Then it runs a series of programs as defined for 
that runlevel.  This allows a machine to have multiple modes of 
operation.  Level 1 is typically single user, with no server
processes running and is used for maint.  Level 3 is multi-user or
server mode with no local X display, level 5 id typically a 
workstation running in multi-user mode with a local X display.

>Anyhow, all these scripts launch a buncha daemons that provide
>all the services of Linux. Including the getty daemon that lets
>you login thru a teletype terminal at 300bps. right?

init runs some scripts once, such as the startup scripts, and 
starts other processes and keeps them going (NT services?) such
as getty or xdm.  It can also respond to certain signals such
as power-fail from a UPS, which starts a shutdown coutdown, and
the ability to cancel the shutdown if power is restored.

>(please feel free to heap abuse and scorn upon these manic
>ravings. <grin>)

              IDIOT
            ABUSESCORN
         STUPIDITYFOOLISHNESS
       REPUBLICANMORONDEMOCRAT
     WINBLOZEHOSERLOOSERGETLOST