rhl52.htm
来自「linux的初学电子书」· HTM 代码 · 共 2,314 行 · 第 1/5 页
HTM
2,314 行
<P>where the last filename in the link command is the name of the current library file in /lib. Your library name may be different, so check the directory and release or installation notes first.
<BR>
<P>You would also need to change the symbolic link for the file libm.so.version in the same manner. Do not delete the symbolic links; all programs that depend on the shared library (including ls) would be unable to function without them.
<BR>
<BR>
<A NAME="E68E405"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Developing Modules</B></FONT></CENTER></H3>
<BR>
<P>A module is an object file that is loaded at runtime by the Linux kernel. Modules offer a bit of functionality that does not have to be loaded in memory all the time. When a particular function in a module is found, the Linux kernel will load it in.
Types of modules include, but are not limited to, the following:
<BR>
<UL>
<LI>Tape module via the ftape module
<BR>
<BR>
<LI>PPP/SLIP modules
<BR>
<BR>
<LI>CD-ROM modules
<BR>
<BR>
</UL>
<P>First check to see if your kernel supports modules. To do this, run the make config command and see what the default response to the question of "dynamic loading support" is. If the answer to this question is not Yes, you should answer Yes,
and then rebuild, install, and boot from a new kernel. If the system already supports modules, you can begin with the next step of making modules.
<BR>
<P>To make the modules on your system, go to /usr/src/linux directory and run the two commands:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">make modules
<BR>
make modules_install.</FONT></PRE>
<P>Be prepared to wait a while.
<BR>
<P>To list the current modules in your kernel, use the lsmod command. To insert a module, use the command insmod moduleName. To remove a module, use the command rmmod moduleName. Modules can be loaded automatically by placing the commands to load them in
the /etc/rc.d/rc.sysinit file.
<BR>
<BR>
<A NAME="E68E406"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>The Red Hat Live File System</B></FONT></CENTER></H3>
<BR>
<P>Red Hat offers a "live" file system on CD-ROM. If you are short on disk space or do not want the entire Red Hat distribution on your hard drive, you can run off the CD-ROM with the "live" file system. It's easy to mount the CD-ROM as
an extension of the file system with the command:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">mount -t iso9660 /dev/cdrom /mntFS</FONT></PRE>
<P>From then on the CD-ROM will be accessed under the /mntFS directory. To check out the source files, and so on for your Red Hat distribution you would look in the directory /mntFS/live/usr/src/linux. The Red Hat subdirectory under the
/mntFS/live/usr/src/ directory is empty. (An oversight you ask? No, if you buy the official version from Red Hat you get a second CD with the source tree on it!)
<BR>
<P>There are only a few subdirectories under the live file system. These directories are listed here relative to the /mntFS/live tree:
<BR>
<PRE>
<FONT COLOR="#000080">total 145
drwxrwxr-x 16 root root 2048 Mar 6 13:53 .
drwxr-xr-x 6 root root 2048 Mar 6 13:32 ..
-r—r—r— 1 root root 586 Mar 6 14:10 TRANS.TBL
drwxr-xr-x 2 root root 8192 Mar 6 13:45 bin
drwxr-xr-x 2 root root 2048 Mar 6 13:45 boot
drwxr-xr-x 3 root root 77824 Mar 6 13:45 dev
drwxr-xr-x 11 root root 12288 Mar 6 13:45 etc
drwxr-xr-x 6 root root 2048 Mar 6 13:45 home
drwxr-xr-x 3 root root 6144 Mar 6 13:45 lib
drwxr-xr-x 2 root root 2048 Mar 6 13:32 lost+found
drwxr-xr-x 4 root root 2048 Mar 6 13:45 mnt
dr-xr-xr-x 29 root root 6144 Mar 6 13:46 proc
drwxr-xr-x 4 root root 2048 Mar 6 13:46 root
drwxr-xr-x 2 root root 10240 Mar 6 13:46 sbin
drwxrwxrwx 3 root root 2048 Mar 6 13:46 tmp
drwxr-xr-x 19 root root 4096 Mar 6 13:45 usr
drwxr-xr-x 13 root root 2048 Mar 6 13:46 var</FONT></PRE>
<P>Most of these subdirectories are not as heavily populated as the root directory of a hard disk installed system.
<BR>
<P>Running off the CD-ROM may save you disk space, but it certainly does not save you time. Also, you cannot configure some important files in directories off the mount point. The inability to read/write certain directories even as root may cause some
system administrative scripts to fail.
<BR>
<P>Also, the performance of the system when run from the CD-ROM on a 486 DX4, with 32MB of RAM, was slow. Really, there should be no need to run any serious application by running off the CD-ROM. You can install fewer components if you have to. Actually
running off the CD-ROM is very slow and really intended for trying out packages and loading files from your CD-ROM. Do not attempt to run off the CD-ROM even if you have a 6X drive since the performance will be very slow.
<BR>
<P>Also, keep in mind that to run off the CD-ROM you will need to create boot disks as described in the first three chapters of this book. The image to use for CD-ROM boot capability for the RAM disk is called liveram.img. In addition to the RAM disk, you
will have to have a blank, formatted disk to use as your data repository. Please refer to the installation sections in the first three chapters of this book on how to create boot and ram disks. Please see <A HREF="rhl04.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl04.htm">Chapter 4</A>,
"LILO," for more information.
<BR>
<BR>
<A NAME="E68E407"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>An Introduction to the Linux Source Tree</B></FONT></CENTER></H3>
<BR>
<P>The Linux source code can be found in the /usr/src/linux directory.
<BR>
<P>You will need to look at the source code if you want to make enhancements to the kernel. For the reader interested in kernels, this directory is a very good reference.
<BR>
<P>The first point to start is to look in the /usr/src/include directory and see what header files you have available. This way you can tell what system services are available. (See Table 52.1.) I have deliberately left out redundant, old, or unused
headers files. By examining the header files, you can see what files and systems are available in Linux.
<BR>
<BR>
<P ALIGN=CENTER>
<CENTER>
<FONT COLOR="#000080"><B>Table 52.1. Linux header files.</B></FONT></CENTER>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>FILE </I>
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Description</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
a.out.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Generated for the GNU C compilers.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
autoconf.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Automatically generated C config file, don't edit it!</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
aztcd.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Definitions for an AztechCD268 CD-ROM interface.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
binfmts.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Binary formats for the files.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
bios32.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
BIOS32, PCI BIOS functions and defines.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
blkdev.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Block device information.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
busmouse.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Header file for Logitech Bus Mouse driver.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
cdrom.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
General header for all CD-ROM drives.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
cdu31a.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Definitions for a Sony interface CD-ROM drive.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
coff.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The COFF file format definitions.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
config.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Linux kernel configuration header.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
ctype.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Standard C types header.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
cyclades.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
For the Cyclades devices.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
debugreg.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Debug registers header file.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
delay.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Delay routines for precomputed loops_per_second value.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
elf.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The Executable and Linking format definitions.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
errno.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The standard error return definitions.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
etherdevice.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Ethernet device handlers declarations.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
ext2_fs.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The new extended filesystem (e2fs) declarations.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
ext_fs.h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The ext filesystem (efs) definitions, older linux.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
fcntl.h
</FONT>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?