1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
|
<!--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 ========================================================= -->
|