\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Kernel HOWTO ÖÐÒë°æ}
\author{×÷Õß: Brian Ward {\ttfamily \onlynameurl{bri@blah.math.tu-graz.ac.at}}\\ 
ÒëÕß: \onlynameurl{C.W.Huang}
\& \onlynameurl{Asd L. Chen}}
\date{v0.80, 26 May 1997.
·­ÒëÈÕÆÚ: 25-29 August 1997}
\abstract{ÕâÊÇÒ»·Ý¹Øì¶ÈçºÎÅäÖÃ¡¢±àÒë¡¢Éý¼¶ºËÐÄÒÔ¼°ÅÅÄÑ½â·×µÄÏêÏ¸Ö¸Òý£®}


\begin{document}
\maketitle
\tableofcontents

\section{¼ò½é}

ÄãÊÇ·ñÐèÒªÔÄ¶ÁÕâ·ÝÎÄ¼þ? Èç¹ûÄãÓÐÏÂÁÐÈÎºÎÖ¢×´Ö®Ò»µÄ»°£¬ÊÇµÄ£º

\begin{itemize}
\item  ``°¥Ñ½£¡ÕâÌ× wizzo-46.5.6 ÈíÌåËµËüÐèÒª 1.8.193 °æµÄºËÐÄ£¬¶øÎÒÈ´ÈÔÈ»Ö»ÓÐ 1.0.9 °æ£¡''
\item  ±È½ÏÐÂµÄºËÐÄÖ®Ò»¡õÃæÓÐÄãÕýºÃÐèÒªµÄÒ»¸öÉè±¸Çý¶¯³ÌÊ½£®
\item  Äã¶Ôì¶ÈçºÎ±àÒëºËÐÄÕæµÄÒ»ÎÞËùÖª£®
\item  ``ÔÚ README µµ°¸ÀïÃæ{\itshape ÕæµÄ\/}¾ÍÊÇÈ«²¿µÄ×ÊÁÏÁËÂð?''
\item  ÄãÀ´£¬ÄãÊÔ£¬Ëü»¹ÊÇ²»¶¯£®
\item  ÄãÐèÒªÄ³ÊÂ¸øÓèÒ»Ö±ÒªÇóÄãÎªËûÃÇ°²×°ºËÐÄµÄÈËÃÇ£®
\end{itemize}





\subsection{ÇëÏÈ¿´´Ë!}

Õâ·ÝÎÄ¼þÖÐµÄÄ³Ð©¡õÀý¼ÙÉèÄãÓÐ GNU {\ttfamily tar}£¬{\ttfamily find} ÒÔ¼° {\ttfamily xargs}£®
ÕâÐ©ÊÇ Linux Ì×¼þÀïµÄ±ê×¼¹¤¾ß£¬Ó¦¸Ã²»ÊÇÎÊÌâ£®
ÎÄ¼þÖÐÒ²¼ÙÉèÄãÖªµÀÄãÏµÍ³µÄµµ°¸ÏµÍ³¼Ü¹¹£¬Èç¹ûÄã²¢²»ÖªµÀ£¬×îºÃ¸Ï¿ìÐ´ÏÂÒ»·Ý mount Ö¸ÁîÔÚÏµÍ³Õý³£ÔË×÷ÏÂ£¬ËùÏÔÊ¾µÄ½á¹û×÷Îª²Î¿¼(»òÕßÊÇÒ»·Ý /etc/fstab µÄÁÐ±í£¬Èç¹ûÄãÄÜ¹»¿´µÃ¶®)£®
ÕâÐ©×ÊÑ¶ºÜÖØÒª£¬¶øÇÒ£¬³ý·ÇÄãÖØÐÂ·Ö¸î»ò¼ÓÈëÐÂµÄ´Åµú£¬ÖØÐÂ°²×°ÄãµÄÏµÍ³ÒÔ¼°×öÖîÈç´ËÀàµÄ²Ù×÷£¬·ñÔòËüÃÇ²»»á±ä¶¯£®

±¾ÎÄÐ´×÷Ê±×îÐÂ``²úÆ·''µÄºËÐÄ°æ±¾ºÅÂëÊÇ 2.0.30£¬Ò²¾ÍÊÇËµ±¾ÎÄµÄ²Î¿¼¼°Àý×ÓÊÇ¶ÔÓ¦ì¶¸Ã°æ±¾µÄ£®
ËäÈ»ÎÒ³¢ÊÔÈÃÕâÆªÎÄÕÂ¾¡Á¿¸ú°æ±¾ÎÞ¹Ø£¬ºËÐÄÈ´²»¶ÏµØÔÚ·¢Õ¹ÖÐ£®
Òò´ËÈç¹ûÄãÈ¡µÃÒ»ÐÂµÄ°æ±¾£¬Ëü²»¿É±ÜÃâµØ»áÓÐÒ»Ð©²»Í¬£®
µ±È»£¬ÕâÓ¦¸Ã²»»áÔì³É´óÎÊÌâ£¬µ«Ëü¿ÉÄÜ»áÖÆÔìÒ»Ð©»ìÏý£®

ÓÐÁ½ÖÖ°æ±¾µÄ Linux ºËÐÄÔ­Ê¼Âë£¬``²úÆ·'' Óë ``·¢Õ¹ÖÐ'' µÄ£®
²úÆ·°æ±¾´Ó 1.0.x ¿ªÊ¼¶øÇÒÄ¿Ç°ÊÇÒÔÅ¼Êý±àºÅ·¢±íµÄ; 1.0.x ÊÇ²úÆ·£¬1.2.x ÊÇ²úÆ·£¬
2.0.x Ò²ÊÇ£®ÕâÐ©°æ±¾Ó¦¸Ã±È½ÏÎÈ¶¨£¬ÔÚ·¢±íÊ±ÊÇÃ»ÓÐ³ô¡õ(bug)µÄ°æ±¾£®
·¢Õ¹ÖÐµÄºËÐÄ (1.1.x, 1.3.x µÈµÈ) ÊÇ×÷Îª²âÊÔÓÃµÄ£¬¸øÄÇÐ©ÏëÒª²âÊÔ×îÐÂ¶øÇÒ¿ÉÄÜÓÐÐí¶à³ô¡õµÄÈËÓÃµÄ£®
ÒÑ¾­¾¯¸æ¹ýÄãÁË£®




\subsection{ÎÄÕÂ·ç¸ñËµÃ÷}

¿´ÆðÀ´ÏñÕâÑù {\ttfamily text} µÄÎÄ×Ö»òÕßÊÇÄ³Ñù½«³öÏÖÄãµÄÓ©Ä»ÉÏµÄ¶«Î÷£¬Ò»¸öµµÃû£¬
»òÊÇÄ³Ñù¿É±»Ö±½Ó¼üÈëµÄ¶«Î÷£¬ÏñÊÇÃüÁî£¬»òÃüÁîµÄÑ¡Ïî(Èç¹ûÄã¿´µÄÊÇ´¿ÎÄ×Öµµ°¸£¬Ëü¿´ÆðÀ´Ã»Ê²÷á²»Í¬)£®
ÃüÁîÓëÆäËüµÄÊäÈë¾­³£±»¿òÆðÀ´(ÓÃ` ')£¬Õâ¾­³£ÒýÆðµäÐÍµÄ±êµã·ûºÅÎÊÌâ:
Èç¹ûÕâÑùµÄÏîÄ¿³öÏÖÔÚ¾ä×ÓµÄ×îááÃæ£¬ÈËÃÇÊ±³£»áÔÚÃüÁîááÃæ¼ÓÉÏÒ»¾äºÅ `.'£¬
ÒòÎªÃÀ¹úÈËµÄÒýºÅÏ°¹ß½«¾äºÅ·ÅÈëÒýºÅÀïÃæ£®
¼´Ê¹ÓÃ³£Ê¶(¶ø²»ÐÒµÄÊÇ£¬Õâ¼ÙÉèÁËÓµÓÐ´Ë``³£Ê¶''µÄÈËÊÇÏ°¹ßì¶ÃÀ¹úÊ½µÄÒýºÅ)ÏëÒ²ÖªµÀÓ¦ÏÈ½«Õâ±êµãÈ¥µô£¬µ«ºÜ¶àÈË×ÜÊÇÍü¼Ç£®
ËùÒÔÔÚ´ËÇéÐÎÏÂÎÒ½«¾äºÅ·ÅÔÚÒýºÅÍâÍ·£®»»¾ä»°Ëµ£¬µ±ÎÒ½ÐÄãÒª´ò ``{\ttfamily make config}'' Ê±£¬
ÎÒ»áÐ´ `{\ttfamily make config}'£¬¶ø²»ÊÇ `{\ttfamily make config}.'£®




\section{ÖØÒªÎÊÌâÓë½â´ð}




\subsection{²»¹ÜÔõ÷áÑù£¬ºËÐÄµ½µ×ÊÇ×öÊ²÷áµÄ?}

ÔÚ Unix ÏµÍ³ÖÐ£¬ÏñÊÇÄãµÄ³ÌÊ½ÓëÓ²ÌåµÄÒ»¸öÖÙ²ÃÕß£®
Ê×ÏÈ£¬ËüÎªËùÓÐÖ´ÐÐÖÐµÄ³ÌÊ½(³ÌÐò)×ö¼ÇÒäÌå¹ÜÀí£¬
²¢ÇÒÈ·±£ËüÃÇ¶¼ÄÜ¹»Æ½¾ù(»ò²»Æ½¾ù£¬Èç¹ûÄãÔ¸Òâ)µÄ·ÖÏí´¦Àí»úµÄÔËËã×ÊÔ´£®
´ËÍâ£¬Ëü»¹Ìá¹©ÁËÒ»¸öÁ¼ºÃµÄ½éÃæÈÃ¸Õ¸ÕÌáµ½µÄ³ÌÊ½ÄÜÍ¸¹ýËüÓëÄãµÄÓ²Ìå¹µÍ¨£®

ÆäÊµºËÐÄËù´¦ÀíµÄ¹¤×÷±ÈÕâ»¹Òª¸ü¸´ÔÓÒ»Ð©£¬²»¹ýÕâÐ©»ù±¾µÄ¹¦ÄÜÊÇ×î±ØÒªÖªµÀµÄ£®




\subsection{ÎÒÎªÊ²÷áÒª¸üÐÂºËÐÄ? }

±È½ÏÐÂµÄºËÐÄÒ»°ãÀ´Ëµ»áÌá¹©¸üÇ¿µÄÄÜÁ¦À´Óë¸ü¶àÖÖÆæÆæ¹Ö¹ÖµÄÓ²Ìå¹µÍ¨(Ò²¾ÍÊÇËµ£¬ËüÃÇÓµÓÐ¸ü¶àµÄÉè±¸Çý¶¯³ÌÊ½)£¬
ËüÃÇÄÜ¹»ÓÐ¸üºÃµÄÐÐ³Ì¹ÜÀí£¬ËüÃÇÄÜ¹»Ö´ÐÐµÄ±È¾ÉµÄ°æ±¾¸üÓÐÐ§ÂÊ£¬ËüÃÇ¿ÉÄÜ±È¾ÉµÄ°æ±¾À´µÄ¸üÎÈ¶¨£¬¶øÇÒËüÃÇÐÞÕýÁË¾É°æÀïµÄÒ»Ð©´íÎó£®
´ó²¿·ÖµÄÈËÊÇÒòÎªËûÃÇÐèÒªÄÇÐ©ÐÂµÄÉè±¸Çý¶¯³ÌÊ½ÒÔ¼°´íÎóÐÞÕýµÄ²¿·Ý¶ø¸üÐÂºËÐÄ£®




\subsection{½ÏÐÂµÄºËÐÄÖ§Ô®ÄÇÐ©Ó²Ìå?}

Çë¿´ \onlynameurl{Hardware-HOWTO} ÎÄ¼þ£®
ÁíÒ»¸ö·½·¨ÊÇ£¬Äã¿ÉÒÔ²é¿´ Linux Ô­Ê¼³ÌÊ½ÂëÖÐµÄ `{\ttfamily config.in}' µµ£¬
»òÕß¾ÍÔÚµ±ÄãÊÔÖøÈ¥ `{\ttfamily make config}' Ê±ÕÒ³öÀ´£®
`{\ttfamily make config}' ½«»áÈÃÄã¿´µ½±ê×¼µÄºËÐÄÔ­Ê¼³ÌÊ½ÂëÖ§Ô®µÄËùÓÐÓ²Ìå£¬µ«Õâ²¢²»ÊÇ Linux ËùÖ§Ô®µÄÈ«²¿Ó²Ìå£»
Ðí¶àÆÕÍ¨µÄÉè±¸Çý¶¯³ÌÊ½(ÏñÊÇ PCMCIA Çý¶¯³ÌÊ½ÒÔ¼°Ä³Ð©´Å´ø»úµÄÇý¶¯³ÌÊ½)ÊÇ¸ö±ðÎ¬»¤¼°·¢ÐÐµÄ¿ÉÔØÈëÄ£×é£®




\subsection{ÎÒÐèÒªÄÇ¸ö°æ±¾µÄ gcc »òÊÇ libc ?}

Linus ¶ÔÕâ¸öÎÊÌâµÄ½¨Òé·ÅÔÚ Linux Ô­Ê¼³ÌÊ½µÄ {\ttfamily README} µµ°¸¡õÍ·£®
Èç¹ûÄãÃ»ÓÐ¸Ã°æ±¾»òÊÇ¸üÐÂµÄ°æ±¾£¬ÐÂ°æµÄ gcc Ó¦¸Ã»á¸æËßÄãÊÇ·ñÐèÒª¸üÐÂ libc µÄ°æ±¾£®
ÕâÁ½¸ö²Ù×÷¶¼²»»áÓÐÊ²÷áÎÊÌâ£¬Ö»ÒªÕÕÖøËµÃ÷×ö¾Í¿ÉÒÔÁË£®




\subsection{Ê²÷áÊÇ¿ÉÔØÈëÄ£×é?}

ËüÃÇÊÇºËÐÄµÄÒ»²¿·Ö(Í¨³£ÊÇÉè±¸Çý¶¯³ÌÊ½)£¬µ«ÊÇ²¢Ã»ÓÐ±àÒëµ½ºËÐÄÀïÃæÈ¥£®
ËüÃÇ±»·Ö±ð±àÒë£¬È»áá¼¸ºõ¿ÉÒÔÔÚÈÎºÎÊ±ºò½«ËüÃÇ²åÈëÔË×÷ÖÐµÄºËÐÄ»ò´ÓÖÐÈ¡³ö£®
ÓÉì¶ËüµÄ±ãÀûÐÔ£¬ÕâÒÑ¾­³ÉÎªÒ»ÖÖÔö¼Ó¶«Î÷µ½ºËÐÄÀïÈ¥µÄ½ÏºÃ·½Ê½£®
Ðí¶à³£ÓÃµÄÉè±¸Çý¶¯³ÌÊ½£¬ÀýÈç PCMCIA Çý¶¯³ÌÊ½ÒÔ¼° QIC-80/40 ´Å´ø»úµÄÇý¶¯³ÌÊ½¾ÍÊÇ¿ÉÔØÈëÄ£×é£®




\subsection{ÎÒÐèÒª¶à´óµÄ´Åµú¿Õ¼ä?}

ÕâÓëÄãÏµÍ³µÄÌØÊâÅäÖÃÓÐ¹Ø£®Ê×ÏÈ£¬Ñ¹Ëõ¹ýááµÄ Linux Ô­Ê¼³ÌÊ½ÂëÔÚ 2.0.10 °æÊ±Ô¼Õ¼ 6 MB£®
Ðí¶àÕ¾Ì¨ÔÚ½âÑ¹ËõááÈÔ»á±£ÁôÒ»·Ý£®½âÑ¹ËõÒÔááÕâ½«Õ¼µôÔ¼ 24 MB£®
µ«Õâ»¹²»ÊÇÈ«²¿ ¡ª Äã½«»áÐèÒª¸ü¶àµÄ´Åµú¿Õ¼äÀ´Êµ¼Ê±àÒëÕâÐ©¶«Î÷£®
ÕâÓëÄãÅäÖÃ¶àÉÙ¶«Î÷µ½ÄãµÄºËÐÄÀïÍ·È¥ÓÐ¹Ø£®ÀýÈç£¬ÔÚÄ³²¿»úÆ÷ÉÏ£¬ÎÒÓÐÍøÂ·£¬3Com 3C503 µÄÇý¶¯³ÌÊ½£¬
²¢ÇÒÅäÖÃÁËÈýÖÖµµ°¸ÏµÍ³£¬¶øÕâÈ«²¿¹²ÐèÒª 30 MB£®¼ÓÉÏÑ¹Ëõ¹ýµÄ linux  Ô­Ê¼³ÌÊ½Âë£¬Õâ¸öÅäÖÃ´ó¸ÅÐèÒªÓÃµôÄã 36MB £®
ÔÚÁíÍâÒ»¸öÏµÍ³ÉÏ£¬²»ÐèÒªÖ§Ô®ÍøÂ·Éè±¸(µ«ÈÔÈ»ÐèÒªÖ§Ô®ÍøÂ·)£¬¼ÓÉÏÒôÐ§¿¨£¬½á¹û³Ôµô¸ü¶à¿Õ¼ä£®
»¹ÓÐ£¬Ò»¸öÐÂ°æ±¾µÄºËÐÄ¼¸ºõ×ÜÊÇ±È¾É°æ±¾µÄÕ¼¸ü´óµÄ¿Õ¼ä£®
ËùÒÔ£¬Ò»°ãÀ´Ëµ£¬Èç¹ûÄãÓÐÐí¶àÖÖÓ²ÌåÉè±¸µÄ»°£¬È·¶¨ÄãÓÐ×ã¹»µÄÓ²µú¿Õ¼äÀ´ÈÝÄÉÕâ¸öÅäÖÃ£®
(ÒÔ½ñÈÕµÄ¼Û¸ñÀ´Ëµ£¬¶Ôì¶´¢´æ¿Õ¼äµÄÎÊÌâÎÒ²»ÄÜ²»½¨ÒéÄãÔÙÂòÒ»Ì¨´Åµú»ú£®)




\subsection{ÕâÐèÒª¶à¾ÃµÄÊ±¼ä?}

¶Ô´ó²¿·ÝµÄÈË¶øÑÔ£¬´ð°¸ÊÇ``ºÜ¾Ã''£®ÄãµÄ´¦Àí»úËÙ¶ÈÓÐ¶à¿ì£¬ÒÔ¼°ÄãÓµÓÐµÄ¼ÇÒäÌåÊýÁ¿ÓÐ¶àÉÙ½«ÊÇ¾ö¶¨ËùÐèÊ±¼äµÄÖ÷ÒªÒòËØ£¬
µ«ÊÇ£¬ÔÚ°Ñ¶àÉÙ¶«Î÷ÅäÖÃµ½ºËÐÄÀïÍ·È¥Õâ·½Ãæ»¹ÊÇ¿ÉÒÔ×öµãÅ¬Á¦£®
ÔÚÒ»Ì¨ÓÐ 16 MB ¼ÇÒäÌåµÄ 486DX4-100 µçÄÔÉÏ£¬Ò»¸öÓÐÎåÖÖµµ°¸ÏµÍ³¡¢Ö§Ô®ÍøÂ·¡¢ÒÔ¼°ÒôÐ§¿¨Çý¶¯³ÌÊ½µÄ 1.2 °æºËÐÄ¿ÉÒÔÔÚ¶þÊ®·ÖÖÓÒÔÄÚÍê³É£®
ÀàËÆµÄÅäÖÃ£¬ÔÚÒ»Ì¨ 386DX/40(8 MB ¼ÇÒäÌå)ÉÏ´óÔ¼ÐèÒªÒª 1.5 ¸öÐ¡Ê±£®
ÔÚ±àÒëºËÐÄÊ±Í¨³£Ò»Ð©ºÃµÄ½¨ÒéÊÇÈ¥ºÈÒ»µã¿§·È£¬¿´µãµçÊÓ£¬Ö¯Ð©Ã«Ïß£¬»òÈÎºÎÄãÏ²»¶µÄÊÂ£®
Èç¹ûÄãµÄ»úÆ÷ÕæµÄºÜÂýµÄ»°ÄãÒ²¸Ã»»Ì¨½Ï¿ìµÄ»úÆ÷£®




\section{ÈçºÎÕæÕý½øÐÐºËÐÄµÄÅäÖÃ?}




\subsection{È¡µÃÔ­Ê¼³ÌÊ½Âë}

Äã¿ÉÒÔ¾­ÓÉÄäÃû ftp Õ¾´Ó {\ttfamily ftp.funet.fi} µÄ {\ttfamily \onlynameurl{/pub/Linux/PEOPLE/Linus}}£¬
»òÊÇÆäËü MIRROR Õ¾È¡µÃ£®({[}{\ttfamily Òë×¢}] Ì¨Íå¿É´Ó {\ttfamily \onlynameurl{ftp.edu.tw}} È¡µÃ£®)
µµ°¸Ãû³ÆÒ»°ãÊÇÒÔ±ê¼Ç³É {\ttfamily linux-x.y.z.tar.gz} Îª´ú±í£¬ÆäÖÐµÄ {\ttfamily x.y.z} ÊÇ°æ±¾±àºÅ£®
½ÏÐÂµÄ(¸üºÃµÄ?)°æ±¾ÒÔ¼°ÐÞ²¹µµÒ»°ãÊÇ·ÅÔÚÀàËÆ `{\ttfamily v1.1}' ÒÔ¼° `{\ttfamily v1.2}' ÕâÑùµÄ×ÓÄ¿Â¼ÏÂ£®
Êý×Ö×î´óµÄÊÇ×îÐÂµÄ°æ±¾£¬¶øÇÒÍ¨³£ÊÇ``²âÊÔ°æ''£¬Ò²¾ÍÊÇËµÈç¹ûÄã¶Ô beta »ò alpha °æ¸Ðµ½²»°²µÄ»°£¬ÄãÓ¦¸ÃÍ£ÁôÔÚÖ÷ÒªµÄ·¢ÐÐ°æ±¾ÉÏ£®

{\itshape Ç¿ÁÒ\/}½¨ÒéÄãÈ¥ÕÒ mirror µÄ ftp ½Úµã£¬¶ø²»ÒªÖ±½Óµ½ {\ttfamily ftp.funet.fi} È¥! 
µ×ÏÂÊÇÒ»Ð© mirrors ÒÔ¼°ÆäËû½ÚµãµÄ¼òÒªÁÐ±í:

\begin{verbatim}
USA:         sunsite.unc.edu:/pub/Linux/kernel
USA:         tsx-11.mit.edu:/pub/linux/sources/system
UK:          sunsite.doc.ic.ac.uk:/pub/unix/Linux/sunsite.unc-mirror/kernel
Austria:     ftp.univie.ac.at:/systems/linux/sunsite/kernel
Germany:     ftp.Germany.EU.net:/pub/os/Linux/Local.EUnet/Kernel/Linus
Germany:     sunsite.informatik.rwth-aachen.de:/pub/Linux/PEOPLE/Linus
France:      ftp.ibp.fr:/pub/linux/sources/system/patches
Australia:   sunsite.anu.edu.au:/pub/linux/kernel
\end{verbatim}


Ò»°ãÀ´Ëµ£¬{\ttfamily sunsite.unc.edu} µÄ mirror Õ¾ÊÇºÜºÃÕÒµÄ£®
µµ°¸ {\ttfamily /pub/Linux/MIRRORS} °üº¬ÁËÒÑÖªµÄ mirror ½Úµã£®
Èç¹ûÄãÃ»ÓÐ°ì·¨ÉÏ ftp £¬ÓÐ¸ö´æ·Å linux µÄ BBS ÏµÍ³ÁÐ±í»á¶¨ÆÚ¿¯µÇÔÚ comp.os.linux.announce ÉÏ£¬ÊÔÖøµ½ÄÇ±ßÈ¥ÕÒÒ»ÏÂ£®

Èç¹ûÄãÏëÑ°ÕÒÒ»°ãµÄ Linux ×ÊÑ¶ÓëÌ×¼þ£¬È¥ {\ttfamily \onlynameurl{http://www.linux.org/}}£®




\subsection{½â¿ªÔ­Ê¼³ÌÊ½ÂëµÄ°ü×°}

È·¶¨ÄãÊÇÒÔ`{\ttfamily root}'µÄÉí·ÝÇ©Èë£¬È»áá {\ttfamily cd} µ½ {\ttfamily /usr/src}£® 
Èç¹ûÄã°²×° Linux Ê±ÒÑ¾­°²×°ÁËºËÐÄÔ­Ê¼³ÌÊ½Âë£¬ÔÚÕâ¸öÄ¿Â¼µ×ÏÂÓ¦¸ÃÒÑ¾­´æÔÚÒ»¸ö½Ð×ö `{\ttfamily linux}' µÄ×ÓÄ¿Â¼£®
ÕâÊÇ¾É°æµÄ linux Ô­Ê¼³ÌÊ½Âë£®Èç¹ûÄã»¹ÓÐ´Åµú¿Õ¼ä¶øÇÒÏëÒªÍæµÃ°²È«Ò»µã£¬ÄÇ÷áÄã»áÏëÒª±£ÁôÕâ¸ö×ÓÄ¿Â¼µÄ£®
ÓÐ¸öºÃÖ÷ÒâÊÇ¸ù¾ÝÄãÄ¿Ç°Ê¹ÓÃµÄºËÐÄ°æ±¾À´ÐÞ¸ÄÕâ¸ö×ÓÄ¿Â¼µÄÃû³Æ£®
`{\ttfamily uname -r}' Õâ¸öÖ¸Áî½«»á¸æËßÄãÄ¿Ç°µÄºËÐÄ°æ±¾£®
ËùÒÔ£¬Èç¹û `{\ttfamily uname -r}' ÏÔÊ¾ `{\ttfamily 1.0.9}'£¬Äã¾Í¿ÉÒÔ°Ñ `{\ttfamily linux}' ¸ÄÃû(ÓÃ `{\ttfamily mv}')Îª `{\ttfamily linux-1.0.9}'£®
Èç¹ûÄãÊÇ¸öÂ³Ã§ÐÍµÄÈË£¬ÄÇ¾ÍÖ±½Ó°ÑÕâ¸ö×ÓÄ¿Â¼Çå³ýµô£®
ÎÞÂÛÊÇÄÄÒ»ÖÖÇé¿ö£¬·´ÕýÖ»ÒªÈ·¶¨ÔÚ½â¿ªÈ«²¿µÄÔ­Ê¼³ÌÊ½ÂëÖ®Ç°£¬{\ttfamily /usr/src} Ä¿Â¼ÏÂÃ»ÓÐ `{\ttfamily linux}' Õâ¸ö×ÓÄ¿Â¼¾Í¶ÔÁË£®



ÔÚ {\ttfamily /usr/src} Ä¿Â¼ÏÂ£¬ÓÃ `{\ttfamily tar zxpvf linux-x.y.z.tar.gz}' À´½â¿ªÔ­Ê¼³ÌÊ½ÂëµÄ°ü×°
(Èç¹ûÄãÄÃµ½µÄÊÇ {\ttfamily .tar} µÄµµ°¸£¬ááÃæÃ»ÓÐ¼ÓÉÏ {\ttfamily .gz}£¬ÄÇ¾ÍÓÃ `{\ttfamily tar xpvf linux-x.y.z.tar}')£®
Äã½«»á¿´µ½Ô­Ê¼³ÌÊ½µÄÄÚÈÝ·ÉÊÅ¶ø¹ý£®µ±ËüÍê³ÉÒÔáá£¬ÔÚ {\ttfamily /usr/src} ½«»á³öÏÖÒ»¸öÐÂµÄ `{\ttfamily linux}' ×ÓÄ¿Â¼£®
{\ttfamily cd} µ½ {\ttfamily linux} Ä¿Â¼ÏÂÈ»áá²é¿´ {\ttfamily README} µµ£¬
ÀïÃæÓ¦¸Ã»áÓÐÒ»¶Î±êÌâÎª `{\ttfamily INSTALLING the kernel}' »òÀàËÆµÄÎÄ×Ö£®
Èç¹ûÊÊµ±µÄ»°£¬ÏÈÒÀÕÕËµÃ÷ÀïµÄÖ¸Ê¾ ¡ª ½¨Á¢¸ÃÓÐµÄ·ûºÅÁ´½á£¬ÒÆ³ý¹ýÊ±µÄ .o µµ°¸µÈµÈµÈÖîÈç´ËÀàµÄ¹¤×÷£®




\subsection{ÅäÖÃºËÐÄ}

×¢Òâ£ºÕâ²¿·ÝÄÚÈÝÓÐÐ©ÊÇÖØ¸² Linus µÄ {\ttfamily README} µµ°¸ÖÐµÄÏàÓ¦ÕÂ½Ú»ò¼ÓÒÔÐÞ¶©£®



ÔÚ {\ttfamily /usr/src/linux} ÏÂÖ´ÐÐ `{\ttfamily make config}' Õâ¸öÃüÁî½«»áÆôÊ¼Ò»¸öÖ¸Áî¸å£¬
¶øÕâ¸öÖ¸Áî¸å»áÎÊÄã¸÷ÖÖÎÊÌâ£®ËüÐèÒª bash £¬ËùÒÔÒªÈ·¶¨ bash ÊÇ {\ttfamily /bin/bash}£¬{\ttfamily /bin/sh} »ò {\ttfamily \$BASH}£®



»¹ÓÐÆäËüÖÖ `{\ttfamily make config}' µÄ·½Ê½Äã¿ÉÄÜ»á¾õµÃ¸üÈÝÒ×Ê¹ÓÃ£®
¶ÔÄÇÐ©Ö´ÐÐ X Window µÄÈËÄãÈç¹ûÓÐ×° Tk µÄ»°¿ÉÒÔÊÔÖøÓÃ `{\ttfamily make xconfig}'£®
`{\ttfamily make menuconfig}' ÊÇ¸øÄÇÐ©ÓÐ×° (n)curses ¶øÇÒÏ²»¶ÎÄ×ÖÄ£Ê½Ñ¡µ¥µÄÈËÓÃµÄ£®
ÕâÐ©½çÃæÓÐ¸öÃ÷ÏÔµÄºÃ´¦: Èç¹ûÔÚÅäÖÃ¹ý³ÌÖÐÄã²»Ð¡ÐÄ·¸ÁË´í£¬¿ÉÒÔ¼òµ¥µØ»ØÈ¥ÐÞÕý£®



ÄãÏÖÔÚ¸Ã×¼±¸ºÃ»Ø´ðÕâÐ©ÎÊÌâ£¬Í¨³£ÓÃ `{\ttfamily y}' »ò `{\ttfamily n}' ¾Í¿ÉÒÔÁË£®
Éè±¸Çý¶¯³ÌÊ½Í¨³£»áÓÐÒ»¸ö `{\ttfamily m}' Ñ¡Ïî£®
Õâ±íÊ¾``Ä£×é(module)''£¬±íÊ¾ËµÏµÍ³½«»á±àÒëËü£¬µ«²»»áÖ±½Ó·Å½øºËÐÄÀï£¬¶øÊÇ×öÎªÒ»¿ÉÔØÈëÄ£×é£®
Ò»¸öÓÐÈ¤µÄËµ·¨ÊÇ±íÊ¾``maybe''£®ÓÐÒ»Ð©ºÜÃ÷ÏÔ»òÊÇ²»ÖØÒªµÄÑ¡Ïî½«²»»áÔÚ´Ë¼ÓÒÔËµÃ÷£®
Çë¼û``\ref{other-options} {(ÆäËüÅäÖÃÑ¡Ïî)}''Ò»½Ú¶ÔÆäÖÐµÄ¼ò¶ÌËµÃ÷£®



ÔÚ 2.0.x »òÒÔááµÄ°æ±¾ÖÐÓÐÒ»¸ö `?' Ñ¡Ïî£¬Ìá¹©ÁËÕâ¸öÅäÖÃ²ÎÊýµÄ¼ò¶ÌÃèÊö£®
ÕâÐ©×ÊÑ¶Ó¦¸Ã¶¼ÊÇ×îÐÂµÄ£®




\subsubsection{Kernel math emulation (ºËÐÄµÄÊýÑ§ÔËËãÄ£Äâ)}

Èç¹ûÄãÃ»ÓÐÊýÑ§¸¨ÖúÔËËã´¦Àí»ú(ÄãÖ»ÓÐÒ»Ì¨µ¥´¿µÄ 386 »ò 486SX)£¬ÄÇ÷áÄãÔÚ
ÕâÀïÒª»Ø´ð `{\ttfamily y}'£®Èç¹ûÄãÒÑ¾­ÓÐÊýÑ§¸¨ÖúÔËËã´¦Àí»úÈ´»¹»Ø´ð `{\ttfamily y}'£¬
ÄÇÒ²²»±ØÌ«µ£ÐÄ ¡ª linux »¹ÊÇ»áÈ¥Ê¹ÓÃËü¶øºöÂÔµôºËÐÄµÄÄ£Äâ³ÌÊ½£®
Î¨Ò»µÄÓ°ÏìÊÇ±àÒë³öÀ´µÄºËÐÄ±ä´óÁË(ÓÃµô¸ü¶àµÄ¼ÇÒäÌå)£®
ÎÒÌýËµÊýÑ§ÔË¼òÄ£ÄâºÜÂý; ËäÈ»ºÍ±¾½ÚÎÞÌ«´ó¹ØÏµ£¬»¹ÊÇÓ¦¸Ã×¢ÒâÕâ¶Ô X Window ÏµÍ³µÄÐ§ÂÊ»áÓÐºÜ´óÓ°Ïì£®




\subsubsection{Normal (MFM/RLL) disk and IDE disk/cdrom support (±ê×¼Ó²µúÖ§Ô®)}

ÄãÔÚÕâÀï²î²»¶à¶¼µÃ»Ø´ð `{\ttfamily y}'£®Ëü´ú±íµÄÒâË¼ÊÇºËÐÄ½«»áÖ§Ô®±ê×¼µÄ PC Ó²µú£¬
ÀýÈç´ó¶àÊýÈËÊ¹ÓÃµÄ IDE ½çÃæÓ²µú£®Õâ²»°üÀ¨ SCSI Éè±¸µÄÖ§Ô®; Õâ½«ÔÚááÃæÉè¶¨£®



È»ááÄã»á±»ÎÊµ½¹Øì¶ ``old disk-only'' Óë ``new IDE'' Çý¶¯³ÌÊ½µÄÊÂ£®
ÄãÓ¦¸ÃÁ½ÕßÑ¡Ò»; Ö÷ÒªµÄ²î±ðÊÇ¾ÉµÄÇý¶¯³ÌÊ½Ö»Ö§Ô®µ¥Ò»½çÃæÁ½²¿´Åµú»ú£¬
¶øÐÂµÄÇý¶¯³ÌÊ½Ö§Ô®µÚ¶þ½çÃæ¼° IDE/ATAPI ¹âµú»ú£®ÐÂµÄÇý¶¯³ÌÊ½±È¾ÉµÄ´óÔ¼¶à 4K£¬
¶øÇÒÓ¦¸ÃÊÇ``¸ÄÁ¼µÄ''£¬Ò²¾ÍÊÇËµ³ýÁË¿ÉÄÜ°üº¬Ð©Ðí´íÎóÖ®Íâ£¬ËüÓ¦¸Ã»á¸ÄÉÆÄãµÄ´ÅµúÐ§ÂÊ£¬ÌØ±ðÊÇÈç¹ûÄãÓÐ½ÏÐÂµÄ EIDE Ó²ÌåµÄ»°£®




\subsubsection{Networking support (ÍøÂ·Ö§Ô®)}

Ô­ÔòÉÏ£¬Èç¹ûÄãÓÐÁ¬½ÓÍøÂ·£¬Æ©ÈçËµ£¬ÄãÓÐ Internet Á¬Ïß£¬»òÊÇÄã½«Ê¹ÓÃ SLIP£¬PPP£¬term »òÆäËü·½Ê½²¦½Óµ½ Internet ÉÏµÄ»°£¬»Ø´ð `{\ttfamily y}'£®
È»¶ø£¬Ä³Ð©ÈíÌåÌ×¼þ(ÀýÈç X Window ÏµÍ³)ÐèÒªÍøÂ·Ö§Ô®£¬¼´Ê¹ÄãµÄ»úÆ÷²¢²»ÕæÕýÁ¬½Óµ½ÍøÂ·ÉÏ£®ÕâÇéÐÎÄãÒ²Ó¦¸Ã»Ø´ð `{\ttfamily y}'£®
È»áá£¬Äã»á±»ÎÊµ½ÊÇ·ñÐèÒªÖ§Ô® TCP/IP ÍøÂ·£¬Èç¹ûÄã²»Ê®·ÖÈ·¶¨£¬¾Í»Ø´ð `{\ttfamily y}'£®




\subsubsection{Limit memory to low 16MB (ÖÆ¼ÇÒäÌåÔÚ 16 MB)}

¿ÉÄÜ»áÓÐÒ»Ð©²»Á¼µÄ 386 DMA ¿ØÖÆÆ÷ÎÞ·¨ÕýÈ·µØ¶¨Ö·µ½ 16 MB ÒÔÉÏµÄ¼ÇÒäÌåÎ»Ö·£»
Èç¹ûÄãµÄ»úÆ÷¸ÕºÃÓÐÕâÖÖ(º±¼û)Çé¿öÊ±£¬ÄÇ÷áÄãÒ²¾ÍÖ»ºÃ»Ø´ð¡å y ¡åÁË£®




\subsubsection{System V IPC }

Ò»¸ö IPC (ÐÐ³ÌÄÚÍ¨Ñ¶£¬Interprocess Communication) µÄ¶¨Òå¾ÍÔÚ Perl ÊéÖÐµÄ×¢½â£®
Õâ²¢²»´óÆæ¹Ö£¬Ò»Ð© Perl ³ÌÊ½Éè¼ÆÕßÓÃËüÀ´ÈÃÐÐ³ÌÖ®¼ä»¥Ïà¹µÍ¨£¬¾ÍÏñÐí¶àÆäËüÌ×¼þ(×îÖøÃûÈç DOOM)Ò»Ñù£®
Òò´Ë³ý·ÇÄãÍêÈ«ÁË½âÄãÔÚ×öÊ²÷á£¬²»È»×îºÃ±ð»Ø´ð {\ttfamily n}£®




\subsubsection{Processor type (386, 486, Pentium, PPro) (Î¢´¦Àí»úÖÖÀà)}

(ÔÚ½Ï¾É°æ±¾µÄºËÐÄÖÐÎª: Use -m486 flag for 486-specific optimizations£¬Ê¹ÓÃ -m486 Æì±êÕë¶Ô 486 ×ö×î¼Ñ»¯)

°´ÕÕ¹ßÀýµØ£¬ÕâÊÇ¶ÔÒ»ÌØ±ðµÄÎ¢´¦Àí»ú×öÄ³ÖÖ×î¼Ñ»¯; ºËÐÄÈÔ¿ÉÔÚÆäËü¾§Æ¬ÉÏÅÜµÃºÜºÃ£¬µ«¿ÉÄÜ»á±È½Ï´óÐ©£®
²»¹ý£¬ÔÚ½ÏÐÂ°æ±¾µÄºËÐÄÉÏ£¬ÒÑ¾­²»ÊÇÕâ¸öÑù×ÓÁË£®Òò´ËÄãÓ¦¸ÃÕýÈ·µØ»Ø´ðÄãÒª±àÒëµÄÎ¢´¦Àí»úÖÖÀà£®
``386'' µÄºËÐÄ¿ÉÒÔÔÚËùÓÐµÄ»úÆ÷ÉÏ¹¤×÷£®




\subsubsection{SCSI support (SCSI µÄÖ§Ô®)}

Èç¹ûÄãÓÐ SCSI Éè±¸£¬ÄÇ÷á¾Í»Ø´ð `{\ttfamily y}'£®
½ÓÖø»áÓÐÌáÊ¾ÒªÇó¸ü½øÒ»²½µÄ×ÊÑ¶£¬ÏñÊÇÄãÊÇ·ñÒªÖ§Ô®¹âµú»ú£¬´Åµú»ú£¬»¹ÓÐÄãÊ¹ÓÃµÄÊÇÄÇÒ»ÖÖ SCSI ½éÃæ¿¨£®
Õâ²¿·ÝÇë²ÎÔÄ \onlynameurl{SCSI-HOWTO}£¬ÓÐ¸üÏêÏ¸µÄËµÃ÷£®




\subsubsection{Network device support (ÍøÂ·Éè±¸Ö§Ô®)}

Èç¹ûÄãÓÐÍøÂ·¿¨£¬»òÕßÄãÏëÒªÊ¹ÓÃ SLIP£¬PPP£¬»òÊÇ²¢ÁÐ²º½çÃæ¿¨£¬ÄÇ¾Í»Ø´ð `{\ttfamily y}'£®
½ÓÖø»áÓÐÌáÊ¾ÎÊÄãÊ¹ÓÃµÄÊÇÄÇÒ»ÖÖÍøÂ·¿¨£¬»òÒªÊ¹ÓÃÄÇÒ»ÖÖÍ¨Ñ¶Ð­¶¨£®




\subsubsection{Filesystems (µµ°¸ÏµÍ³)}

Õâ½«»áÓÐÌáÊ¾ÒªÄã»Ø´ðËùÒªÖ§Ô®µÄµµ°¸ÏµÍ³ÖÖÀà£¬¼ÆÓÐ£º

Standard (minix) ¡ª ÐÂµÄÌ×¼þ²»ÔÙ½¨Á¢ minix µµ°¸ÏµÍ³£¬¶øÇÒºÜ¶àÈË²»Ê¹ÓÃËü£¬µ«ÊÇ°ÑËüÅäÖÃÔÚºËÐÄÀïÈÔÈ»ÊÇ¸öºÃÖ÷Òâ£®
Ä³Ð©``¼±¾È´ÅÆ¬''³ÌÊ½»áÓÃµ½Ëü£¬¶øÇÒÈÔÈ»ÓÐÐí¶àÈíµú´ÅÆ¬¿ÉÄÜÓÃ minix µµ°¸ÏµÍ³£¬ÒòÎª minix µµ°¸ÏµÍ³¶Ôì¶´¦ÀíÈíµúÆ¬·½Ãæ½ÏÎÞÎÊÌâ£®

Extended fs ¡ª ÕâÊÇÀ©³äµµ°¸ÏµÍ³µÄµÚÒ»°æ£¬ÏÖÔÚÒÑ¾­²»ÔÙÊ¹ÓÃ£®Ê¹ÓÃµÄÊ±»úÊÇ£¬Èç¹ûÄãÓÐÐèÒª£¬Äã¾Í»áÖªµÀµÄ£®Èç¹ûÄã¾õµÃ»³ÒÉ£¬Äã¾Í²»ÐèÒªËü£®

Second extended ¡ª ÕâÊÇÏÖÔÚÐÂ·¢ÐÐµÄÌ×¼þËù¹ã·º²ÉÓÃµÄµµ°¸ÏµÍ³£¬Äã¿ÉÄÜ»áÓÐÆäÖÐÒ»ÖÖ£¬ËùÒÔ±ØÐë»Ø´ð `{\ttfamily y}'£®

xiafs filesystem ¡ª Õâ¸öµµ°¸ÏµÍ³Ôø¾­Ò»¶ÈºÜÆÕ±é£¬µ«ÊÇÔÚÐ´Õâ·ÝÎÄ¼þÊ±£¬ÎÒÒÑ¾­²»ÖªµÀÓÐÈÎºÎÈËÔÚÊ¹ÓÃËüÁË£®

msdos ¡ª Èç¹ûÄãÏëÒªÔÚ linux ÏÂÊ¹ÓÃÄãÓ²µúÖÐµÄ MS-DOS ·Ö¸îÇø£¬»òÊÇÏë½«ÓÃ MS-DOS ¸ñÊ½»¯µÄÈíµúÆ¬¹Ò½øÀ´µÄ»°£¬»Ø´ð `{\ttfamily y}'£®

ums-dos ¡ª ÕâÖÖµµ°¸ÏµÍ³ÄÜÊ¹ MS-DOS µµ°¸ÏµÍ³ÓµÓÐ¸ü¶àÏñ Unix µÄÌØÐÔ£¬ÏñÊÇ³¤µµÃûµÈµÈ£®Õâ¶ÔÄÇÐ©²»Ê¹ÓÃ MS-DOS µÄÈË(ÏñÎÒ)²¢²»ÊÇºÜÓÐÓÃ£®

/proc ¡ª ÁíÒ»ÖÖÉñÆæµÄ¶«Î÷(ÎÒ²ÂÕâ¸ö¸ÅÄîÊÇÎÞ³ÜµØ´Ó±´¶ûÊµÑéÊÒÀïÍµ¹ýÀ´µÄ)£®
Ëü²»ÊÇÄãÓ²µú·Ö¸îÇøÀïµÄÈÎºÎ¶«Î÷£¬¶øÊÇºËÐÄÓë³ÌÐòÖ®¼äµÄµµ°¸ÏµÍ³½éÃæ£®Ðí¶à³ÌÐò¹¤¾ß(Ïñ `{\ttfamily ps}')¶¼»áÓÃµ½Ëü£®
ÓÐÊ±¿ÉÒÔÊÔÖøÓÃ `{\ttfamily cat /proc/meminfo}' »ò `{\ttfamily cat /proc/devices}'£®
Ä³Ð© shell (ÌØ±ðÏñÊÇ rc) Ê¹ÓÃÁË {\ttfamily /proc/self/fd} (ÔÚÆäËüÏµÍ³Àï½Ð×ö {\ttfamily /dev/fd}) À´×öÊä³öÊäÈë¶¯×÷£®
Äã¼¸ºõÓ¦¸Ã»Ø´ð `{\ttfamily y}'; Ðí¶àÖØÒªµÄ Linux ¹¤¾ß¶¼ÒÀÀµËüÀ´ÔË×÷µÄ£®

NFS ¡ª Èç¹ûÄãÔÚÍøÂ·»·¾³ÏÂ¶øÇÒÏëÒªÓÉ NFS À´Ê¹ÓÃÆäËü»úÆ÷µÄµµ°¸ÏµÍ³£¬»Ø´ð `{\ttfamily y}'£®

ISO9660 ¡ª ¾ø´ó²¿·ÖµÄ¹âµúÆ¬¶¼Ê¹ÓÃÕâ¸öµµ°¸ÏµÍ³£®Èç¹ûÄãÓÐ¹âµú»ú¶øÇÒÏëÔÚ Linux ÏÂÊ¹ÓÃ£¬»Ø´ð `{\ttfamily y}'£®

OS/2 HPFS ¡ª ÔÚ±àÐ´Õâ·ÝÎÄ¼þµÄÊ±ºò£¬Õâ¸öµµ°¸ÏµÍ³»¹Ö»Ö§Ô®µ½ OS/2 HPFS µÄ¶ÁÈ¡£®

System V and Coherent ¡ª ÕâÊÇÎª System V ÒÔ¼° Coherent ÏµÍ³µÄ·Ö¸îÇø¶øÉèµÄ(ËüÃÇÊÇÁíÒ»ÖÖÔÚ PC ÉÏµÄ Unix ÏµÍ³)£®




\paragraph{µ«ÊÇÎÒ²»ÖªµÀÎÒÐèÒªÄÇÐ©µµ°¸ÏµÍ³!}

ºÃ°É£¬¼üÈë `{\ttfamily mount}'£®Ëü¿´ÆðÀ´»áÏñÕâÑù£º

\begin{tscreen}
\begin{verbatim}
    blah# mount
    /dev/hda1 on / type ext2 (defaults)
    /dev/hda3 on /usr type ext2 (defaults)
    none on /proc type proc (defaults)
    /dev/fd0 on /mnt type msdos (defaults)
\end{verbatim}
\end{tscreen}


×ÐÏ¸¿´¿´Ã¿Ò»ÐÐ£»ÔÚ `{\ttfamily type}' ááÃæµÄÄÇ¸ö×Ö¾ÍÊÇµµ°¸ÏµÍ³µÄ¸ñÊ½£®
ÔÚÕâ¸öÀý×ÓÖÐ£¬ÎÒµÄ {\ttfamily /} ºÍ {\ttfamily /usr} ·Ö¸îÇøÊÇ second extended ¸ñÊ½£¬
ÎÒÊ¹ÓÃÁË /proc £¬¶øÇÒ¹ÒÓÐÒ»ÕÅÒÔ msdos (bleah) Îªµµ°¸ÏµÍ³¸ñÊ½µÄ´ÅÆ¬£®

Èç¹ûÄãÓÐÊ¹ÓÃ {\ttfamily /proc}£¬¿ÉÒÔÊÔÊÔ `{\ttfamily cat /proc/filesystems}'£®
Ëü»á¸øÄãÒ»·ÝÄ¿Ç°Ê¹ÓÃµÄºËÐÄËùÖ§Ô®µÄµµ°¸ÏµÍ³ÁÐ±í£®

ÕâÅäÖÃ²¢²»³£Ê¹ÓÃ£®²»ÖØÒªµÄµµ°¸ÏµÍ³»áÊ¹ºËÐÄÏÔµÃÓ·Ö×; 
²Î¼û¿ÉÔØÈëÄ£×éÒ»½ÚµÄËµÃ÷ÒÔ±ÜÃâ´ËÇé¿ö£¬ÒÔ¼°``\ref{pitfalls} {(ÏÝÚå)}''Ò»½ÚËµÃ÷ÎªºÎÓ·Ö×µÄºËÐÄ²»ºÃ£®




\subsubsection{Character devices (×ÖÔªÉè±¸)}

ÔÚÕâÀï£¬Äã½«»á·¢ÏÖÐí¶àÉè±¸Ãû³Æ£¬ÓÃÀ´Éè¶¨ÄãµÄÓ¡±í»ú£¬»ãÁ÷ÅÅ»¬Êó£¬PS/2 »¬Êó(´ó²¿·Ö±Ê¼ÇÐÍµçÄÔÊ¹ÓÃÄÚ½¨µÄ PS/2 »¬Êó)£¬
ÒÔ¼°Ò»Ð©´Å´ø»úÇý¶¯³ÌÊ½£¬ÒÔ¼°ÆäËüµÄ``×ÖÔª''Éè±¸£®µ±ÓÐºÏÊÊµÄÑ¡ÏîÊ±£¬»Ø´ð `{\ttfamily y}'£®

×¢Òâ£ºSelection Õâ¸ö³ÌÊ½Ê¹Äã¿ÉÒÔÔÚ X window Ö®ÍâÊ¹ÓÃ»¬ÊóÔÚ¸÷¸öÐéÄâ¿ØÖÆÌ¨¼ä×ö¼ôÌùµÄ¶¯×÷£®
Èç¹ûÄãÓÐ´®ÁÐ»¬ÊóµÄ»°£¬ÕâÕæµÄºÜ°ô£¬ÒòÎªËüÓë X window Ö®¼äµÄ¹µÍ¨Á¼ºÃ£¬
²»¹ýÈç¹ûÄãÓÃÆäËüÖÖÀàµÄ»¬Êó¾ÍÐèÒªµã¼¼ÇÉÁË£®Selection Ôø¾­Ò»¶ÈÊÇÑ¡ÔñµÄÅäÖÃÅäÏî£¬²»¹ýÏÖÔÚÒÑ¾­ÊÇ±ê×¼ÁË£®

×¢Òâ¶þ: Selection ÏÖÔÚÒÑ¾­¹ýÊ±ÁË£®ÏÖÔÚÐÂµÄ³ÌÊ½Ãû½Ð ``gpm''£®
ËüÄÜ×ö¸üÉñÆæµÄÊÂ£¬ÏñÊÇ×ª»»»¬ÊóÐ­¶¨£¬´¦Àí¶àÖØ»¬ÊóµÈ¡­¡­




\subsubsection{Sound card (ÒôÐ§¿¨)}

Èç¹ûÄãÏëÌýµ½ {\ttfamily biff} ³ÌÊ½´ó½ÐµÄ»°£¬»Ø´ð `{\ttfamily y}'£®
È»ááµÈÒ»ÏÂ»á±àÒëÁíÒ»¸öÅäÖÃ³ÌÊ½²¢ÏêÏ¸Ñ¯ÎÊÄãËùÓÐ¹Øì¶ÒôÐ§¿¨µÄÎÊÌâ£®
(×¢Òâ: µ±ËüÎÊÄãÊÇ·ñ°²×°ÍêÕû°æ±¾µÄÇý¶¯³ÌÊ½Ê±£¬Äã¿ÉÒÔ»Ø´ð `{\ttfamily n}' ÒÔ¼õÉÙÄãºËÐÄ¼ÇÒäÌå²¢Ö»Ñ¡ÓÃÄãÕæÕýÐèÒªµÄ£®)
Èç¹ûÄãÓÐÒôÐ§¿¨ÎÒÇ¿ÁÒ½¨Òé¿´Ò»ÏÂ \onlynameurl{Sound-HOWTO} ÒÔÖªµÀ¸ü¶àµÄÏ¸½Ú£®




\subsubsection{ÆäËüÅäÖÃÑ¡Ïî}

Ã»ÓÐ½«ËùÓÐµÄÑ¡Ïî¶¼ÁÐ³öÀ´£¬ÒòÎªÓÐÐ©¾­³£¸Ä±ä£¬»òÊÇÏàµ±×ÔÃ÷µÄ(ÀýÈç      3Com 3C509 support ¾ÍÊÇ±àÒëÕâÖÖÌØ±ðÒÒÌ«ÍøÂ·¿¨µÄÇý¶¯³ÌÊ½)£¬
ÓÐÒ»¸öÊ®·ÖÈÝÒ×Àí½âµÄËùÓÐÑ¡ÏîÁÐ±í(°üÀ¨½«ËüÃÇ·Åµ½ {\ttfamily Configure} Ö¸Áî¸åµÄ·½·¨)¿ÉÔÚÕâ¸ö URL ÕÒµ½(ÓÉ Axel Boldt {\ttfamily \onlynameurl{axel@uni-paderborn.de}} ËùÊÕ¼¯):
\begin{tscreen}
{\ttfamily \onlynameurl{http://math-www.uni-paderborn.de/\~{}axel/config\_help.html}}
\end{tscreen}

»ò¾­ÓÉÄäÃû FTP Õ¾:
\begin{tscreen}
{\ttfamily \onlynameurl{ftp://sunsite.unc.edu/pub/Linux/kernel/config/krnl\_cnfg\_hlp.x.yz.tgz}}
\end{tscreen}

ÆäÖÐ {\ttfamily x.yz} ÊÇ°æ±¾ºÅÂë£®

ÆäááÀ´µÄºËÐÄÖÐ(2.0.x ¼°ÆäááµÄ)£¬ÕâÒÑ±»ÕûºÏµ½Ô­Ê¼³ÌÊ½ÂëÖÐ£®




\subsubsection{Kernel hacking }

{$>$}ÕâÊÇ´Ó Linus µÄ README ÀïÕªÂ¼µÄ£º

``kernel hacking'' ÅäÖÃµÄÏ¸½ÚÍ¨³£»á²úÉúÒ»¸ö¸ü´ó»òÊÇ¸üÂýµÄºËÐÄ(»òÕßÊÇÓÖ´óÓÖÂý)£¬
¶øÇÒ¿ÉÄÜÒòÎª½«Ò»Ð©³£Ê½ÅäÖÃ³ÉºÜ»îÔ¾µØÈ¥³¢ÊÔÖÐ¶ÏÒ»Ð©²»Á¼µÄ³ÌÊ½ÂëÒÔ±ãÕÒ³öºËÐÄÀïµÄÎÊÌâ£¨ kmalloc() £©£¬
¶øÊ¹µÃºËÐÄ±äµÃ±È½Ï²»ÎÈ¶¨£®ËùÒÔÒª²úÉúÒ»¸öºËÐÄ``²úÆ·''µÄ»°£¬ÄãÔÚÕâÀïÓ¦¸Ã»Ø´ð `n'£®




\subsection{ÏÖÔÚÄØ? (The Makefile) }

ÔÚÄãÍê³É {\ttfamily make config} Ö®áá£¬Ó¦¸Ã»áÓÐÒ»¸öÑ¶Ï¢¸æËßÄãºËÐÄÒÑ¾­ÅäÖÃºÃÁË£¬
ÒÔ¼°ÒªÄãÈ¥``check the top-level Makefile for additional configuration'' µÈµÈÑ¶Ï¢£®

ËùÒÔ²é¿´Ò»ÏÂ {\ttfamily Makefile}£®ÄãÓ¦¸Ã²»±Ø¸Ä±äËü£¬µ«ÊÇ¿´¿´ÎÞ·Á£®
Ò»µ©ÐÂºËÐÄÍê³É£¬ÄãÒ²¿ÉÒÔÓÃ `{\ttfamily rdev}' Ö¸ÁîÀ´¸Ä±äÆäÖÐµÄÑ¡Ïî£®




\section{±àÒëºËÐÄ}






\subsection{Çå³ýÓëÈ·ÈÏ}

µ±ÓÃÀ´½øÐÐÅäÖÃµÄÖ¸Áî¸åÖ´ÐÐÍê³ÉÊ±£¬Ëü»á¸æËßÄãÈ¥ `{\ttfamily make dep}' ÒÔ¼° `{\ttfamily clean}'£®
ËùÒÔÒªÖ´ÐÐ`{\ttfamily make dep}'£®Õâ½«È·±£ËùÓÐµÄÏàÒÀ¹ØÏµ£¬ÀýÈç include files ¶¼Ã»ÎÊÌâ£®
³ý·ÇÄãµÄµçÄÔÕæµÄºÜÂý£¬·ñÔòËü²»»á»¨Ì«¾ÃÊ±¼äµÄ£®
Íê³Éáá£¬ÔÚ½Ï¾É°æ±¾µÄºËÐÄÖÐÄã»¹Ó¦¸Ã×ö `{\ttfamily make clean}'£®
Õâ»áÇå³ýºËÐÄ±àÒëµÄËùÓÐÄ¿µÄµµÒÔ¼°ÆäËü¶«Î÷£®ÔÚÖØ½¨Ò»¸öºËÐÄÖ®Ç°{\itshape ²»Òª\/}Íü¼ÇÕâ¸ö²½Öè£®




\subsection{±àÒëÊ±ÆÚ}

ÔÚÍê³É `{\ttfamily make dep}' ¼° `{\ttfamily make clean}' ¹¤×÷Ö®áá£¬ÄãÏÖÔÚ¿ÉÒÔÖ´ÐÐ `{\ttfamily make zImage}' »ò `{\ttfamily make zdisk}' (Õâ²¿·ÝÐèÒª³¤Ê±¼ä)£®
`{\ttfamily make zImage}' ½«»á±àÒëºËÐÄ£¬²¢ÇÒÔÚ {\ttfamily arch/i386/boot} Áô¸øÄãÒ»¸ö½Ð×ö `{\ttfamily zImage}' µÄµµ°¸£®Õâ¾ÍÊÇÐÂµÄÑ¹ËõºËÐÄ£®
`{\ttfamily make zdisk}' ×öµÄÊÂÒ²Ò»Ñù£¬µ«ÊÇËü»á°ÑºËÐÄ·Åµ½ÄãËùÏ£ÍûµÄ´ÅÆ¬È¥£¬Ö»Òª°ÑÕâÕÅ´ÅÆ¬·ÅÔÚ ``A:''£®
`{\ttfamily zdisk}'¶Ôì¶²âÊÔÐÂºËÐÄºÜ·½±ã£»Èç¹ûËüµ±µô(»ò¹¤×÷²»Õý³£)£¬Ö»Òª°Ñ´ÅÆ¬ÄÃµôÔÙÓÃ¾ÉµÄºËÐÄÆô¶¯¼´¿É£®
Èç¹ûÄãÒâÍâµØÉ¾³ýÁËºËÐÄ»òÊÇÊ²÷áµÄ£¬ËüÒ²ÊÇ¸ö·½±ãµÄÆô¶¯°ì·¨£®
µ±Äã°ÑÒ»Ì¨´ÅµúµÄÄÚÈÝÇãµ¹µ½ÁíÍâÒ»Ì¨È¥Ê±£¬ÄãÒ²¿ÉÒÔÓÃËüÀ´°²×°ÐÂµÄÏµÍ³(³ýÁËÕâÐ©Ö®Íâ»¹ÓÐ¸ü¶àÓÃÍ¾£¡)

ËùÓÐ½üÀ´µÄºËÐÄ¶¼ÊÇÑ¹Ëõ¹ýµÄ£¬ËùÒÔÓÐ¸ö `{\ttfamily z}' ÔÚÃû×ÖÇ°Ãæ£®Ñ¹Ëõ¹ýµÄºËÐÄÖ´ÐÐµÄÊ±ºò»á×Ô¶¯½«×Ô¼º½âÑ¹Ëõ£®




\subsection{ÆäËû¿ÉÒÔ``make''µÄ¶«Î÷}

`{\ttfamily make mrproper}' ½«»á×ö¸ü¹ã·ºµÄ `Çå³ý' ¹¤×÷£®
Õâ¸ö¶¯×÷ÓÐÊ±ºòÊÇ±ØÐëµÄ£¬ËùÒÔÄã¿ÉÄÜ»áÏ£ÍûÔÚÃ¿´ÎÐÞ²¹µÄÊ±ºòÖ´ÐÐËü£®
`{\ttfamily make mrproper}' »¹»á½«ÄãµÄÅäÖÃµµ°¸É±µô£¬ËùÒÔÈç¹ûÄãÈÏÎªËüÖØÒªµÄ»°Ó¦¸ÃÏÈ×öÒ»±¸·Ý(ÔÚ {\ttfamily .config})£®

`{\ttfamily make oldconfig}' »á³¢ÊÔÓÉÒ»¾ÉµÄÅäÖÃµµ°¸À´ÅäÖÃÄãµÄºËÐÄ£®Ëü»áÎªÄãÖ´ÐÐ `{\ttfamily make config}'£®
Èç¹ûÄã»¹Î´Ôø±àÒë¹ýºËÐÄ»òÃ»ÓÐ¾ÉµÄÅäÖÃµµ°¸£¬ÄÇ÷áÄã¿ÉÄÜ²»¸Ã×öÕâ¸ö£¬ÒòÎªÄã¼¸ºõÈ·¶¨»á¸ü¸ÄÔ¤ÉèµÄÅäÖÃ£®

²Î¼û¿ÉÔØÈëÄ£×éÒ»½Ú¶Ô `{\ttfamily make modules}' µÄËµÃ÷£®






\subsection{°²×°ºËÐÄ}

ÔÚÄãÒÑ¾­»ñµÃÒ»¸ö¿´ÆðÀ´ÄÜ¹»ÕÕÄãÏ£ÍûÔË×÷µÄÐÂºËÐÄÖ®áá£¬ÏÖÔÚÊÇ°²×°ËüµÄÊ±ºòÁË£®
´ó²¿·ÝµÄÈËÊ¹ÓÃ LILO (Linux Loader) À´×öÕâ¼þÊÂ£®
`{\ttfamily make zlilo}' ½«»á°²×°ºËÐÄ£¬È»áá¶ÔËüÖ´ÐÐ LILO£¬Ê¹ÄãÍê³ÉËùÓÐ¿ª»úµÄ×¼±¸£¬
µ«ÊÇÕâÖ»ÓÐÔÚ LILO ÒÑ¾­ÒÔÏÂÁÐÕâÖÖ·½Ê½ÅäÖÃºÃµÄÊ±ºò²Å¿ÉÒÔ£ººËÐÄÎª /vmlinuz £¬ lilo ÔÚ /sbin ÏÂ£¬¶øÇÒÓëÄãµÄ LILO ÅäÖÃ({\ttfamily /etc/lilo.conf})Ò»ÖÂ£®

ÁíÒ»·½Ãæ£¬Äã¿ÉÄÜÐèÒªÖ±½ÓÊ¹ÓÃ LILO£®ÕâÊÇÒ»¸öÏàµ±ÈÝÒ×°²×°µÄÈíÌå£¬È»¶ø£¬ËüµÄÅäÖÃµµ³£Ê¹ÈËÀ§ÈÅ£®
²é¿´ÅäÖÃµµ(²»ÊÇ¾É°æµÄ {\ttfamily /etc/lilo/config} ¾ÍÊÇÐÂ°æµÄ {\ttfamily /etc/lilo.conf})£¬¿´¿´ÀïÃæÓÐÐ©Ê²÷á£®
Ëü¿´ÆðÀ´ÏñÕâÑù×ÓµÄ¶«Î÷£º

\begin{verbatim}
    image = /vmlinuz
        label = Linux
        root = /dev/hda1
        ...
\end{verbatim}


Ê×ÏÈ£¬`{\ttfamily image =}' Éè¶¨ÎªÒÑ¾­°²×°µÄºËÐÄ£®´ó²¿·ÝµÄÈËËÆºõ¶¼ÓÃ {\ttfamily /vmlinuz}£®
`{\ttfamily label}' ÔòÊÇ¸ø lilo ÓÃÀ´¾ö¶¨ÏÖÔÚÒªÆô¶¯µÄÊÇÄÇ¸öºËÐÄ»ò×÷ÒµÏµÍ³£¬
¶ø `{\ttfamily root}' ÔòÊÇÕâ¸öÌØ±ðµÄ×÷ÒµÏµÍ³µÄ¸ùÄ¿Â¼ {\ttfamily /}£®
±¸·ÝÒ»·Ý¾ÉµÄºËÐÄ£¬È»áá½«Äã×öµÄ {\ttfamily zImage} ¿½±´½øÈ¥(ÀýÈç£¬Èç¹ûÄãÓÃ `{\ttfamily /vmlinuz}' µÄ»°£¬¾ÍÏñÕâÑù `{\ttfamily cp zImage /vmlinuz}')£®
È»áá£¬Ö´ÐÐ `{\ttfamily lilo}'£¬µ«ÊÇÔÚ½Ï¾ÉµÄÏµÍ³ÉÏ£¬Äã¿ÉÄÜ±ØÐëÖ´ÐÐ {\ttfamily /etc/lilo/install} »òÉõÖÁÊÇ {\ttfamily /etc/lilo/lilo -C /etc/lilo/config}£®

Èç¹ûÄãÏëÖªµÀ¸ü¶àÓÐ¹Øì¶ LILO µÄÅäÖÃ£¬»òÊÇÄã²¢Ã»ÓÐ LILO µ«ÊÇÄãÏëÒª°²×°µÄ»°£¬
´ÓÄãÏ²»¶µÄ ftp ½ÚµãÈ¡µÃ×îÐÂµÄ°æ±¾È»ááÒÀËµÃ÷ÐÐÊÂ£®

ÒªÄÜ¹»´ÓÓ²µúÆô¶¯ÄãµÄ¾ÉºËÐÄÆäÖÐÖ®Ò»µÄ»°(ÕâÊÇÁíÒ»¸öÔÚÐÂºËÐÄ³ö×´¿öµÄÇé¿öÏÂ±£»¤Äã×Ô¼ºµÄ·½·¨)£¬
°Ñ LILO ÅäÖÃµµÖÐËùÓÐµÄ(°üÀ¨) `{\ttfamily image = xxx}' ¿½±´µ½µµ°¸µÄ×îµ×¶Ë£¬
È»áá°Ñ `{\ttfamily image = xxx}' ¸Ä³É `{\ttfamily image = yyy}' ÆäÖÐµÄ `{\ttfamily yyy}' ÊÇÄã±¸·Ý¾ÉºËÐÄËù´æµµµÄÃû×Ö£®
½ÓÖø£¬°Ñ `{\ttfamily label = zzz}' ¸Ä³ÉÏñÊÇ `{\ttfamily label = linux-backup}' È»ááÖØÐÂÖ´ÐÐ {\ttfamily lilo}£®
Äã¿ÉÄÜµÃÒª¼ÓÉÏÒ»ÐÐ `{\ttfamily delay=x}'£¬ÆäÖÐµÄ x ÊÇÒÔÊ®·ÖÖ®Ò»ÃëÎªµ¥Î»µÄÊ±¼ä£¬
ÕâÊÇ¸æËß LILO ÔÚÆô¶¯Ç°ÏÈµÈÒ»ÏÂ£¬ËùÒÔÄã¿ÉÒÔÖÐ¶ÏËüµÄÖ´ÐÐ(ÀýÈçÓÃ shift ¼ü)£®
È»áá¼üÈëËù±¸·ÝµÄÆô¶¯Ó³ÏñÖ® label (ÔÚ·¢ÉúÁËÄ³Ð©ÁîÈË²»Óä¿ìµÄÊÂÇéµÄÇé¿öÏÂ)£®




\section{ÐÞ²¹ºËÐÄ}






\subsection{Ê¹ÓÃÐÞ²¹µµ}

ºËÐÄµÄÐ¡·ù¸üÐÂÊÇÒÔÐÞ²¹µµµÄ·½Ê½·¢ÐÐ£®ÀýÈç£¬Èç¹ûÄãµÄ°æ±¾ÊÇ 1.1.45 £¬
¶øÇÒÄã×¢Òâµ½³öÏÖÁËÒ»¸ö `{\ttfamily patch46.gz}' ¿ÉÒÔÓÃÀ´Éý¼¶Ëü£¬
Õâ´ú±íÄã¿ÉÒÔ½åÓÉÊ¹ÓÃÕâ¸öÐÞ²¹µµ½«°æ±¾Éý¼¶µ½ 1.1.46£®
ÄãÒ²Ðí»áÏëÒªÏÈ±¸·ÝÔ­Ê¼³ÌÊ½Âë(`{\ttfamily make clean}' È»áá `{\ttfamily cd /usr/src; tar zcvf old-tree.tar.gz linux}' ½«»áÎªÄãÔì³öÒ»·Ý tar Ñ¹Ëõµµ£¬ÀïÃæ¾ÍÊÇÕû¸öÔ­Ê¼³ÌÊ½ÂëÓëÆäµµ°¸¼Ü¹¹)£®

ÏÖÔÚ½ÓÖø¼ÌÐøÉÏÃæµÄÀý×Ó£¬¼ÙÉèÄãÒÑ¾­È¡µÃÁË `{\ttfamily patch46.gz}' ²¢·ÅÔÚ {\ttfamily /usr/src} ÏÂ£®
{\ttfamily cd} µ½ {\ttfamily /usr/src} È»ááÖ´ÐÐ `{\ttfamily zcat patch46.gz $|$ patch -p0}' (Èç¹û²¢²»ÊÇÑ¹Ëõ¹ýµÄÐÞ²¹µµ£¬ÄÇ÷á¾ÍÖ´ÐÐ `{\ttfamily patch -p0 $<$ patch46}')£¬
Äã½«»á¿´µ½Ðí¶à¶«Î÷·ÉÊÅ¶ø¹ý(»òÊÇÂýÂýÌø¹ý£¬Èç¹ûÄãµÄµçÄÔÕæµÄºÜÂýµÄ»°)¸æËßÄãËüÕýÊÔÖøÐÞ²¹³ÌÊ½£¬ÒÔ¼°ÊÇ·ñ³É¹¦£®
Í¨³££¬Õâ¸ö¹ý³Ì¿ìµÃÎÞ·¨×ÐÏ¸¿´Çå³þËüµÄ¶¯×÷£¬ËùÒÔÄã»áÎÞ·¨È·¶¨Ëüµ½µ×ÓÐÃ»ÓÐ³É¹¦µØÖ´ÐÐ£®
ËùÒÔÄã¿ÉÄÜ»áÏëÔÚ {\ttfamily patch} Ö¸ÁîÖÐ¼ÓÉÏ {\ttfamily -s} Ñ¡Ïî£¬¸æËß {\ttfamily patch} ³ÌÊ½Ö»±¨¸æ´íÎóÑ¶Ï¢¾ÍºÃ£®
(ÕâÑùÄã¾Í²»»áµÃµ½Ðí¶à``àË! ÎÒµÄµçÄÔÕýÔÚ×öÄ³Ð©¸Ä±ä!''µÄ¸Ð¾õ£¬²»¹ýÄã¿ÉÄÜÄþÔ¸ÕâÑù¡­)
ÄÇ÷á¾ÍµÃÕÒÕÒ¿´Ò»Ð©¿ÉÄÜ²»ÊÇÄÇ÷áË³ÀûµÄÊÂ£®{\ttfamily cd} µ½ {\ttfamily /usr/src/linux} ²¢ÕÒÑ°µµÃû½áÎ²Îª {\ttfamily .rej} µÄµµ°¸£®
Ä³Ð©°æ±¾µÄ {\ttfamily patch}£¨±È½Ï¾ÉµÄ°æ±¾£¬ËüÃÇ¿ÉÄÜÊÇÔÚ±È½ÏÔçÆÚµÄµµ°¸ÏµÍ³ÉÏ±àÒëµÄ£©»á°ÑÕâÐ©Ã»ÓÐ³É¹¦µÄ²Ù×÷¼ÇÂ¼ÔÚµµÃûÓÐ {\ttfamily \#} µÄµµ°¸Àï£®
Äã¿ÉÒÔÓÃ `{\ttfamily find}' À´ÌæÄãÕÒ£»
\begin{verbatim}
    find .  -name '*.rej' -print
\end{verbatim}

»á½«ÏÖÐÐÄ¿Â¼¼°×ÓÄ¿Â¼ÏÂËùÓÐ¾ß {\ttfamily .rej} ½áÎ²µÄµµÃûÓ¡µ½±ê×¼Êä³ö£®

Èç¹ûÒ»ÇÐÕýÈ·ÎÞÎóµÄ»°£¬Ö´ÐÐµÚÈý½Ú¸úµÚËÄ½ÚËùÌÖÂÛµÄ `{\ttfamily make clean}'£¬`{\ttfamily config}' ÒÔ¼° `{\ttfamily dep}'£®

¹Øì¶ {\ttfamily patch} Ö¸ÁîÁíÍâ»¹ÓÐÒ»Ð©Ñ¡Ïî£®ÈçÇ°ËùÊö£¬{\ttfamily patch -s} ½«»áÒÖÖÆ³ýÁË´íÎóÒÔÍâµÄËùÓÐÆäËûÑ¶Ï¢£®
Èç¹ûÄã°ÑºËÐÄÔ­Ê¼³ÌÊ½Âë·ÅÔÚ {\ttfamily /usr/src/linux} ÒÔÍâµÄµØ·½£¬ÔÚ¸ÃÄ¿Â¼ÏÂÓÃ {\ttfamily patch -p1} Ò²¿ÉÒÔÇ¬¾»ÀþÂäµÄÖ´ÐÐÐÞ²¹ÈÎÎñ£®
ÆäËüµÄ {\ttfamily patch} Ñ¡ÏîÔÚÏßÉÏÊÖ²á(man page)Àï¶¼ÓÐºÜÏêÏ¸µÄÃèÊö£®




\subsection{Èç¹ûÓÐ´íÎó·¢Éú}

(×¢Òâ: ±¾½ÚÌáµ½µÄ´ó²¿·ÝÊÇÖ¸¾É°æµÄºËÐÄ)

Í¨³£×î³£·¢ÉúµÄÎÊÌâÊÇµ± {\ttfamily patch} ÐÞ¸ÄÒ»¸ö½Ð×ö `{\ttfamily config.in}' µÄµµ°¸Ê±£¬Õâ¸öµµ°¸¿´ÆðÀ´²»Ôõ÷á¶Ô¾¢£¬
ÒòÎªÄãÐÞ¸ÄÁËÒ»Ð©Ñ¡ÏîÀ´ÅäºÏÄãµÄ»úÆ÷£®Õâ¸öÎÊÌâÒÑ¾­Ð¡ÐÄµÄ×¢Òâ¹ýÁË£¬µ«»¹ÊÇ¿ÉÄÜÓÐÈË»áÔÚ½Ï¾ÉµÄ°æ±¾ÉÏÔâÓöÕâ¸öÎÊÌâ£®
ÒªÐÞÕýÕâ¸öÎÊÌâµÄ»°£¬²é¿´ {\ttfamily config.in.rej} Õâ¸öµµ°¸ÀïÁôÏÂÐ©Ê²÷áÑ¶Ï¢£®
ÓÐÐÞ¸Ä¹ýµÄ²¿·ÝÕý³£À´Ëµ»áÔÚÃ¿Ò»ÐÐ¿ªÊ¼µÄµØ·½±êÉÏ `{\ttfamily +}' ºÍ `{\ttfamily -}'£®
²é¿´ÓÐ±ê¼ÇµÄ¸½½ü¼¸ÐÐ£¬È»áá¼ÇµÃËüÃÇÊÇÉè³É `{\ttfamily y}' »òÊÇ `{\ttfamily n}'£®
ÏÖÔÚ±à¼­ {\ttfamily config.in} µµ£¬È»ááÔÚÊÊµ±µÄµØ
·½°Ñ `{\ttfamily y}' ¸Ä³É `{\ttfamily n}' ÒÔ¼° `{\ttfamily n}' ¸Ä³É `{\ttfamily y}'£®Ö´ÐÐ
\begin{verbatim}
    patch -p0 < config.in.rej
\end{verbatim}

Èç¹û³É¹¦µÄ»°(Ã»ÓÐ´íÎó)£¬ÄÇ÷áÄã¾Í¿ÉÒÔ¼ÌÐøÅäÖÃÓë±àÒëµÄ¹¤×÷£®
Õâ¸ö {\ttfamily config.in.rej} µµ»¹ÊÇ»áÁôÔÚÄÇÀï£¬µ«ÊÇÄã¿ÉÒÔ¿³µôËü£®



Èç¹ûÄãÈÔÈ»ÔâÓöÆäËüÎÊÌâ£¬ÄÇ÷á¿ÉÄÜÊÇÄã°²×°ÁËÒ»·ÝËð»µµÄÐÞ²¹µµ£®
Èç¹û patch ÏÔÊ¾ `{\ttfamily previously applied patch detected: Assume -R?}'£¬
Äã¿ÉÄÜÊ¹ÓÃÁËÒ»Ð©±ÈÄãÄ¿Ç°µÄ°æ±¾±àºÅ»¹µÍµÄÐÞ²¹µµ; Èç¹ûÄã»Ø´ð `{\ttfamily y}'£¬Ëü»á³¢ÊÔ½«ÄãµÄ³ÌÊ½Âë½µ¼¶£¬¶øÇÒ¼¸ºõÒ»¶¨»áÊ§°Ü;
Èç´Ë£¬Äã¾ÍÐèÒªÖØÐÂÈ¡µÃÒ»·ÝÐÂµÄÔ­Ê¼³ÌÊ½Âë£®

Òª»¹Ô­µ½ÐÞ²¹Ç°µÄ×´Ì¬µÄ»°£¬ÔÚÔ­ÏÈµÄÐÞ²¹µµÉÏÖ´ÐÐ `{\ttfamily patch -R}'£®

µ±ÐÞ²¹µµÕæµÄÊ§°ÜµÄÊ±ºò£¬×îºÃµÄ°ì·¨ÊÇ´ÓÒ»¸öÇ¬¾»µÄÔ­Ê¼³ÌÊ½Âë(ÀýÈç´Ó linux-x.x.x.tar.gz µµ°¸ÆäÖÐÖ®Ò»)¿ªÊ¼£¬ÔÙÖØÐÂÖ´ÐÐ£®




\subsection{¿³µô .orig µµ°¸}

Ö»Òª×ö¹ý¼¸´ÎÐÞ²¹ÒÔáá£¬ÄÇÐ© {\ttfamily .orig} µÄµµ°¸½«»á¿ªÊ¼¶Ñ»ý£®
ÀýÈç£¬ÎÒµÄÒ»¸ö 1.1.51 °æµÄ³ÌÊ½Âë×îááÒ»´Î×öÇåÉ¨ÊÇÔÚ 1.1.48 °æ£¨ÎÒÏëÊÇ°É£©£®
É¾³ýÕâÐ© {\ttfamily .orig} µµ°¸»á½ÚÊ¡Ðí¶àµÄ´Åµú¿Õ¼ä£®
\begin{verbatim}
    find .  -name '*.orig' -exec rm -f {} ';'
\end{verbatim}

½«»áÌæÄãÕÕÁÏÕâ¼þÊÂ£®Ä³Ð©°æ±¾µÄ {\ttfamily patch} »áÓÃ \~{} À´´úÌæ {\ttfamily .orig}£®

ÓÐÆäËü¸üºÃµÄµÄ°ì·¨¿É¿³µôÕâÐ© {\ttfamily .orig} µµ£¬¾ÍÊÇÀûÓÃ GNU µÄ {\ttfamily xargs}:
\begin{verbatim}
    find .  -name '*.orig' | xargs rm
\end{verbatim}

»òÊÇ¸ü°²È«µ«ÓÐÐ©ÂÞàÂµÄ·½·¨:
\begin{verbatim}
    find . -name '*.orig' -print0 | xargs --null rm --
\end{verbatim}





\subsection{ÆäËüµÄÐÞ²¹µµ}

ÓÐÒ»Ð©²¢²»ÊÇÓÉ Linus ·¢ÐÐµÄÆäËüÐÞ²¹µµ³öÏÖ(ÎÒ½«³ÆÖ®Îª``·Ç±ê×¼µÄ'')£®
Èç¹ûÄãÊ¹ÓÃÁËËüÃÇ£¬Linus µÄÐÞ²¹µµ¿ÉÄÜ»á¶øÎÞ·¨ÕýÈ·µØÖ´ÐÐ£¬
ÄÇ÷áÄã²»ÊÇµÃ½«ËüÃÇ»¹Ô­¾ÍÊÇµÃÒò´Ë¶øÈ¥ÐÞ¸ÄÔ­Ê¼³ÌÊ½Âë»òÊÇÐÞ²¹µµ£®Õâ¸ö¹¤×÷¶Ô³õÑ§ÕßÍ¨³£ÊÇºÜÌÖÑá£¬
ËùÒÔÈç¹ûÄã²»ÏëÈ¥ÐÞ¸ÄÔ­Ê¼³ÌÊ½Âë(½á¹ûÍ¨³£²»´óºÃ)£¬ÔÚÊ¹ÓÃ Linus µÄÐÞ²¹µµÖ®Ç°ÏÈ»¹Ô­ÕâÐ©·Ç±ê×¼µÄÐÞ²¹µµ£¬»òÖØÐÂ°²×°ÐÂµÄ³ÌÊ½Âë£®
È»ááÊÔÊÔÕâ·Ç±ê×¼µÄÐÞ²¹µµÄÜ²»ÄÜÓÃ£®Èç¹û²»ÄÜµÄ»°£¬ÄÇ÷áÒª²»Äã¾Í¼ÌÐøÊ¹ÓÃ¾ÉµÄºËÐÄ£¬
ÊÔÖøÐÞ¸ÄÐÞ²¹µµÊ¹ÆäÄÜÓÃ£¬Òª²»¾ÍµÈ´ý(¿ÉÄÜÊÇÆòÇó)ÐÂ°æ·Ç±ê×¼ÐÞ²¹µµ³öÏÖ£®

·Ç±ê×¼µÄÐÞ²¹µµÓÐ¶àÆÕ±é? ÄãÓÐ¿ÉÄÜÔø¾­Ìý¹ýËüÃÇ£®ÎÒÊ¹ÓÃ Bill Paul µÄ²»ÉÁË¸ÐÞ²¹µµÀ´ÐÞ¸ÄÎÒµÄÐéÄâ¿ØÖÆÌ¨£¬ÒòÎªÎÒÌÖÑá»áÉÁË¸µÄÓÎ±ê(Õâ¸öÐÞ²¹µµ¾­³£ÎªÐÂ°æºËÐÄ¶ø¸üÐÂ)£®
ÓÉì¶´ó²¿·Ý½ÏÐÂµÄÉè±¸Çý¶¯³ÌÊ½¶¼ÒÑ¾­±»·¢Õ¹³É¿ÉÔØÈëÄ£×éÐÎÊ½£¬Òò´ËÐí¶à·Ç±ê×¼µÄÐÞ²¹µµµÄÖØÒªÐÔÒÑÖð½¥½µµÍ£®




\section{¸½¼ÓµÄÌ×¼þ}

ÄãµÄ Linux ºËÐÄÓÐÐí¶àÔÚÔ­Ê¼³ÌÊ½Âë±¾ÉíÀïÃæ²¢Ã»ÓÐËµÃ÷µÄÌØÐÔ£»
ÕâÐ©ÌØÐÔÒ»°ãÊÇ¾­ÓÉÍâÀ´µÄÈíÌåÀ´ÀûÓÃ£¬ÔÚÕâÀïÁÐ³öÒ»²¿·Ö×îÆÕ±éµÄ£º




\subsection{kbd}

Linux µÄ¿ØÖÆÌ¨ÓÐÖø±ÈÄãËùÄÜ³Ô¾ª¸ü¶àµÄÌØÉ«£®Õâ°üÀ¨ÇÐ»»×ÖÐÍ£¬ÖØÐÂ¶ÔÓ³ÄãµÄ¼üÅÌ£¬ÇÐ»»ÏÔÊ¾Ä£Ê½(½ÏÐÂ°æµÄºËÐÄ)µÄÄÜÁ¦µÈµÈ£®
kbd ÕâÌ×ÈíÌåÀïÓÐÄÜ¹»ÈÃÊ¹ÓÃÕß×öÕâÐ©¶¯×÷µÄÖ§Ô®³ÌÊ½£¬»¹¼ÓÉÏÒ»´ó¶ÑµÄ×ÖÐÍÒÔ¼°¼¸ºõ×ãÒÔÊÊÓÃÈÎºÎ¼üÅÌµÄÒ»Ð©¼üÅÌ¶ÔÓ³±í£®
Ëü¿ÉÔÚ·ÅÖÃºËÐÄÔ­Ê¼ÂëµÄÍ¬Ò»Õ¾Ì¨ÕÒµ½£®




\subsection{util-linux}

Rik Faith ({\ttfamily \onlynameurl{faith@cs.unc.edu}}) ÊÕ¼¯ÁËÒ»´ó¶Ñ Linux µÄ¹¤¾ß£¬½Ð×ö util-linux£®
ÏÖÔÚÊÇÓÉ Nicolai Langfeldt ({\ttfamily \onlynameurl{util-linux@math.uio.no}}) ËùÎ¬»¤£®
¿É´Ó sunsite.unc.edu µÄ {\ttfamily \onlynameurl{/pub/Linux/system/misc}} È¡µÃ£®
Ëü°üÀ¨ÁËÏñ {\ttfamily setterm}£¬{\ttfamily rdev} ÒÔ¼° {\ttfamily ctrlaltdel} ÓëºËÐÄÓÐ¹ØµÄ¹¤¾ß£®
¾ÍÏñ Rik ËùËµµÄ£¬{\itshape ²»ÒªÏë¶¼²»Ïë¾Í°ÑËü×°ÉÏÈ¥!\/} Äã²»ÐèÒª°²×°´ËÌ×¼þÖÐµÄÃ¿Ò»¸ö¶«Î÷£¬¶øÇÒÈç¹ûÄãÕâÑù×öµÄ»°¿ÉÄÜ»áÒýÆðÑÏÖØµÄÎÊÌâ£®




\subsection{hdparm}

ÏñºÜ¶àÈíÌåÒ»Ñù£¬ÕâÔø¾­ÊÇÒ»¸öºËÐÄÐÞ²¹µµ¼°ÆäÖ§Ô®³ÌÊ½£®
ÕâÐ©ÐÞ²¹µµ±»·ÅÈëÉÌÒµºËÐÄÖÐ£¬¶øÓÃÀ´×î¼Ñ»¯ÒÔ¼°µ÷ÊÊÄãÓ²µúµÄÖ§Ô®³ÌÊ½Ò»°ãÊÇ·Ö¿ª·¢ÐÐµÄ£®




\subsection{gpm}

gpm ÊÇ general purpose mouse µÄ¼òÐ´£®
Õâ¸ö³ÌÊ½¿ÉÒÔÈÃÄãÊ¹ÓÃ²»Í¬ÖÖÀàµÄ»¬ÊóÔÚÐéÄâ¿ØÖÆÌ¨Ö®¼ä¼ôÌù£¬ÒÔ¼°×öÒ»Ð©ÆäËüµÄÊÂÇé£®




\section{Ò»Ð©ÏÝÚå\label{pitfalls}}






\subsection{make clean }

Èç¹ûÄãµÄÐÂºËÐÄ»á×öÒ»Ð©ÕæµÄºÜÆæ¹ÖµÄÊÂ£¬ÓÐ¿ÉÄÜÊÇÒòÎªÔÚ±àÒëºËÐÄÇ°ÄãÍüÁË×öÇå³ý {\ttfamily make clean}£®
Ö¢×´´ÓÄãµÄºËÐÄ²»Õý³£µØ±ÀÀ£µ½Ææ¹ÖµÄÊä³öÈëÎÊÌâ£¬Ò»Ö±µ½¿ÉÁ¯µÄÖ´ÐÐÐ§ÂÊµÈµÈ²»Ò»¶ø×ã£¬¿ÉÒÔÊÇÈÎºÎÊÂ£®
×îºÃÒ²ÒªÈ·¶¨ÄãÓÐ×ö {\ttfamily make dep}£®




\subsection{¾Þ´ó»ò»ºÂýµÄºËÐÄ}

Èç¹ûÄãµÄºËÐÄÕ¼ÓÃÁË´óÁ¿µÄ¼ÇÒäÌå£¬»òÕßËüÕæµÄÊÇºÜ´óºÜ´ó£¬Ò²»òÕßÊÇ¼´Ê¹ÓÃÄãÈ«ÐÂµÄ 786DX6/440 À´±àÒëÈ´¶¼»¹ÏñÊÇÓÀÔ¶±àÒë²»ÍêµÄ»°£¬
ÄÇ÷áÓÐ¿ÉÄÜÊÇÒòÎªÄãÅäÖÃÁËÌ«¶à²»±ØÒªµÄ¶«Î÷(Éè±¸Çý¶¯³ÌÊ½£¬µµ°¸ÏµÍ³µÈµÈ)£®
Èç¹ûÄã²»»áÓÃµ½Ä³Ð©¶«Î÷£¬ÄÇ¾Í²»ÒªÅäÖÃËü£¬ÒòÎªËüÕæµÄ»áÕ¼ÓÃ¼ÇÒäÌå£®
ºËÐÄ¹ýì¶Ó·Ö××îÃ÷ÏÔµÄÖ¢×´¾ÍÊÇ·¢Éú¼ÇÒäÌåÓë´ÅµúÖ®¼äÒì³£´óÁ¿µÄ×ÊÁÏ½»»»£®
Èç¹ûÄã²»ÊÇÓÃÄÇÖÖÉùÒôÌýÆðÀ´ºÃÏñÊÇÅçÉä»ú½µÂäµÄ¾ÉÐÍ Fujitsu Eagles Ó²µú£¬¼ì²éÒ»ÏÂÄãµÄºËÐÄÅäÖÃ£®

Äã¿ÉÒÔÕÒ³öÄã»úÆ÷ÉÏÈ«²¿¼ÇÒäÌåµÄÊýÁ¿£¬È»áá¼õµô {\ttfamily /proc/meminfo} ÀïÃæµÄ ``total mem'' »ò `{\ttfamily free}' Ö¸ÁîËùµÃµÄ¼ÇÒäÌåÊýÁ¿À´µÃÖªºËÐÄÊ¹ÓÃÁË¶àÉÙ¼ÇÒäÌå£®
ÄãÒ²¿ÉÒÔÖ´ÐÐ `{\ttfamily dmesg}' (»òÕßÒ²¿ÉÒÔ²é¿´ºËÐÄµÄ¼ÇÂ¼µµ£¬ËüÒ»¶¨ÔÚ»áÄãµÄÏµÍ³Àï)£®¿´ÆðÀ´¾ÍÏñÕâÒ»ÐÐ£º

{\ttfamily Memory: 15124k/16384k available (552k kernel code, 384k reserved, 324k data)}

ÎÒµÄ 386 (ÅäÖÃºÜÉÙÀ¬»ø)ÏÔÊ¾ÈçÏÂ£º

{\ttfamily Memory: 7000k/8192k available (496k kernel code, 384k reserved, 312k data)}

Èç¹ûÄã`±ØÐë'µÃµ½Ò»´óÐÍºËÐÄµ«ÏµÍ³È´²»ÈÃÄã×ö£¬Äã¿ÉÒÔÊÔÊÔ `{\ttfamily make bzimage}'£®
Äã¿ÉÄÜ±ØÐë°²×°ÐÂ°æµÄ LILO À´×öÕâ¼þÊÂ£®




\subsection{ºËÐÄÎÞ·¨±àÒë}

Èç¹ûËüÃ»ÓÐ±»±àÒë£¬ÄÇ÷á¿ÉÄÜÊÇÓÐ¸öÐÞ²¹µµÊ§°ÜÁË£¬»òÕßÊÇÄã´ÓÄ³¸öµØ·½ÄÃµ½µÄÔ­Ê¼³ÌÊ½ÂëÓÐÎÊÌâ£®
Ò²ÓÐ¿ÉÄÜÊÇÒòÎªÄãµÄ gcc °æ±¾²»ÕýÈ·»ò»µµôÁË(ÀýÈçº¬ÈëµµÓÐ´íÎó)£®
È·¶¨ Linus ÔÚ {\ttfamily README} ÀïËùÃèÊöµÄ·ûºÅÁ´½á¶¼ÓÐÕýÈ·½¨Á¢£®
Ò»°ãËµÀ´£¬Èç¹ûºËÐÄÃ»ÄÜ±àÒë£¬Õâ±íÊ¾ÔÚÄ³Ð©µØ·½ÓÐÑÏÖØµÄ´íÎó£¬ÖØÐÂ°²×°Ä³Ð©¹¤¾ß¿ÉÄÜÊÇ±ØÐëµÄ£®

»òÕß¿ÉÄÜÄãÓÃ ELF ±àÒëÆ÷ (gcc 2.6.3 »òÒÔááµÄ) À´±àÒë 1.2.x µÄºËÐÄ£®
Èç¹û±àÒë¹ý³ÌÖÐÄãµÃµ½Ò»´ó¶ÑµÄ {\ttfamily xxxx undefined} µÄÑ¶Ï¢£¬Õâ¿ÉÄÜÊÇÄãµÄÎÊÌâ£®
ÐÞÕýµÄ·½·¨´ó²¿·Ý¶¼ºÜ¼òµ¥£®½«Õâ¼¸ÐÐ¼Óµ½ {\ttfamily arch/i386/Makefile} µÄ¶¥¶Ë:
{\ttfamily arch/i386/Makefile}:
\begin{verbatim}
AS=/usr/i486-linuxaout/bin/as
LD=/usr/i486-linuxaout/bin/ld -m i386linux
CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include
\end{verbatim}

È»ááÖØÐÂÖ´ÐÐ {\ttfamily make dep} Óë {\ttfamily zImage}£®

ÔÚÉÙÊýÇé¿öÏÂ£¬gcc ¿ÉÄÜ»áÓÉì¶Ó²ÌåÎÊÌâ¶øµ±µô£®´íÎóÑ¶Ï¢»áÏñ ``xxx exited with signal 15'' Ö®ÀàµÄ£¬¶øÇÒ»á¿´ÆðÀ´ºÜÆæ¹Ö£®
ÎÒ±¾À´²»ÏëÌáÕâµãµÄ£¬²»¹ýÔÚÎÒÉíÉÏÒ²·¢Éú¹ýÒ»´Î - ÎÒÓÐÒ»Ð©»µµÄ cache ¼ÇÒäÌå£¬±àÒëÆ÷Ê±³£»áËæ»úµØµ±µô£®
Èç¹ûÄãÓÐ´ËÎÊÌâµÄ»°ÏÈÊÔÖøÖØÐÂ°²×° gcc£®Èç¹ûÄã½«Íâ²¿ cache ¹Øµô£¬¼õÉÙÒ»Ð© RAM Ö®ááºËÐÄ¾Í±àÒë³É¹¦ÁË£¬Äã´ó¸ÅÖ»»á¾õµÃ¿ÉÒÉ£®

¸æËßÈËÃÇËûµÄÓ²ÌåÓÐÎÊÌâ³£»áÊ¹ÈËÀ§ÈÅ£®²»¹ý£¬Õâ²»ÊÇÎÒ·¢Ã÷µÄ£®
ÕâÊÇÒ»¸ö FAQ -- ¿ÉÒÔÔÚ {\ttfamily \onlynameurl{http://www.bitwizard.nl/sig11/}} ÕÒµ½£®




\subsection{ÐÂ°æµÄºËÐÄËÆºõ²»ÄÜÆô¶¯}

ÄãÃ»ÓÐÖ´ÐÐ LILO £¬»òÊÇÃ»ÓÐÕýÈ·µÄÅäÖÃËü£®ÓÐÒ»´ÎÎÒÔø¾­Åöµ½µÄÎÊÌâÊÇ³öÔÚÅäÖÃµµÀï£¬
ÎÒÓÃÁË `{\ttfamily boot = /dev/hda1}' ¶ø²»ÊÇ `{\ttfamily boot = /dev/hda}'
(ÕâÔÚ¸Õ¿ªÊ¼Ê±ÕæµÄÊÇºÜÌÖÑá£¬µ«ÊÇÒ»µ©ÄãÓÐÁËÒ»¸ö¿ÉÒÔÓÃµÄÅäÖÃµµ£¬Ó¦¸Ã²»ÐèÒªÈ¥ÔÙÈ¥¸Ä±äËü)£®




\subsection{ÄãÍüÁËÖ´ÐÐ LILO£¬»òÏµÍ³¸ù±¾²»ÄÜÆô¶¯}

àÞ£¡ÏÖÔÚ×îºÃµÄ°ì·¨ÊÇÓÃ´ÅÆ¬Æô¶¯£¬²¢ÇÒ×¼±¸ÁíÒ»ÕÅ¿ÉÒÔÆô¶¯µÄ´ÅÆ¬(ÏñÊÇ`{\ttfamily make zdisk}'Ê±×öµÄ´ÅÆ¬)£®
ÄãµÃÖªµÀÄãµÄ¸ùÄ¿Â¼({\ttfamily /})ËùÔÚµÄ·Ö¸îÇøÒÔ¼°ËüµÄ¸ñÊ½(second extended, minix µÈµÈ)£®
ÔÚÏÂÃæµÄÀý×ÓÖÐ£¬ÄãÒ²µÃÖªµÀÄãµÄ {\ttfamily /usr/src/linux} Ô­Ê¼³ÌÊ½ÂëÔÚÄÇ¸ö·Ö¸îÇø£¬ËüµÄ¸ñÊ½£¬ÒÔ¼°ËüÒ»°ã»á¹ÒÔÚÄÇ¶ù£®

ÔÚÕâ¸öÀý×ÓÖÐ£¬ ¸ùÄ¿Â¼ {\ttfamily /} ÊÇ {\ttfamily /dev/hda1}£¬¶ø³ÖÓÐ {\ttfamily /usr/src/linux} µÄ·Ö¸îÇøÊÇ {\ttfamily /dev/hda3}£¬Ò»°ã»á¹ÒÔÚ {\ttfamily /usr} ÏÂ£®
ËüÃÇ¶¼ÊÇ second extended µµ°¸ÏµÍ³£®¿ÉÒÔÔË×÷µÄºËÐÄÓ³Ïñ½Ð×ö {\ttfamily zImage} £¬·ÅÔÚ {\ttfamily /usr/src/linux/arch/i386/boot} µ×ÏÂ£®

Õâ¸öÖ÷ÒâÊÇÕâÑùµÄ£¬¼ÙÈôÓÐÒ»¸ö¿ÉÒÔÔË×÷µÄºËÐÄÓ³Ïñ½Ð×ö {\ttfamily zImage}£¬¿ÉÄÜ¿ÉÒÔ°ÑËüÓÃÔÚÐÂµÄ´ÅÆ¬ÉÏ£®
ÁíÍâÒ»¸ö²»Ò»¶¨»á¸üºÃµÄ±äÍ¨°ì·¨(Õâ¸úÄãµÄÏµÍ³Ôõ÷á×é³ÉµÄÓÐ¹Ø)ÔÚËµÃ÷Õâ¸öÀý×ÓÖ®áá»áÌÖÂÛµ½£®

Ê×ÏÈ£¬´Ó boot/root ´ÅÆ¬»òÕßÊÇ¼±¾È´ÅÆ¬¿ª»ú£¬È»áá½«³ÖÓÐ¿ÉÔË×÷ºËÐÄµÄ·Ö¸îÇø¹ÒÉÏÀ´£º

\begin{verbatim}
    mkdir /mnt
    mount -t ext2 /dev/hda3 /mnt
\end{verbatim}


Èç¹û {\ttfamily mkdir} Ö¸ÁîÏÔÊ¾¸ÃÄ¿Â¼ÒÑ¾­´æÔÚ£¬ºöÂÔµô²»±ØÀí»áËü£®
ÏÖÔÚ£¬{\ttfamily cd} µ½³ÖÓÐ¿ÉÔË×÷ºËÐÄµÄµØ·½£®×¢Òâ:
\begin{verbatim}
/mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot
\end{verbatim}

°ÑÒ»ÕÅ¸ñÊ½»¯¹ýµÄ´ÅÆ¬·Å½ø ``A:'' ´Åµú»ú(È·¶¨²»ÊÇÄãµÄ boot/root ´ÅÆ¬!)£¬
°ÑÓ³ÏñµµÇãµ¹µ½´ÅÆ¬ÀïÈ¥£¬È»ááÅäÖÃÄãµÄ¸ùÄ¿Â¼·Ö¸îÇø:

\begin{verbatim}
    cd /mnt/src/linux/arch/i386/boot
    dd if=zImage of=/dev/fd0
    rdev /dev/fd0 /dev/hda1
\end{verbatim}


{\ttfamily cd} µ½¸ùÄ¿Â¼ {\ttfamily /} ²¢ÇÒÐ¶ÏÂ±ê×¼ {\ttfamily /usr} ·Ö¸îÇø:

\begin{verbatim}
    cd /
    umount /mnt
\end{verbatim}


ÄãÏÖÔÚÓ¦¸Ã¿ÉÒÔ´ÓÕâÕÅ´ÅÆ¬Õý³£µÄ¿ª»úÁË£®ÔÚÕâ´Î¿ª»úáá²»ÒªÍü¼ÇÖ´ÐÐ lilo (»òÊÇÆäËüÄãÔø¾­×ö´íµÄÊ²÷áÊÂ)!

ÈçÍ¬Ç°ÃæÔø¾­Ìá¹ýµÄ£¬»¹ÓÐÁíÍâÒ»ÖÖºÜÆÕ±éµÄ±äÍ¨·½Ê½£®
Èç¹ûÇé¿öÊÇÄãÓÐÒ»¸ö¿ÉÒÔÔË×÷µÄºËÐÄÔÚ·ÅÔÚ {\ttfamily /} (ÀýÈç {\ttfamily /vmlinuz})£¬ÄãÒ²¿ÉÒÔÊ¹ÓÃËü£®
¼Ù¶¨ËùÓÐµÄÌõ¼þ¶¼¸úÉÏÃæµÄÀý×ÓÒ»Ñù£¬¶øÎÒµÄºËÐÄÓ³ÏñÊÇ {\ttfamily /vmlinuz}£¬Ö»Òª¶ÔÉÏÃæµÄÀý×Ó×öÕâÐ©¸Ä±ä:
°Ñ {\ttfamily /dev/hda3} ¸Ä³É {\ttfamily /dev/hda1} ({\ttfamily /} ·Ö¸îÇø)£¬
°Ñ {\ttfamily /mnt/src/linux} ¸Ä³É {\ttfamily /mnt}£¬²¢ÇÒ°Ñ {\ttfamily if=zImage} ¸Ä³É {\ttfamily if=vmlinuz}£®
ÖÁì¶Ç°ÃæÓÐ¹Ø×¢ÒâÈçºÎÍÆµ¼³ö {\ttfamily /mnt/src/linux/arch/i386/boot} µÄÄÇ¸ö²¿·Ö¿ÉÒÔºöÂÔ£®

½« LILO Ê¹ÓÃÔÚ´óµÄÓ²µúÉÏ(³¬¹ý 1024 ´ÅÖù)¿ÉÄÜ»áÓÐÎÊÌâ£®
Çë²Î¼û LILO mini-HOWTO »òÆäËüÎÄ¼þµÄËµÃ÷£®




\subsection{ÏµÍ³±íÊ¾ `warning: bdflush not running' }

Õâ¿ÉÒÔËãÊÇÒ»¸öÏàµ±ÑÏÖØµÄÎÊÌâ£®´Ó 1.0 °æÒÔááµÄºËÐÄ¿ªÊ¼(´ó¸ÅÊÇÔÚ 1994 ÄêËÄÔÂ¶þÊ®ÈÕ×óÓÒ)£¬
ÓÐ¸ö»áÖÜÆÚÐÔµØ¸üÐÂµµ°¸ÏµÍ³»º³åÇøµÄ³ÌÊ½½Ð×ö `{\ttfamily update}' ±»Éý¼¶»òÈ¡´úµôÁË£®
È¡µÃ `{\ttfamily bdflush}' µÄÔ­Ê¼³ÌÊ½Âë(ÄãÓ¦¸Ã¿ÉÒÔ´ÓÄãÈ¡µÃºËÐÄµÄµØ·½ÕÒµ½)£¬
È»áá±àÒëËü(Äã¿ÉÄÜ»áÏ£ÍûÔÚ¾É°æµÄºËÐÄÏÂÖ´ÐÐ±àÒë¼°°²×°)£®
Ëü»áÒÔ `{\ttfamily update}' ÎªÃû°²×°Ëü×Ô¼º²¢ÇÒÔÚÖØ¿ª»úÒÔáá£¬ÐÂºËÐÄÓ¦¸Ã»áÔË×÷Á¼ºÃ£®




\subsection{ÏµÍ³Ëµ undefined symbols ¶øÇÒÎÞ·¨±àÒë}

Äã¿ÉÄÜÓÐÒ» ELF ±àÒëÆ÷(gcc 2.6.3 »òÒÔááµÄ)¶øÇÒÊÇ 1.2.x (»ò¸üÔçµÄ)ºËÐÄÔ­Ê¼Âë£®
Ò»°ãÐÞÕýµÄ·½·¨ÊÇ½«Õâ¼¸ÐÐ¼Óµ½ {\ttfamily arch/i386/Makefile} µÄ¶¥¶Ë:

\begin{verbatim}
AS=/usr/i486-linuxaout/bin/as
LD=/usr/i486-linuxaout/bin/ld -m i386linux
CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include
\end{verbatim}


Õâ»áÒÔ a.out ³ÌÊ½¿âÀ´±àÒë 1.2.x ºËÐÄ£®




\subsection{ÎÞ·¨ÈÃÎÒµÄ IDE/ATAPI CD-ROM Õý³£¹¤×÷}

ºÜÆæ¹Ö£¬Ò»´ó¶ÑÈËÎÞ·¨ÈÃËûÃÇµÄ ATAPI ¹âµú»ú¹¤×÷£¬¿ÉÄÜÊÇÒòÎªÓÐÌ«¶àÊÂÈÝÒ×³ö´í£®

ÄãµÄ¹âµú»úÊÇÔÚÒ»ÌØ±ð IDE ½çÃæÉÏµÄÎ¨Ò»Éè±¸£¬Ëü±ØÐë±»µ÷ÕûÎª ``master'' »ò ``single''£®
Õâ¿ÉÄÜÊÇ×î³£¼ûµÄ´íÎó£®

Creative Labs ÏÖÔÚ½« IDE ½çÃæ·Åµ½ËûÃÇÒôÐ§¿¨Àï£®
È»¶ø£¬Õâ½«µ¼ÖÂÒ»¸öÓÐÈ¤µÄÎÊÌâ£¬ËäÈ»ÓÐÐ©ÈËÖ»ÓÐÒ»¸ö IDE ½çÃæ£¬Ðí¶àÈËÔÚÖ÷»ú°åÉÏÓÐÁ½¸öÄÚ½¨µÄ IDE ½çÃæ(Í¨³£ÔÚ IRQ15)£¬
Òò´ËÒ»½â¾öµÄ°ì·¨ÊÇ½«Éù°Ô¿¨µÄ½çÃæµ÷³ÉµÚÈý¸ö IDE (ÓÐÈË¸æËßÎÒÊÇ IRQ11)£®

ÕâÔÚ 1.2.x µÄ Linux ºËÐÄÉÏ»áÓÐÎÊÌâ£¬ÒòÎªËü²»Ö§Ô®µÚÈý¸ö IDE ½çÃæ(´Ó 1.3.x ÏµÁÐÒÑ¿ªÊ¼Ö§Ô®£¬µ«Ëü»¹ÔÚ·¢Õ¹ÖÐ£¬¶øÇÒ²»»á×Ô¶¯Õì²â)£®
Òª½â¾ö´ËÎÊÌâ£¬ÄãÓÐÒ»Ð©Ñ¡Ôñ£®

Èç¹ûÄãÒÑ¾­ÓÐµÚ¶þ¸ö IDE ²º£¬Èç¹ûÄãÃ»ÓÃËü»òÃ»ÓÐÁ½²¿Éè±¸ÔÚÉÏÃæµÄ»°¾ÍÓÐ»ú»á£®
½« ATAPI ¹âµú»ú´ÓÒôÐ§¿¨ÉÏÄÃÏÂÀ´²¢·Åµ½µÚ¶þ¸ö½çÃæÉÏ£®È»ááÄã¿ÉÒÔ¹ØµôÒôÐ§¿¨ÉÏµÄ½çÃæ£¬Õâ¾Í¿ÉÒÔÊ¡ÏÂÒ»¸ö IRQ£®

Èç¹ûÄãÃ»ÓÐµÚ¶þ¸ö IDE ½çÃæ£¬µ÷ÕûÒôÐ§¿¨µÄ½çÃæ(²»ÊÇÒôÐ§¿¨µÄÒôÐ§²¿·Ý)µ½µÚ¶þ½çÃæÓÃµÄ IRQ15£¬ÕâÑùÓ¦¸Ã»á¶¯£®

Èç¹ûÒòÎªÄ³Ð©ÀíÓÉ·ÇµÃÊ¹ÓÃ``µÚÈý¸ö''½çÃæ²»¿É£¬»òÊÇÓÐÆäËüÎÊÌâ£¬
È¡µÃ 1.3.x µÄºËÐÄ(ÀýÈç 1.3.57 ¾ÍÓÐ)£¬ÔÄ¶Á {\ttfamily drivers/block/README.ide} µµ°¸£®
ÄÇÀïÓÐ¸ü¶àµÄ×ÊÑ¶ËµÃ÷£®




\subsection{ÏµÍ³ÏÔÊ¾¹Øì¶ obsolete routing requests µÄÆæ¹ÖÑ¶Ï¢}

È¡µÃÐÂ°æµÄ {\ttfamily route} ³ÌÊ½¼°ÆäËüÓë route ÓÐ¹ØµÄ³ÌÊ½£®
{\ttfamily /usr/include/linux/route.h} (ÕâÊÇ {\ttfamily /usr/src/linux} ÏÂµÄÒ»¸öµµ°¸)ÒÑ¾­×öÁËÐÞ¸Ä£®




\subsection{·À»ðÇ½¹¦ÄÜÎÞ·¨ÔÚ 1.2.0 ÉÏ¹¤×÷}

ÖÁÉÙÉý¼¶µ½ 1.2.1 °æ£®




\subsection{``Not a compressed kernel Image file'' (·ÇÑ¹ËõºËÐÄÓ³Ïñµµ)}

²»ÒªÓÃÔÚ {\ttfamily /usr/src/linux} ²úÉúµÄ {\ttfamily vmlinux} ×öÎªÄãµÄÆô¶¯ºËÐÄÓ³Ïñ;
{\ttfamily [..]/arch/i386/boot/zImage} ²ÅÊÇÕýÈ·µÄ£®




\subsection{Éý¼¶ÖÁ 1.3.x ááÔÚ¿ØÖÆÌ¨ÖÕ¶Ë»úÉÏµÄÎÊÌâ}

½«¿ØÖÆÌ¨Éè¶¨µµ {\ttfamily /etc/termcap} ÖÐµÄ {\ttfamily dumb} ¸ÄÎª {\ttfamily linux}£®
Äã¿ÉÄÜ»á±ØÐëÔö¼ÓÒ»Ïî terminfo£®




\subsection{ºËÐÄÉý¼¶ááËÆºõÎÞ·¨±àÒë¶«Î÷}

Linux µÄºËÐÄÔ­Ê¼³ÌÊ½Âë°üº¬ÁËÐí¶àµÄº¬Èëµµ(¾ÍÊÇÓÃ {\ttfamily .h} ½áÎ²µÄµµ°¸)±ØÐëÎª±ê×¼µÄ {\ttfamily /usr/include} Ëù²Î¿¼£®
ËüÃÇÍ¨³£ÓÃÕâÖÖ·½·¨±»²Î¿¼(ÆäÖÐ {\ttfamily xyzzy.h} ÊÇÔÚ {\ttfamily /usr/include/linux} ÏÂ):
\begin{verbatim}
    #include <linux/xyzzy.h>
\end{verbatim}

Õý³£Çé¿öÏÂ£¬ÔÚ {\ttfamily /usr/include} ÏÂ»áÓÐÒ»½Ð×ö {\ttfamily linux} µÄÁ¬½áµ½ÄãµÄºËÐÄÔ­Ê¼ÂëµÄ {\ttfamily include/linux} Ä¿Â¼(Ò»°ãÏµÍ³ÔÚ {\ttfamily /usr/src/linux/include/linux})£®
Èç¹ûÕâ¸öÁ¬½áÃ»ÓÐÁË£¬»òÖ¸µ½´íÎóµÄµØ·½£¬´ó²¿·ÝµÄ¶«Î÷¶¼½«ÎÞ·¨±àÒë£®
Èç¹ûÄã¾õµÃºËÐÄÔ­Ê¼ÂëÕ¼ÁËÌ«¶àµÄ¿Õ¼ä¶ø¿³µôËü£¬ÕâÏÔÈ»»áÒý·¢ÎÊÌâ£®
ÁíÒ»¸ö¿ÉÄÜµÄ´íÎóÊÇËüµÄµµ°¸È¨ÏÞ; Èç¹ûÄãµÄ {\ttfamily root} Ô¤Éè²»ÈÃÆäËüÊ¹ÓÃÕß¿´µ½ËûµÄµµ°¸£¬
¶øÇÒÄã½â¿ªºËÐÄÔ­Ê¼ÂëÊ±Ã»ÓÐ¼ÓÉÏ {\ttfamily p} (±£Áôµµ°¸Ä£Ê½)Ñ¡Ïî£¬ÆäËüÊ¹ÓÃÕßÒ²»áÎÞ·¨Ê¹ÓÃ C ±àÒëÆ÷£®
ËäÈ»Äã¿ÉÒÔÓÃ {\ttfamily chmod} Ö¸ÁîÀ´ÐÞÕý£¬²»¹ý¸üÈÝÒ×µÄ·½·¨ÊÇÖØÐÂ½â¿ªº¬Èëµµ£®
Äã¿ÉÒÔÒ»¿ªÊ¼Äã½â¿ªÕû¸öÔ­Ê¼ÂëµÄÍ¬Ñù·½·¨£¬²»¹ý¶à¼ÓÁËÒ»¸ö²ÎÊý:
\begin{verbatim}
    blah# tar zxvpf linux.x.y.z.tar.gz linux/include
\end{verbatim}

Çë×¢Òâ: Èç¹û {\ttfamily /usr/src/linux} Á¬½á²»ÔÚµÄ»° ``{\ttfamily make config}'' »áÖØ½¨Ö®£®




\subsection{Ôö¼ÓÉÏÏÞ}

ÏÂÃæÒ»Ð©¡õÀýÖ¸Áî¸æËßÄãÈçºÎÔö¼ÓºËÐÄÌá¹©µÄÉÏÏÞ:
\begin{verbatim}
echo 4096 > /proc/sys/kernel/file-max
echo 12288 > /proc/sys/kernel/inode-max
echo 300 400 500 > /proc/sys/vm/freepages
\end{verbatim}





\section{Éý¼¶ÖÁ 2.0.x µÄ×¢ÒâÊÂÏî}

ºËÐÄ 2.0.x °æÔÚ°²×°ÉÏÒýÈëÁËÐí¶àµÄ¸Ä±ä£®
ÔÚÔ­Ê¼³ÌÊ½ÂëÀïµÄ {\ttfamily Documentation/Changes} µµ°¸°üº¬ÁËÉý¼¶ÖÁ 2.0.x °æËùÓ¦ÖªµÀµÄ×ÊÑ¶£®
Äã¿ÉÄÜ»¹ÐèÒªÉý¼¶Ò»Ð©¹Ø¼üµÄÌ×¼þ£¬ÀýÈç gcc£¬libc Óë SysVInit£¬²¢¸Ä±äÒ»Ð©ÏµÍ³µµ°¸£®²»¹ý£¬Ò²±ð½ôÕÅ£®




\section{¿ÉÔØÈëÄ£×é}

¿ÉÔØÈëÄ£×éÄÜ¹»½ÚÊ¡¼ÇÒäÌå£¬¶øÇÒºÜÈÝÒ×Éè¶¨£®
Ä£×éµÄ¡õÎ§ÒÑ¾­°üº¬ÁËµµ°¸ÏµÍ³£¬ÒÒÌ«ÍøÂ·¿¨Çý¶¯³ÌÊ½£¬´Å´ø»ú£¬Ó¡±í»úÇý¶¯³ÌÊ½£¬»¹ÓÐ¸ü¶à£®




\subsection{°²×°Ä£×é¹¤¾ß}

Ä£×é¹¤¾ß¿ÉÒÔ´ÓÄãÈ¡µÃºËÐÄµÄµØ·½ÕÒµ½£¬Èç {\ttfamily modules-x.y.z.tar.gz};
Ñ¡ÔñÓëÄãÄ¿Ç°ºËÐÄ°æ±¾ÏàµÈ»òÉÔµÍµÄ×î½Ó½üµÄ {\ttfamily x.y.z}£®
ÓÃ `{\ttfamily tar zxvf modules-x.y.z.tar.gz}' ½â¿ª£®
{\ttfamily cd} µ½Ëü²úÉúµÄÄ¿Â¼({\ttfamily modules-x.y.z})£¬¿´Ò»ÏÂ {\ttfamily README}£¬È»áá°´ÕÕ°²×°Ö¸Ê¾Ö´ÐÐ (Í¨³£ºÜ¼òµ¥£¬¾ÍÏñ {\ttfamily make install} Ö®ÀàµÄ)£®
È»ááÄãÔÚ {\ttfamily /sbin} Ó¦¸Ã»áÓÐÕâÐ©³ÌÊ½ {\ttfamily insmod}, {\ttfamily rmmod}, {\ttfamily ksyms}, {\ttfamily lsmod}, {\ttfamily genksyms}, {\ttfamily modprobe}, ÒÔ¼° {\ttfamily depmod}£®
Èç¹ûÄãÏëµÄ»°£¬¿ÉÒÔÓÃ {\ttfamily insmod} ÀïµÄ¡õÀýÇý¶¯³ÌÊ½``hw''À´²âÊÔÕâÐ©¹¤¾ß;
²Î¼û {\ttfamily INSTALL} µµÀïµÄÏ¸½ÚËµÃ÷£®

{\ttfamily insmod} Ö¸Áî½«Ò»¸öÄ£×é²åÈëÔËÐÐÖÐµÄºËÐÄ£®Ä£×éÍ¨»áÒÔ {\ttfamily .o} Îª½áÎ²;
ÉÏÃæÌáµ½µÄ¡õÀý³ÌÊ½¾Í½Ð×ö {\ttfamily drv\_hello.o}£¬Òò´ËÒª²åÈë´ËÄ£×é£¬¾ÍÓÃ `{\ttfamily insmod drv\_hello.o}'£®
ÒªÁË½âÄ¿Ç°ºËÐÄÕýÔÚÊ¹ÓÃµÄÄ£×é£¬ÓÃ {\ttfamily lsmod} Ö¸Áî£®Êä³ö¿´ÆðÀ´ÏñÕâÑù:
\begin{verbatim}
    blah# lsmod
    Module:        #pages:  Used by:
    drv_hello          1
\end{verbatim}

`{\ttfamily drv\_hello}' ÊÇÕâÄ£×éµÄÃû³Æ£¬ËüÓÃÁËÒ»Ò³ (4K) µÄ¼ÇÒäÌå£¬¶øÇÒÄ¿Ç°Ã»ÓÐÆäËüµÄºËÐÄÄ£×éÒÀÀµì¶Ëü£®
ÒªÒÆ³ý´ËÄ£×é£¬ÓÃ `{\ttfamily rmmod drv\_hello}'£®×¢Òâ {\ttfamily rmmod} ÐèÒªµÄÊÇ{\itshape Ä£×éÃû³Æ\/}£¬¶ø²»ÊÇµµ°¸Ãû³Æ; 
¾ÍÊÇÄã´Ó {\ttfamily lsmod} Ö¸ÁîÁÐ³öÀ´µÄ£®ÆäâÅ¹¤¾ßµÄ×÷ÓÃÔÚÏßÉÏÊÖ²áÖÐ¶¼ÓÐËµÃ÷£®




\subsection{ÓëºËÐÄ·¢ÐÐµÄÄ£×é}

ÔÚ 2.0.30 °æÖÐ£¬¼¸ºõËùÓÐµÄ¶«Î÷¶¼¿ÉÒÔ±ä³É¿ÉÔØÈëÄ£×é£®
ÒªÊ¹ÓÃ¿ÉÔØÈëÄ£×é£¬Ê×ÏÈÈ·¶¨ÄãÃ»ÓÐ½«ÆäÅäÖÃµ½Õý³£µÄºËÐÄÀï£¬Ò²¾ÍÊÇËµ£¬ÔÚ `{\ttfamily make config}' Ê±²»ÊÇ»Ø´ð {\ttfamily y}£®
±àÒëÐÂºËÐÄ²¢ÓÃËüÀ´¿ª»ú£®È»áá£¬ÔÙ´Î {\ttfamily cd} µ½ {\ttfamily /usr/src/linux}£¬È»ááÖ´ÐÐ `{\ttfamily make modules}'£®
Õâ½«±àÒëËùÓÐÄãÎ´Ö¸¶¨ÔÚºËÐÄÅäÖÃÀïµÄÄ£×é£¬²¢½«ÆäÁ¬½áµ½ {\ttfamily /usr/src/linux/modules}£®
Äã¿ÉÒÔÖ±½ÓÓÉ´ËÄ¿Â¼Ê¹ÓÃ£¬»òÊÇÖ´ÐÐ `{\ttfamily make modules\_install}' ½«Æä°²×°µ½ {\ttfamily /lib/modules/x.y.z}£¬ÆäÖÐ {\ttfamily x.y.z} ÊÇºËÐÄ°æ±¾£®

Õâ¶Ô´¦Àíµµ°¸ÏµÍ³ÉÏÌØ±ð±ãÀû£®Äã¿ÉÄÜ²¢²»¾­³£Ê¹ÓÃ minix »ò MS-DOS µÄµµ°¸ÏµÍ³£®
ÀýÈç£¬Èç¹ûÎÒÓöµ½Ò» MS-DOS µÄÈíµúÆ¬£¬ÎÒ»áÓÃ {\ttfamily insmod /usr/src/linux/modules/msdos.o}£¬²¢ÔÚÊ¹ÓÃÍê³ÉááÓÃ {\ttfamily rmmod msdos} Ö¸Áî½«ÆäÈ¥µô£®
´Ë¹ý³Ì´óÔ¼¿ÉÒÔ½ÚÊ¡ºËÐÄ 50K ×óÓÒµÄ¼ÇÒäÌå£®¶Ôì¶ minix µµ°¸ÏµÍ³ÓÐÒ»µãÒª×¢ÒâµÄ¾ÍÊÇ£¬
ÎªÁËÒªÊ¹ÓÃ``¼±¾È´ÅÆ¬''£¬ÄãÓ¦¸Ã{\itshape ×ÜÊÇ\/}Ö±½Ó½«ËüÅäÖÃµ½ºËÐÄÖÐ£®




\section{ÆäËüÅäÖÃÑ¡Ïî\label{other-options}}

±¾½Ú°üÀ¨ÁËÔÚÅäÖÃÒ»½ÚÖÐÎ´ÁÐ³öµÄºËÐÄÅäÖÃÑ¡Ïî(ÔÚ {\ttfamily make config} Ê±)£®
´ó²¿·ÝµÄÉè±¸Çý¶¯³ÌÊ½²¢Î´ÁÐ³ö£®




\subsection{General setup (Ò»°ãÉè¶¨)}

{\ttfamily Normal floppy disk support} (Ò»°ãÈíµúÖ§Ô®) - ¾ÍÊÇÕâ¸ö£®
Äã¿ÉÄÜ»áÏë¿´Ò»ÏÂ {\ttfamily drivers/block/README.fd} Õâ¸öµµ°¸; ¶Ô IBM Thinkpad µÄÊ¹ÓÃÕßÀ´ËµÌØ±ðÖØÒª£®



{\ttfamily XT harddisk support} (XT Ó²µúÖ§Ô®) - Èç¹ûÄãÏëÓÃÀÏ¹Å¶­µÄ°ËÎ»Ôª XT ¿ØÖÆÆ÷µÄ»°£®



{\ttfamily PCI bios support} (PCI bios µÄÖ§Ô®) - Èç¹ûÄãÓÐ PCI£¬Äã¿ÉÄÜ»áÏë´ò¿ª´ËÑ¡Ïî£®
µ«ÒªÐ¡ÐÄ£¬Ä³Ð©¾ÉµÄ PCI Ö÷»ú°åÔÚ´ËÑ¡ÏîÏÂ¿ÉÄÜ»áµ±µô£®¸ü¶à¹Øì¶ PCI »ãÁ÷ÅÅÔÚ Linux ÏÂÊ¹ÓÃµÄ×ÊÑ¶¿ÉÒÔÔÚ \onlynameurl{PCI-HOWTO} ÀïÕÒµ½£®



{\ttfamily Kernel support for ELF binaries} (ºËÐÄÖ§Ô® ELF Ö´ÐÐµµ) - ELF ÊÇÒ»ÖÖÐÂµÄ¶þ½øÎ»Ö´ÐÐµµ£®
Linux ËÆºõÕý³¯´Ë·½ÏòÇ°½ø£¬ËùÒÔÄã¿ÉÄÜ»áÒªÕâ¸ö£®



{\ttfamily Set version information on all symbols for modules} - 
ÔÚ¹ýÈ¥£¬ºËÐÄÄ£×éÓëÃ¿¸öÐÂºËÐÄÒ»Æð±»±àÒë£®
Èç¹ûÄã»Ø´ð {\ttfamily y}£¬Ëü¿ÉÄÜÈÃÄãÊ¹ÓÃ²»Í¬ patchlevel ÏÂ±àÒëµÄÄ£×é£®
²Î¼û {\ttfamily README.modules} ÖÐµÄÏêÏ¸ËµÃ÷£®




\subsection{Networking options (ÍøÂ·Ñ¡Ïî)}

ÍøÂ·Ñ¡ÏîÔÚ \onlynameurl{NET-3-HOWTO} (»òÊÇ NET-Ê²÷á-HOWTO)ÖÐÃèÊö£®




\section{¡õ¾÷ºÍ¼¼ÇÉ}






\subsection{ÖØµ¼ make »òÊÇ patch Ö¸ÁîµÄÊä³ö}

Èç¹ûÄãÏëÒª¼ÇÂ¼ÕâÐ© `{\ttfamily make}' »òÊÇ `{\ttfamily patch}' Ö¸Áîµ½µ××öÁËÐ©Ê²÷á£¬
Äã¿ÉÒÔ°ÑÓ©Ä»µÄÊä³öÖØµ¼µ½Ò»¸öµµ°¸È¥£®Ê×ÏÈ£¬ÒªÖªµÀÄãÓÃµÄÊÇÊÇÄÇÒ»ÖÖ shell£º
`{\ttfamily grep root /etc/passwd}' È»ááÑ°ÕÒ¿´ÆðÀ´Ïñ `{\ttfamily /bin/csh}' Ò»ÀàµÄ¶«Î÷£®

Èç¹ûÄãÊ¹ÓÃµÄÊÇ sh »òÊÇ bash£¬
\begin{verbatim}
    (command) 2>&1 | tee (output file)
\end{verbatim}

½«»á°ÑÒ»·Ý {\ttfamily (command)} µÄÊä³ö·Åµ½ `{\ttfamily (output file)}' Õâ¸öµµ°¸È¥£®

Èç¹ûÊÇ csh »ò tcsh£¬ÓÃ
\begin{verbatim}
    (command) |& tee (output file)
\end{verbatim}

Õâ¸öÓï·¨£®

Èç¹ûÊÇ rc (×¢Òâ£ºÄãÓ¦¸Ã²»»áÊÇÓÃ rc)£¬Óï·¨ÊÇ
\begin{verbatim}
    (command) >[2=1] | tee (output file)
\end{verbatim}





\subsection{Ìõ¼þÊ½µÄºËÐÄ°²×°}

³ýÁËÊ¹ÓÃÈíµúÆ¬£¬»¹ÓÐÊýÖÖÔÚ²»¶¯¾ÉºËÐÄµÄÇé¿öÏÂ²âÊÔÐÂºËÐÄµÄ·½·¨£®
²»ÏñÆäËüµÄ Unix ÏµÍ³£¬LILO ¾ßÓÐ´ÓÈÎºÎµØ·½Æô¶¯ºËÐÄµÄÄÜÁ¦£®
(²»¹ýÈç¹ûÄãÓÐ´óµÄÓ²µú£¬³¬¹ý 500 MB µÄ£¬Çë²Î¿¼ LILO µÄÎÄ¼þËµÃ÷½«¿ÉÄÜÒýÆðµÄÎÊÌâ£®)
Òò´Ë£¬Èç¹ûÄãÔÚ LILO ÅäÖÃµµ°¸ÖÐÓÃÏñÕâÑùµÄ
\begin{verbatim}
    image = /usr/src/linux/arch/i386/boot/zImage
        label = new_kernel
\end{verbatim}

Äã¿ÉÒÔÔÚ²»¶¯¾ÉºËÐÄ {\ttfamily /vmlinuz} µÄÇé¿öÏÂÑ¡ÔñÖ´ÐÐÐÂ±àÒëµÄºËÐÄ(µ±È»£¬ÔÚÖ´ÐÐÍê {\ttfamily lilo} áá)£®
½Ð LILO Æô¶¯ÐÂºËÐÄ×î¼òµ¥µÄ·½·¨¾ÍÊÇÔÚÆô¶¯Ê±°´ÏÂ shift ¼ü(µ±ÄãÔÚÓ©Ä»Ö»¿´µ½ {\ttfamily LILO} Ê±)£¬
Õâ»á¸øÄãÒ»ÌáÊ¾·ûºÅ£®´ËÊ±Äã¿ÉÒÔ¼üÈë `{\ttfamily new\_kernel}' À´Æô¶¯ÐÂºËÐÄ£®

Èç¹ûÄãÏëÔÚÏµÍ³ÖÐÍ¬Ê±±£ÓÐÊýÖÖ²»Í¬µÄºËÐÄÔ­Ê¼³ÌÊ½Âë(Ð¡ÐÄ£¬Õâ»áÓÃµô{\itshape ´óÁ¿\/}µÄÓ²µú¿Õ¼ä)£¬
×îÆÕÍ¨µÄ·½·¨¾ÍÊÇ½«ÆäÃüÃûÎª {\ttfamily /usr/src/linux-x.y.z}£¬ÆäÖÐ {\ttfamily x.y.z} ÊÇºËÐÄ°æ±¾£®
È»ááÄã¿ÉÒÔÓÃ·ûºÅÁ¬½áÀ´``Ñ¡Ôñ''Ò»·ÝÔ­Ê¼Âë; ÀýÈç£¬ÓÃ `{\ttfamily ln -sf linux-1.2.2 /usr/src/linux}' »áÈÃ 1.2.2 ³ÉÎªÄ¿Ç°µÄºËÐÄÊ÷£®
µ«ÔÚ½¨Á¢·ûºÅÁ¬½áÖ®Ç°£¬ÏÈÈ·¶¨ {\ttfamily ln} Ö¸Áî×îááÒ»¸ö²ÎÊý²»ÊÇÒ»¸öÕæÕýµÄÄ¿Â¼(¾ÉµÄ·ûºÅÁ¬½áÃ»ÓÐ¹ØÏµ);
·ñÔò½á¹û¿ÉÄÜ²»»áÊÇÄãËùÔ¤ÆÚµÄ£®




\subsection{ºËÐÄ¸üÐÂ}

Russell Nelson ({\ttfamily \onlynameurl{nelson@crynwr.com}}) ×Ü½áÁËÐÂ°æºËÐÄµÄ¸Ä±ä£®
ÕâÐ©ÊÇ¼ò¶ÌµÄ£¬¶øÇÒÄãÔÚÉý¼¶Ç°¿ÉÄÜÓ¦¸ÃÏÈ¿´Ò»ÏÂ£®¿ÉÒÔ´ÓÄäÃû FTP Õ¾ {\ttfamily ftp.emlist.com} µÄ {\ttfamily \onlynameurl{pub/kchanges}}£¬




\section{ÆäËü¿ÉÄÜÏà¹ØÓÐÓÃµÄ HOWTOs}

\begin{itemize}
\item  Sound-HOWTO: ÒôÐ§¿¨Óë¹¤¾ß
\item  SCSI-HOWTO: ËùÓÐ¹Øì¶ SCSI ¿ØÖÆ¿¨ÓëÉè±¸µÄ×ÊÑ¶
\item  NET-2-HOWTO: ÍøÂ·
\item  PPP-HOWTO: ÌØ±ð¹Øì¶ PPP ÍøÂ·µÄ
\item  PCMCIA-HOWTO: ±Ê¼ÇÐÍµçÄÔµÄÇý¶¯³ÌÊ½
\item  ELF-HOWTO: Ê²÷áÊÇ ELF£¬ÈçºÎ×ª»»µÈ¡­
\item  Hardware-HOWTO: Ö§Ô®Ó²ÌåµÄ¸ÅÒª
\item  Module-HOWTO: ¸ü¶àÓëºËÐÄÄ£×éÓÐ¹ØµÄ
\item  Kerneld mini-HOWTO: ¹Øì¶ kerneld
\item  BogoMips mini-HOWTO: Äã¿ÉÄÜ»áÓÐÐËÈ¤µÄ
\end{itemize}





\section{ÔÓÏî}






\subsection{×÷Õß}

Linux Kernel-HOWTO µÄ×÷Õß¼°Î¬»¤ÈËÊÇ Brian Ward ({\ttfamily \onlynameurl{bri@blah.math.tu-graz.ac.at}})£®
Çë½«ÈÎºÎÆÀÂÛ£¬²¹³äÓë¸üÕý¼Ä¸øÎÒ(¸üÕý¶ÔÎÒÀ´ËµÊÇÌØ±ðÖØÒªµÄ)£®



Äã¿ÉÒÔ´ÓÕâÐ© URL ÕÒµ½ÎÒµÄÍøÒ³:
\begin{tscreen}
{\ttfamily \onlynameurl{http://www.math.psu.edu/ward/}\\ 
\onlynameurl{http://blah.math.tu-graz.ac.at/\~{}bri/}}
\end{tscreen}


ËäÈ»ÎÒ¾¡¿ÉÄÜµØÈ¥´¦Àíµç×ÓÓÊ¼þ£¬µ«Çë¼Ç×¡ÎÒÃ¿Ìì¶¼ÊÕµ½{\itshape ´óÁ¿\/}µÄÐÅ¼þ£¬ËùÒÔ¿ÉÄÜÒª»¨Ò»µãÊ±¼ä²Å»á»Ø¸²Äã£®
ÌØ±ðÊÇ¼ÄÐÅÀ´ÎÊÎÒÎÊÌâµÄ£¬Çë¾¡Á¿·Ç³£Çå³þÓëÏê¾¡µØÃèÊöÄãµÄÑ¶Ï¢£®
Èç¹ûÄãËµµÄÊÇÄ³¸öÎÞ·¨ÔË×÷µÄÓ²Ìå(»òÀàËÆµÄ)£¬ÎÒÐèÒªÖªµÀÄãµÄÓ²ÌåÅäÖÃÊÇÊ²÷á£®
Èç¹ûÄãÒª»Ø±¨´íÎó£¬²»ÒªÖ»ÊÇËµ``ÎÒÕâÑùÊÔµ«Ëü¸øÎÒ»á´íÎóÑ¶Ï¢''; ÎÒÐèÒªÖªµÀÕâ¸ö´íÎóÑ¶Ï¢ÊÇÊ²÷á£®
ÎÒ¿ÉÄÜÒ²ÏëÖªµÀÄãµÄºËÐÄ£¬gcc£¬libc µÄ°æ±¾ÊÇÊ²÷á£¬Èç¹ûÄãÖ»ÊÇ¸æËßÎÒÄãÓÃµÄÊÇÕâ¸ö»òÄÇ¸öÌ×¼þ£¬ÄÇÃ»Ê²÷áÓÃ£®
ÎÒ²»½éÒâÄãÎÊÎÒ¼òµ¥µÄÎÊÌâ; Çë¼Ç×¡£¬Èç¹ûÄã²»ÎÊ£¬Äã½«ÓÀÔ¶²»»áµÃµ½½â´ð£®
ÎÒÒª¸ÐÐ»Ã¿¸ö¸øÎÒ»ØÀ¡µÄÈËÃÇ£®

Èç¹ûÄãÐ´ÐÅ¸øÎÒµ«ÔÚÒ»¶ÎºÏÀíµÄÊ±¼äÄÚÃ»ÓÐµÃµ½»ØÓ¦(ÈýÐÇÆÚ»ò¸ü¾Ã)£¬ÄÇ÷á¿ÉÄÜÎÒ²»Ð¡ÐÄ¿³µôÁËÄãµÄÐÅ¼þ»òÖîÈç´ËÀàµÄ(±§Ç¸)£®
ÇëÔÙÊÔÒ»´Î£®

ÎÒÊÕµ½Ðí¶àÐÅ¼þÊÇ¹Øì¶Ó²ÌåÎÊÌâµÄ£®ÕâÃ»ÎÊÌâ£¬µ«ÇëÁË½âÎÒ²¢²»ÊÇÊìÏ¤ÊÀ½çÉÏËùÓÐÓ²ÌåµÄÈË¶øÇÒÎÒÒ²²»ÖªµÀÎÒÄÜ°ï¶àÉÙÃ¦£®
ÎÒ¸öÈËÊ¹ÓÃµÄ»úÆ÷ÓÐ IDE Óë SCSI Ó²µú£¬SCSI ¹âµú»ú£¬3Com Óë WD µÄÒÒÌ«ÍøÂ·¿¨£¬´®ÁÐ»¬Êó£¬
PCI Ö÷»ú°å£¬NCR 810 SCSI ¿ØÖÆÆ÷£¬AMD 386DX40 w/Cyrix ¸¨Öú´¦ÀíÆ÷£¬AMD 5x86£¬AMD 486DX4 Óë Intel 486DX4 ´¦ÀíÆ÷
(ÕâÖ»ÊÇÎÒÔÚÊ¹ÓÃ¶øÇÒÊìÏ¤µÄÓ²ÌåÕªÒª£¬²¢²»ÊÇ½¨Òé£¬µ«Èç¹ûÄãÏëÒªÓÃ£¬»¶Ó­À´Ñ¯ÎÊ {\ttfamily :-) })£®

0.1 °æÍê³Éì¶ 1994 ÄêÊ®ÔÂÈýÈÕ£®±¾ÎÄ¼þ¿ÉÒÔ SGML, PostScript, TeX, roff Óë´¿ÎÄ×Ö¸ñÊ½È¡µÃ£®




\subsection{Ô¤¶¨Ä¿±ê}

``¡õ¾÷ºÍ¼¼ÇÉ'' Ò»½ÚÌ«ÉÙÁË£®ÎÒÏ£ÍûÄÜÓÃ´Ó±ðÈËµÃµ½µÄ½¨ÒéÀ´À©³ä£®

``¸½¼ÓµÄÌ×¼þ'' Ò»½ÚÒ²ÊÇ£®

»¹ÐèÒª¸ü¶àµÄÕì´í/µ±»ú»Ø¸´×ÊÑ¶£®




\subsection{¹±Ï×Õß}

°üº¬ÁËÒ»Ð¡²¿·Ý Linus µÄ README µµ°¸ (kernel hacking Ñ¡Ïî)£®¸ÐÐ» Linus!

{\ttfamily uc@brian.lunetix.de} (Ulrich Callmeier): patch -s and xargs.

{\ttfamily quinlan@yggdrasil.com} (Daniel Quinlan): corrections and
additions in many sections.

{\ttfamily nat@nat@nataa.fr.eu.org} (Nat Makarevitch): mrproper, tar -p, many
other things

{\ttfamily boldt@math.ucsb.edu} (Axel Boldt): collected descriptions of
kernel configuration options on the net; then provided me with the list

{\ttfamily lembark@wrkhors.psyber.com} (Steve Lembark): multiple boot
suggestion

{\ttfamily kbriggs@earwax.pd.uwa.edu.au} (Keith Briggs): some corrections and
suggestions

{\ttfamily rmcguire@freenet.columbus.oh.us} (Ryan McGuire): makeables
additions

{\ttfamily dumas@excalibur.ibp.fr} (Eric Dumas): French translation

{\ttfamily simazaki@ab11.yamanashi.ac.jp} (Yasutada Shimazaki): Japanese translation

{\ttfamily jjamor@lml.ls.fi.upm.es} (Juan Jose Amor Iglesias): Spanish translation

{\ttfamily mva@sbbs.se} (Martin Wahlen): Swedish translation

{\ttfamily jzp1218@stud.u-szeged.hu} (Zoltan Vamosi): Hungarian translation

{\ttfamily bart@mat.uni.torun.pl} (Bartosz Maruszewski): Polish translation

{\ttfamily donahue@tiber.nist.gov} (Michael J Donahue): typos, winner of the
``sliced bread competition''

{\ttfamily rms@gnu.ai.mit.edu} (Richard Stallman):
``free'' documentation concept/distribution notice

{\ttfamily dak@Pool.Informatik.RWTH-Aachen.DE} (David Kastrup): NFS thing

{\ttfamily esr@snark.thyrsus.com} (Eric Raymond): various tidbits



Ôø¼ÄÐÅ¸øÎÒÎÊÎÊÌâµÄÈËÒ²ÓÐºÜ´ó°ïÖú£®






\subsection{°æÈ¨ÉùÃ÷£¬Ðí¿É£¬ÖîÈç´ËÀàµÄ}

Copyright \copyright{} Brian Ward, 1994-1997.

Permission is granted to make and distribute copies of this manual provided
the copyright notice and this permission notice are preserved on all
copies.



Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the derived
work is distributed under the terms of a permission notice identical to
this one. Translations fall under the catagory of ``modified versions.''



Warranty: None.



Recommendations:
Commercial redistribution is allowed and encouraged; however, it is
strongly recommended that the redistributor contact the author before the
redistribution, in the interest of keeping things up-to-date (you could
send me a copy of the thing you're making while you're at it). Translators
are also advised to contact the author before translating. The printed
version looks nicer. Recycle.





\end{document}
