340 lines
13 KiB
HTML
340 lines
13 KiB
HTML
<!--startcut ======================================================= -->
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
<html><head>
|
||
<META NAME="generator" CONTENT="lgazmail v1.1pre9c">
|
||
<TITLE>The Answer Guy 31:
|
||
Kernel Overview needed....
|
||
</TITLE>
|
||
<!-- ORIGINAL SUBJECT:
|
||
Kernel Overview needed....
|
||
JTD SUBTITLE:
|
||
|
||
-->
|
||
</head>
|
||
|
||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
||
ALINK="#FF0000">
|
||
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
||
</H4>
|
||
<P> <hr> <P>
|
||
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||
<H1 align="center"><A NAME="answer">
|
||
<img src="../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
|
||
<a href="./index.html">The Answer Guy</a>
|
||
<img src="../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
|
||
</A></H1>
|
||
<BR>
|
||
<H4 align="center">By James T. Dennis,
|
||
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
|
||
<BR>Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
||
</H4>
|
||
<p><hr><p>
|
||
<!--endcut ========================================================= -->
|
||
<H3><img src="../gx/dennis/qbub.gif" alt="(?)"width="50" height="28"
|
||
align="left" border="0">Kernel Overview needed.... </H3><p><strong>From The Saint (mlkong) on 13 Jul 1998
|
||
in the</strong>
|
||
<a href="news:comp.unix.questions">comp.unix.questions</a>
|
||
<strong>newsgroup</strong></p>
|
||
|
||
<!-- begin body -->
|
||
|
||
|
||
<strong><p>Hello Answer Guy,
|
||
</p></strong>
|
||
|
||
|
||
<strong><p>I need infos on:-
|
||
<ul>
|
||
<li>the specialized startup routines of Linux.
|
||
</ul>
|
||
</p></strong>
|
||
|
||
|
||
<BLOCKQUOTE><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)" width="50" height="28" border="0" lign="bottom"
|
||
>There are several ways to start up a Linux kernel.
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE>The most common is to use a package called LILO
|
||
which involves using a Linux program called <TT>/sbin/lilo</TT>
|
||
to read a configuration program (usually <TT>/etc/lilo.conf</TT>)
|
||
and use the directives and declarations therein to build
|
||
a "boot record." A LILO boot record can be written to
|
||
the "master boot record" (MBR) of a hard drive, to a
|
||
floppy or to a "logical boot record" (a Linux filesystem's
|
||
"superblock").
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE>Using LILO you can prompt the user for options (multi-boot
|
||
and others), and even password protect specific boot
|
||
modes. LILO is pretty flexible and allows one to define
|
||
upto sixteen different boot configurations.
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE>It is also possible to write a Linux kernel directly to
|
||
a floppy diskette. If this is done (using a Unix/Linux
|
||
command like: <tt>dd if=./kenelimage of=/dev/fd0</tt>, or using
|
||
the appropriate "rawrite" commands for your OS) than
|
||
the floppy will boot the kernel. However, the major
|
||
limitation of this technique is that no parameters can
|
||
be passed to the kernel, making it very inflexible.
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE>Another method involves the use of the DOS program
|
||
<tt>LOADLIN.EXE</tt>. I'm told there is also an NT native version
|
||
of this program. <tt>LOADLIN</tt> allows you to load a Linux
|
||
kernel which is stored in a normal DOS file. Once it
|
||
is loaded it effectively kicks the previously loaded
|
||
OS out of memory underneath it. This is very similar
|
||
to the way that one loads Netware 3.x (<tt>SERVER.EXE</tt>).
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE><tt>LOADLIN</tt> can be called via a DOS batch file, or it can
|
||
be configured as at <tt>SHELL=</tt> or <tt>INSTALL=</tt> directive in
|
||
the MS-DOS <tt>CONFIG.SYS</tt>. This allows one to use the
|
||
multi-boot features of MS-DOS 6.x and later to boot
|
||
Linux.
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE><tt>LOADLIN</tt> also allows you to pass parameters to your
|
||
kernels. You can have as many kernels and configurations
|
||
as you can fit on your MS-DOS filesystems.
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE>Note that the Linux kernel is not required to "be on"
|
||
its root filesystem. You can use a boot record on
|
||
one device to load a Linux kernel from another device
|
||
which in turns mounts its root filesystem from some
|
||
other device (or even from "no device" --- the kernel
|
||
can have a RAM disk and use the <tt>initrd</tt> feature which
|
||
we'll cover in a few more paragraphs).
|
||
</blockquote>
|
||
|
||
<BLOCKQUOTE>It is also possible to create "El Torito" CD's for
|
||
Linux. The "El Torito" format for CD's allows many
|
||
of the newer systems and CD-ROM controllers to boot
|
||
an OS directly off of the drive.
|
||
<A HREF="http://www.redhat.com/">Red Hat</A> Inc.'s
|
||
CD's have been for the last few versions (at least
|
||
since 4.2 if I recall correctly). Note that this
|
||
only works if your BIOS or CD-ROM controller includes
|
||
the right features.
|
||
</blockquote>
|
||
|
||
<BLOCKQUOTE>There is also a program called <tt>SYSLINUX</tt> which allows
|
||
a Linux kernel to be written to an MS-DOS formatted
|
||
floppy and booted therefrom. I've never used that.
|
||
</blockquote>
|
||
|
||
<BLOCKQUOTE>On the PowerPC (Macintosh compatible systems, and
|
||
others) there are different mechanisms. These systems
|
||
use an "OpenBoot Firmware" which allows one to specify
|
||
things like boot devices, usually through an interactive
|
||
process, possibly involving a serial terminal connected
|
||
to the "modem" (RS-422?) port on these systems). There are
|
||
different versions of the OpenBoot firmware in different
|
||
Macs and Mac clones. This can be used to boot
|
||
<A HREF="http://www.linuxppc.org/">LinuxPPC</A>
|
||
(the "monolithic" kernel). It is also possible to use
|
||
a MacOS "Finder" application to boot
|
||
<A HREF="http://www.mklinux.apple.com/">MkLinux</A> (the
|
||
microkernel implementation of Linux for that platform).
|
||
</blockquote>
|
||
|
||
<BLOCKQUOTE>SPARC Linux uses SILO (and all SPARC machines that I've
|
||
ever heard of use OpenBoot --- or its predecessor "FCODE"
|
||
--- Sun introduced and published the whole OpenBoot
|
||
specification, which is essentially a small Forth kernel
|
||
in ROM for doing diagnostics, booting, and device
|
||
initialization and configuration). OpenBoot is used
|
||
on a number of workstation platforms --- I think recent
|
||
HP workstations all use it, too.
|
||
</blockquote>
|
||
|
||
<BLOCKQUOTE>On Alphas there are a couple of different (hardware
|
||
level) monitors that lead to the OS boot. I haven't
|
||
played with any of them, yet, but I'm told that MILO
|
||
is used on some (most?).
|
||
</blockquote>
|
||
|
||
<blockquote>As we move away from the question of "how does it get
|
||
into memory" we can ask what other features are unique
|
||
to the Linux start-up. On unusual feature is "<tt>initrd</tt>"
|
||
the option to create an "initial RAM disk image" ---
|
||
this is a compressed archive that is extracted into
|
||
a RAM disk, and it allows one to have a modular kernel
|
||
and a script that loads the desired modules from the
|
||
RAM disk. It is also possible to create multi-volume
|
||
"boot/root" and "boot/init/root" sets of Linux.
|
||
</blockquote>
|
||
|
||
<P><STRONG><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)" width="50" height="28" border="0" lign="bottom">
|
||
<ul>
|
||
<li>a move toward totally modulat kernel? What does it means?
|
||
</ul>
|
||
</strong></p>
|
||
|
||
|
||
<BLOCKQUOTE><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)" width="50" height="28" border="0" lign="bottom"
|
||
>I don't know what a "totally modular kernel" means.
|
||
You still have the option to compile a Linux kernel
|
||
with various options "built-in" and others built as
|
||
separate modules. You can do this in many combinations.
|
||
</blockquote>
|
||
|
||
|
||
<BLOCKQUOTE>With <tt>initrd</tt> you can create a kernel that doesn't even have
|
||
the driver for its primary drive controllers built-in
|
||
(it would be a module in the initrd image and would be
|
||
auto loaded by either the "<tt>kerneld</tt>" (or "<tt>kmod</tt>") feature
|
||
or by using an "<tt>insmod</tt>" or "<tt>modprobe</tt>" command from the
|
||
<tt>/initrc</tt> script that's extracted unto the RAM disk).
|
||
</blockquote>
|
||
|
||
<blockquote>I personally don't do this. I build my primary
|
||
disk controller driver and my primary ethernet card
|
||
drivers directly into my kernels.
|
||
</blockquote>
|
||
|
||
<P><STRONG><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)" width="50" height="28" border="0" lign="bottom">
|
||
<ul>
|
||
<li>overview of the basic kernel organization.
|
||
</ul>
|
||
</strong></p>
|
||
|
||
<BLOCKQUOTE><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)" width="50" height="28" border="0" lign="bottom"
|
||
>see below.
|
||
</blockquote>
|
||
|
||
<P><STRONG><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)" width="50" height="28" border="0" lign="bottom"
|
||
><ul>
|
||
<li>important differences found in tak oriented splinter splinter trees.
|
||
</ul>
|
||
</strong></p>
|
||
|
||
<BLOCKQUOTE><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)" width="50" height="28" border="0" lign="bottom"
|
||
>I have no idea what a "task oriented 'splinter, splinter' tree"
|
||
would be.
|
||
</blockquote>
|
||
|
||
<P><STRONG><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)" width="50" height="28" border="0" lign="bottom"
|
||
>For your information i'm an undergraduate doing a research on this
|
||
topics. Please help cause i'm in a dark over Linux operating
|
||
system!!
|
||
</strong></p>
|
||
|
||
<BLOCKQUOTE><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)" width="50" height="28" border="0" lign="bottom"
|
||
>These last two questions are far deeper into the Linux
|
||
kernel code that I have gone.
|
||
</blockquote>
|
||
|
||
<blockquote>You'll probably want to start by reading:
|
||
</blockquote>
|
||
|
||
<dl>
|
||
<dt>Linux Kernel Internals, 2nd Ed. (ISBN: 0-201-33143-8)
|
||
<dd>by:
|
||
<br>Beck, M. <br>B\"ohme, H
|
||
<br>Dziadzka, M <br>Kunitz, U.
|
||
<br>Magnus, R. and <br>Verworner, D.
|
||
<br>Published by Addison-Wesley in 1997
|
||
</dl>
|
||
|
||
<blockquote>... you'll want to look at the LDP KHG (the Linux
|
||
Documentation Project's <em>Kernel Hacker's Guide</em>)
|
||
(<A HREF="http://sunsite.unc.edu/LDP/">http://sunsite.unc.edu/LDP/</A>
|
||
and many mirrors).
|
||
</blockquote>
|
||
|
||
<blockquote>You'll undoubtedly want to also extract a copy of
|
||
the sources, possible for several versions of the
|
||
Linux kernel, and look at the directory structures
|
||
and read some of the code. That will reveal <em>everything
|
||
that's important</em> about the organization of the kernel.
|
||
</blockquote>
|
||
|
||
<blockquote>One of these days I'd like to see a "Linux Kernel
|
||
Sources Annoted Study Guide" --- telling me where to
|
||
start (<tt>/usr/src/linux/arch/i386/boot</tt> --- <tt>bootsect.S</tt> or
|
||
<tt>setup.S</tt>?) and walks through all of the code until a
|
||
simple, hypothetical system completes a shutdown.
|
||
Of course it would be nice to see the video, too!
|
||
</blockquote>
|
||
|
||
<blockquote>Another thing you could do is look through the archives
|
||
of the kernel mailing list, even join it and read through
|
||
some of the traffic that flows through there. That is the
|
||
principle medium of communications for the developers who
|
||
collaborate on the Linux kernel.
|
||
</blockquote>
|
||
|
||
<blockquote>For comparison you might also look for overviews of the
|
||
<a href="http://www.freebsd.org/">FreeBSD<a>,
|
||
<a href="http://www.netbsd.org/">NetBSD</a>, and
|
||
<a href="http://www,openbed.org/">OpenBSD</a> development projects.
|
||
</blockquote>
|
||
|
||
<P><STRONG><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)" width="50" height="28" border="0" lign="bottom"
|
||
>Thanks.
|
||
Email me back ASAP please...
|
||
</strong><p>
|
||
<!-- end body -->
|
||
|
||
<!--================================================================-->
|
||
<P> <hr> <P>
|
||
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
|
||
>Copyright ©</a> 1998, James T. Dennis <BR>
|
||
Published in <I>Linux Gazette</I> Issue 31 August 1998</H5>
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
<table width="98%"><tr valign="center" align="center">
|
||
<td rowspan="3"><A HREF="./lg_answer31.html"><IMG
|
||
SRC="../gx/dennis/answernew.gif"
|
||
ALT="[ Answer Guy Index ]"></A></td>
|
||
<td><A HREF="tag_backup.html">backup</A></td>
|
||
<td><A HREF="tag_uidgid.html">uidgid</A></td>
|
||
<td><A HREF="tag_connect.html">connect</A></td>
|
||
<td><A HREF="tag_95slow.html">95slow</A></td>
|
||
<td><A HREF="tag_badblock.html">badblock</A></td>
|
||
<td><A HREF="tag_trident.html">trident</A></td>
|
||
<td><A HREF="tag_sound.html">sound</A></td>
|
||
|
||
</tr><tr valign="center" align="center">
|
||
<td><A HREF="tag_kernel.html">kernel</A></td>
|
||
<td><A HREF="tag_solprint.html">solprint</A></td>
|
||
<td><A HREF="tag_idescsi.html">idescsi</A></td>
|
||
<td><A HREF="tag_distrib.html">distrib</A></td>
|
||
<td><A HREF="tag_modem.html">modem</A></td>
|
||
<td><A HREF="tag_NDS.html">NDS</a></td>
|
||
<td><A HREF="tag_rpm.html">rpm</A></td>
|
||
|
||
</tr><tr valign="center" align="center">
|
||
<td><A HREF="tag_guy.html">guy</A></td>
|
||
<td><A HREF="tag_maildns.html">maildns</A></td>
|
||
<td><A HREF="tag_memleak.html">memleak</a></td>
|
||
<td><A HREF="tag_multihead.html">multihead</A></td>
|
||
<td><A HREF="tag_cdr.html">cdr</A></td>
|
||
</tr></table>
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif"
|
||
ALT="[ Table Of Contents ]"></A>
|
||
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
|
||
ALT="[ Front Page ]"></A>
|
||
<A HREF="lg_bytes31.html"><IMG SRC="../gx/back2.gif"
|
||
ALT="[ Previous Section ]"></A>
|
||
<A HREF="./searls.html"><IMG SRC="../gx/fwd.gif"
|
||
ALT="[ Next Section ]"></A>
|
||
<!--startcut ======================================================= -->
|
||
</body>
|
||
</html>
|
||
<!--endcut ========================================================= -->
|
||
|
||
|