[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a segue from Lilo to Linux boot
>> >And don't be shy about asking questions.
>
>Me and my big mouth! (just kidding! ;)
hey, i'm not kidding, i owe you (at least!) your favorite
beverage for the advice both this year and last.
>DISCLAIMER:
>Since you didn't specify, I'm assuming you're running Redhat
>for all the startup questions. If not, please ignore!
nope, i am running RedHat 6.1 on my main server and it's working
quite nicely thanks to you.
>> well, uh, i have a couple questions. what's the right place
to
>> put a "stty -F /dev/ttyS0 19200" to make sure it happens
before
>> the lpd daemon is started? In /etc/rc.d/rc3.d/S60lpd? Or
>> someplace that gets called before it?
>
>Does it have to be run before lpd?
>If not, add it to the end of /etc/rc.d/rc.local .
>
>The /etc/rc.d/rc?.d/* files are symbolic links,
>not actual files (at least on Redhat!) so you can't
>put anything there. The actual scripts are in
>/etc/rc.d/init.d/* (at least on Redhat!)
thanks. you told me that last year and I managed to forget.
sorry.
these are exactly the kinds of things that have been bugging me
since i started goofing with Linux. Like, i know the basic Unix
commands, but I don't know the magic incantations like "setup"
and "Xconfigurator" and "sndconfig" that run when i do a RedHat
install. I'd like to study these apps, and their sources to
figure out what's going on when the wheels fall off (like they
did earlier this week.)
>You could modify /etc/rc.d/init.d/lpd and add the stty
>command, but it may get lost on the next update.
>
>Otherwise, you could add this to the end of rc.local:
>
> /etc/rc.d/init.d/lpd stop
> stty -F /dev/ttyS0 19200
> /etc/rc.d/init.d/lpd start
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?)
>> And what's the right place to launch smbd and nmbd?
>
>On Redhat, it's should start for you automatically.
>From a shell prompt, type: "setup", pick "System services",
>and you should be able to turn on Samba. (again Redhat!)
that last paragraph is worth gold.
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.
>> how does /etc/inetd work?
>
>It monitors the ports specified in /etc/inetd.conf by name.
>The name to port number table is in /etc/services .
ok, it comes back to me, and any attempt to connect to that
socket causes the inetd daemon to launch the associated socket
server. bingo. also major useful bit of knowledge, since i've
been toying with some nefarious socket programming at work.
>When someone connects to the specified port, inetd starts
>the program associated with the port in /etc/inetd.conf ,
>usually through "tcpd" - the TCP wrapper program.
thanks!
>> i'm a little fuzzy on the steps that happen when a linux box
>> boots, and i'd be obliged if someone could point me to where
>> that's documented. this could be an interesting question
because
>> I think it gets into the differences between RedHat, Corel,
>> SUSE, Slackware, and all the others.
>>
>> Methinks a document describing the operational differences of
>> the distributions could be useful. i'd be willing to lend my
>> small literary skills to the task if everyone thinks this a
>> thing worth doing.
>
>Sounds like a good idea, but I haven't used many distributions
>other than Redhat. Can't help you there.
well, here's what I think could happen.
1. someone documents what happens on RedHat boot up. in
exhaustive detail.
2. someone else says, that's exactly what Mandrake does, except
that...
as you know, Mandrake is almost the same as RedHat, and many
other distros are based on RedHat, ergo, their differences will
be minor and easily documented.
3. then some brave soul will say, this is what Debian does, and
its completely different...
4. someone else says, that's exactly what Corel does, except
that...
then we have to find brave souls for SUSE, and Caldera, and
Slackware, and walla.
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.
(am i right so far?)
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.
(am i right so far?)
Depending upon something i don't understand called a "Run
Level," one of many families of scripts are selected in the step
above.
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?
(please feel free to heap abuse and scorn upon these manic
ravings. <grin>)
steve