\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{The Loopback Root Filesystem HOWTO}
\author{×÷Õß: Andrew M. Bishop, {\ttfamily \onlynameurl{amb@gedanken.demon.co.uk}}\\ 
ÒëÕß: Jing-Jong SHYUE, {\ttfamily \onlynameurl{shyue@sonoma.com.tw}}}
\date{v1.1, 24 September 1999}
\abstract{Õâ·ÝÎÄ¼þ½âÊÍÈçºÎÊ¹ÓÃ Linux µÄÈÆ»ØÉè±¸À´½¨Á¢ Linux µÄÔ­Éúµµ°¸ÏµÍ³, Ê¹µÃ Linux ¿ÉÒÔ°²×°ÔÚ DOS ·Ö¸îÇøÖÐ, ²¢Ê¹ÓÃ Linux Ô­Éúµµ°¸ÏµÍ³.
Í¬Ê±Ò²ÌÖÂÛ´ËÖÖ¼¼ÇÉµÄÆäËûÓÃÍ¾.}


\begin{document}
\maketitle
\tableofcontents

\section{¼ò½é}






\subsection{°æÈ¨ÉùÃ÷(´Ë¶Î²»Òë)}

The Loopback Root Filesystem HOWTO
Copyright (C) 1998,99  Andrew M. Bishop (amb@gedanken.demon.co.uk).

This documentation is free documentation; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

The GNU General Public License is available from \onlynameurl{http://www.fsf.org/}
or, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA




\subsection{°æ±¾ÑÝ±ä(´Ë¶Î²»Òë)}

\begin{description}
\item[Version 1.0.0] \mbox{}

Initial Version (June 1998)

\item[Version 1.0.1-1.0.3] \mbox{}

Slight Modifications, kernel version changes, typos etc. (1998 - July 1999)

\item[Version 1.1] \mbox{}

Added Copyright Information and Re-Submitted (September 1999)

\end{description}





\section{ÈÆ»ØÉè±¸Óë¼ÇÒäÌå´ÅµúµÄÔ­Àí}

Ê×ÏÈÎÒ½«½éÉÜÓÃÔÚ½«ÈÆ»Øµµ°¸ÏµÍ³Éè³É¸ùÄ¿Â¼ÏµÍ³ËùÐèÒªµÄ»ù±¾ÖªÊ¶.






\subsection{ÈÆ»ØÉè±¸}

{\bfseries ÈÆ»ØÉè±¸} ÊÇ Linux ÖÐµÄÒ»ÖÖÐéÄâÉè±¸, ÓÃ·¨ÀàËÆì¶ÆäËû´¢´æÃ½ÌåÉè±¸.



ÀýÈç {\ttfamily /dev/hda1}, {\ttfamily /dev/hda2}, {\ttfamily /dev/sda1} »òÆäËû´Åµú, ÀýÈçÈíµú»ú {\ttfamily /dev/fd0} µÈµÈ, ¶¼Êôì¶´¢´æÉè±¸.
ÕâÐ©Éè±¸¶¼¿ÉÒÔÓÃÀ´´¢´æµµ°¸»òÊÇÄ¿Â¼½á¹¹.
Ò²¶¼¿ÉÒÔÒÀ¾ÝÊ¹ÓÃÐèÇó¶ø±»¸ñÊ½»¯³É¸÷ÖÖ²»Í¬µÄµµ°¸ÏµÍ³(ÀýÈç ext2fs, msdos, ntfs µÈ), ²¢ÇÒ±»¹ÒÔØì¶Ä¿Â¼Ê÷ÖÐ.



ÈÆ»Øµµ°¸ÏµÍ³ÒÀ´æì¶Ò»¸ö´¢´æÔÚ±ðµÄµµ°¸ÏµÍ³ÖÐµÄµµ°¸, ²¢½«Õâ¸öµµ°¸µ±×÷ÊÇÒ»¸öÖÜ±ßÉè±¸À´²Ù×÷.
Õâ¸öÐéÄâµÄÉè±¸ÈçÍ¬Ç°ÃæËùÁÐµÄÕæÊµÉè±¸Ò»Ñù, ¿ÉÒÔ±»¸ñÊ½»¯»ò¹ÒÔØì¶Ä¿Â¼Ê÷ÖÐ.
ÈÆ»Øµµ°¸ÏµÍ³µÄÉè±¸µµÍ¨³£ÊÇ {\ttfamily /dev/loop0} »òÊÇ {\ttfamily /dev/loop1} µÈµÈ, ÕâÐ©Éè±¸ÔÙ±»Ö¸ÏòËùÒÀ´æµÄµµ°¸, Èç´ËÕâ¸öµµ°¸±ãÄÜ±»ÊÓÎªÐéÄâÉè±¸¶ø±»¹ÒÔØ.






\subsection{¼ÇÒäÌå´ÅµúÉè±¸}

ÔÚ Linux ÖÐ»¹ÓÐÒ»ÖÖ¿ÉÒÔ±»µ±³Éµµ°¸ÏµÍ³²Ù×÷µÄÐéÄâÉè±¸, Ò²¾ÍÊÇ{\bfseries ¼ÇÒäÌå´ÅµúÉè±¸}.



ÔÚÕâ¸ö×´¿öÖÐ, Õâ¸öÉè±¸½öÖ¸Ïò²¿·ÖµÄÊµÌå¼ÇÒäÌå, ²¢²»²Î¿¼ÆäËûÓ²ÌåÉè±¸.
ÕâÐ©¼ÇÒäÌå¾ø²»»á±»ÖÃ»»µ½Ó²µúÖÐ, µ«»áÁô´æì¶´Åµú¿ìÈ¡ÖÐ.



¼ÇÒäÌå´Åµú¿ÉÒÔÔÚÈÎÒâÊ±¼ä¾­ÓÉÐ´Èë¼ÇÒäÌå´ÅµúÉè±¸µµ {\ttfamily /dev/ram0} »ò {\ttfamily /dev/ram1} µÈµÈ, ¶ø±»²úÉú.
¼ÇÒäÌå´ÅµúÍ¬Ñù¿ÉÒÔ±»¸ñÊ½»¯»ò¹ÒÔØì¶Ä¿Â¼Ê÷ÖÐ, ¾ÍÏñÈÆ»ØÉè±¸Ò»Ñù.



¼ÇÒäÌå´ÅµúÍ¨³£±»ÓÃì¶ÓÉÈíµúÆô¶¯ÏµÍ³µÄÊ±»ú, ÀýÈç Linux µÄ°²×°´Åµú»òÊÇ¾ÈÔ®´Åµú.
¿ª»úËùÐèÒªµÄ³ÌÊ½Í¨³£±»´æÔÚÒ»¸ö´ÅµúÓ³ÏñµµÖÐ, ¶øÕâ¸öÓ³ÏñµµÍ¨³£±»Ñ¹Ëõáá´æÔÚÈíµúÖÐ.
ÏµÍ³ºËÐÄ½«¿ÉÒÔÈÏÖªÕâ¸öµµ°¸, ²¢ÇÒÔÚ¿ª»ú³ÌÐòÖÐ±»½â¿ªáá·ÅÖÃì¶¼ÇÒäÌå´ÅµúÖÐ, ÔÙ±»¹ÒÔØ³É¿ª»úËùÐèµÄµµ°¸ÏµÍ³.






\subsection{ÆðÊ¼¼ÇÒäÌå´Åµú}

ÔÚÎÒÃÇÄÜ½«ÈÆ»ØÉè±¸µ±³É¸ùÄ¿Â¼ÏµÍ³Ö®Ç°, {\bfseries ÆðÊ¼¼ÇÒäÌå´Åµú}ÊÇÒ»¸ö·Ç³£ÖØÒªµÄ»úÖÆ.



ÒòÎª¼ÇÒäÌå´ÅµúÐèÒª¸´ÖÆÒ»¸öµµ°¸ÏµÍ³µÄÓ³Ïñµµµ½¼ÇÒäÌåÖÐ, ËùÒÔÕâ¸öÓ³Ïñµµ±ØÐëÊÇ¿ÉÒÔ±»´æÈ¡µÄ.
µ±¼ÇÒäÌå´ÅµúµÄ¹¤×÷Íê³ÉÒªÕýÊ½½«ÕæÊµµÄ¸ùÄ¿Â¼ÏµÍ³¹ÒÔØÖ®Ç°, ÔÚÕâ¸ö¼ÇÒäÌå´ÅµúÖÐµÄ {\ttfamily /linuxrc} »á±»Ö´ÐÐ.
¶øÈç¹û {\ttfamily /dev/initrd} ´æÔÚÇÒ¿ÉÓÃµÄ»°, ¼ÇÒäÌå´ÅµúÔò»á±»¹ÒÔØÔÚ {\ttfamily /initrd}Ö®ÏÂ.



¶Ôì¶Ò»¸öÕý³£µÄ¿ª»ú³ÌÐò¶øÑÔ, ÕâÊÇÒ»¸öÏàµ±ÌØÊâµÄÌØÐÔ, ÒòÎªÆðÊ¼¼ÇÒäÌå´ÅµúÈÔ¼ÌÐøÖ´ÐÐ.
¶øÇÒÔÚÖ÷Òª¿ª»ú³ÌÐò¿ªÊ¼Ö®Ç°, ¿ÉÒÔ¾­ÓÉÆðÊ¼¼ÇÒäÌå´ÅµúµÄ²ÎÊýÀ´±ä¸ü¸ùÄ¿Â¼´Åµú.






\subsection{¸ùÄ¿Â¼µµ°¸ÏµÍ³}

¸ùÄ¿Â¼´ÅµúÊÇµÚÒ»¸ö±»¹ÒÔØµÄ×°ÖÃ, ËùÒÔÔÚ¿ª»úáá»á³ÉÎª¸ùÄ¿Â¼ "{\ttfamily /}".



ÓÉì¶¸ùÄ¿Â¼°üº¬ÁËËùÓÐµÄµµ°¸, ËùÒÔ»áÓÐÒ»Ð©¸´ÔÓ.
ÔÚ¿ª»ú¹ý³ÌÖÐ {\ttfamily rc} ÃüÁî¸å»á±»Ö´ÐÐ, ÕâÐ©ÃüÁî¸å¿ÉÄÜÊÇ {\ttfamily /etc/rc.d} »ò {\ttfamily /etc/rc?.d}, ¶ËÊÓ {\ttfamily /etc/init} ³ÌÐòµÄÉè¼Æ.



ÔÚÏµÍ³Æô¶¯áá, ¸ùÄ¿Â¼µµ°¸ÏµÍ³ÊÇ²»¿ÉÄÜ±»Ð¶ÔØµÄ, ÒòÎªËùÓÐµÄ³ÌÊ½±ØÐëÊ¹ÓÃÏàÍ¬µÄ×ÊÑ¶.
ÕâÒ²¾ÍÊÇÎªÊ²÷áÆðÊ¼¼ÇÒäÌå´ÅµúÊÇÈç´ËµÄÖØÒª, ÒòÎªÖ»ÓÐÕâÊ±µÄ¸ùÄ¿Â¼ÏµÍ³ÊÇ²»Í¬µÄ.






\subsection{Linux ¿ª»ú³ÌÐò}

ÎªÁËÁË½âÔÚ¿ª»ú¹ý³ÌÖÐÆðÊ¼¼ÇÒäÌå´ÅµúµÄ¶¯×÷, ÏÂÁÐÊÇ¿ª»úµÄ¹ý³Ì.



\begin{enumerate}
\item ºËÐÄ±»ÔØÈë¼ÇÒäÌå, Í¨³£ÊÇÓÉ {\ttfamily LILO} »ò {\ttfamily LOADLIN} Íê³ÉµÄ.
Äã¿ÉÒÔ¿´µ½ {\ttfamily Loading...} Ñ¶Ï¢, ±íÊ¾ÕýÔÚÔØÈëºËÐÄ.
\item ÆðÊ¼¼ÇÒäÌå´Åµú±»ÔØÈë, Í¨³£Ò²ÊÇÓÉ {\ttfamily LILO} »ò {\ttfamily LOADLIN} Íê³ÉµÄ.
Äã»áÔÙ´ÎµÄ¿´µ½ {\ttfamily Loading...} Ñ¶Ï¢, ±íÊ¾ÕýÔÚÔØÈë³õÊ¼¼ÇÒäÌå´Åµú.
\item ºËÐÄ±»³õÊ¼»¯, ËùÓÐ¸øºËÐÄµÄ²ÎÊý¶¼»á±»Éè¶¨; Í¬Ê±³õÊ¼¼ÇÒäÌå´Åµú±»¹ÒÔØÎª¸ùÄ¿Â¼.
\item Ö´ÐÐÔÚ³õÊ¼¼ÇÒäÌå´ÅµúÉÏµÄ {\ttfamily /linuxrc} ³ÌÊ½.
\item ºËÐÄ²ÎÊýËùÖ¸¶¨µÄµµ°¸ÏµÍ³±»¹ÒÔØÎª¸ùÄ¿Â¼.
\item Ö´ÐÐ {\ttfamily /etc/init} ÒÔÍê³ÉÊ¹ÓÃÕßËùÉè¶¨µÄ¿ª»ú³ÌÐò.
\end{enumerate}


ÕâÖ»ÊÇÒ»¸ö¼ò»¯µÄËµÃ÷, µ«×ã¹»½âÊÍºËÐÄµÄÆô¶¯Óë³õÊ¼¼ÇÒäÌå´ÅµúµÄÓÃÍ¾.






\section{ÈçºÎ½¨Á¢ÈÆ»Ø¸ùÄ¿Â¼Éè±¸}

ÏÂÃæ½«½éÉÜÈçºÎ½¨Á¢ÈÆ»ØÉè±¸






\subsection{ÐèÇó}

Òª½¨Á¢Ò»¸öÈÆ»Ø¸ùÄ¿Â¼Éè±¸±ØÐëÒªÓÐÏÂÁÐÊÂÏî.



\begin{itemize}
\item Ò»¸ö¿ÉÒÔÔË×÷µÄ Linux ÏµÍ³
\item ±ØÐëÄÜ¹»¸´ÖÆÒ»¸ö´óµµ°¸µ½ DOS ·Ö¸îÇøÖÐ
\end{itemize}


×îÖØÒªµÄÊÇ±ØÐëÄÜ´æÈ¡Ò»¸ö°²×°ºÃ¿ÉÔË×÷µÄ Linux ÏµÍ³.
ÕâÊÇÒòÎªÈÆ»ØÉè±¸Ö»ÄÜÔÚ Linux ÏÂ½¨Á¢.
Ò²¾ÍÊÇËµÄã²»¿ÉÄÜ´ÓÎÞÖÐÉúÓÐ.
¶øÇÒÄã±ØÐëÒªÄÜÔÚÕâ¸öÏµÍ³ÉÏ±àÒëºËÐÄ.



µ±ÈÆ»ØÉè±¸½¨Á¢Ö®áá, Õâ½«ÊÇÒ»¸öºÜ´óµÄµµ°¸.
ÎÒÊ¹ÓÃÁËÒ»¸ö 80 MB µÄµµ°¸, Èç´ËÎÒ²ÅÄÜ½¨Á¢Ò»¸ö X ÖÕ¶Ë»ú; µ«Èç¹ûÄãÏ£ÍûÄÜ×ö¸ü¶àÊÂ, Õâ¿ÉÄÜÒ²²»¹».
Õâ¸öµµ°¸±ØÐë±»¸´ÖÆµ½ DOS ·Ö¸îÇøÖÐ, ËùÒÔÍøÂ·»òÊÇÒ»¶ÑÈíµúÊÇ±ØÐëµÄ.



ÄãËùÐèÒªµÄÈíÌå°üÀ¨:

\begin{itemize}
\item {\ttfamily LOADLIN} 1.6°æÒÔÉÏ
\item ÈÎºÎÒ»¸öÖ§Ô®ÈÆ»ØÉè±¸µÄ {\ttfamily mount} ³ÌÊ½
\item Ö§Ô®ËùÐèÑ¡ÏîµÄºËÐÄ
\end{itemize}


¶ÔÏÖÔÚµÄ Linux ¶øÑÔ, Ó¦¸Ã¶¼ÄÜ·ûºÏÒÔÉÏÐèÇó.






\subsection{½¨Á¢ Linux ºËÐÄ}

ÎÒÊÇÓÃ 2.0.31 °æµÄºËÐÄÀ´Ê¹ÓÃÈÆ»Ø×°ÖÃ, ÆäËû°æ±¾µÄºËÐÄÓ¦¸ÃÒ²¿ÉÒÔÓÃ.
µ«ËûÃÇÖÁÉÙ±ØÐëÒªÓÐÒÔÏÂµÄ¹¦ÄÜ.



Äã±ØÐë½«ºËÐÄµÄÁÐ¹¦ÄÜÆô¶¯
\begin{itemize}
\item ¼ÇÒäÌå´ÅµúÖ§Ô® ({\ttfamily CONFIG\_BLK\_DEV\_RAM}).
\item ³õÊ¼»¯¼ÇÒäÌå (initrd) Ö§Ô® ({\ttfamily CONFIG\_BLK\_DEV\_INITRD}).
\item ÈÆ»Ø×°ÖÃÖ§Ô® ({\ttfamily CONFIG\_BLK\_DEV\_LOOP}).
\item fat µµ°¸ÏµÍ³Ö§Ô® ({\ttfamily CONFIG\_FAT\_FS}).
\item msdos µµ°¸ÏµÍ³Ö§Ô® ({\ttfamily CONFIG\_MSDOS\_FS}).
\end{itemize}


Ç°Ãæ¶þ¸öÊÇÓÃÀ´Ê¹ÓÃ¼ÇÒäÌå´Åµú×°ÖÃÓë³õÊ¼»¯¼ÇÒäÌå´Åµú×°ÖÃ.
µÚÈý¸öÊÇÈÆ»Øµµ°¸ÏµÍ³µÄÖ§Ô®,
×îáá¶þ¸öÔòÊÇÓÃÀ´¹ÒÔØ DOS ·Ö¸îÇøËù±ØÐëµÄÖ§Ô®.



±àÒëºËÐÄÇÒ²»Ê¹ÓÃÄ£×éÖ§Ô®ÊÇ×î¼òµ¥µÄÑ¡Ôñ. µ«Èç¹ûÄãÏ£ÍûÊ¹ÓÃÄ£×é»¯Ö§Ô®Ó¦¸ÃÒ²ÊÇ¿ÉÒÔ, ËäÈ»ÎÒÃ»ÓÐÊÔ¹ý.
Èç¹ûÄãÊ¹ÓÃÄ£×é»¯Ö§Ô®, Äã±ØÐëÈ·¶¨ÉÏÁÐµÄÑ¡ÏîÊÇÖ±½Ó±àÒëÔÚºËÐÄÄÚ¶ø²»ÊÇ±àÒë³ÉÄ£×é.



ÒÀ¾ÝºËÐÄ°æ±¾µÄ²»Í¬, Äã¿ÉÄÜÐèÒªÊ¹ÓÃÒ»Ð©ÐÞ²¹.
ÏÂÃæÊÇÒ»Ð©¼òµ¥µÄÐÞ²¹ÓÃÀ´ÈÃºËÐÄ¿ÉÒÔ½«ÈÆ»Ø×°ÖÃ×÷Îª¸ùÄ¿Â¼µµ°¸ÏµÍ³Ê¹ÓÃ.
\begin{itemize}
\item 2.0.0 °æÖ®Ç°µÄºËÐÄ: ÎÒÃ»ÓÐÏà¹Ø×ÊÑ¶.
\item 2.0.0 µ½ 2.0.34 Ö®¼äµÄºËÐÄ°æ±¾: Äã±ØÐëÊ¹ÓÃÏÂÁÐ¸ø 2.0.x °æµÄºËÐÄÐÞ²¹.
\item 2.0.35 µ½ 2.0.x Ö®¼äµÄºËÐÄ²»ÐèÒªÐÞ²¹.
\item 2.1.x °æµÄºËÐÄ±ØÐëÒÀ¾ÝÄúµÄÈ·Êµ°æ±¾¶øÊ¹ÓÃÏÂÁÐ¸ø 2.0.x »ò 2.2.x °æµÄºËÐÄÐÞ²¹.
\item 2.2.0 µ½ 2.2.10 Ö®¼äµÄºËÐÄ°æ±¾: Äã±ØÐëÊ¹ÓÃÏÂÁÐ¸ø 2.2.x °æµÄºËÐÄÐÞ²¹.
\item 2.3.x °æµÄºËÐÄ: Äã±ØÐëÊ¹ÓÃÏÂÁÐ¸ø 2.2.x °æµÄºËÐÄÐÞ²¹.
\end{itemize}




¶Ôì¶ 2.0.x °æµÄºËÐÄ, ±ØÐë½« {\ttfamily "loop", 0x0700} ÕâÒ»ÐÐ¼Óµ½ {\ttfamily /init/main.c} µÄÔ­Ê¼ÂëÖÐ¶ø³ÉÎªÏÂÃæµÄÑù×Ó.



\begin{tscreen}
\begin{verbatim}
static void parse_root_dev(char * line)
{
        int base = 0;
        static struct dev_name_struct {
                const char *name;
                const int num;
        } devices[] = {
                { "nfs",     0x00ff },
                { "loop",    0x0700 },
                { "hda",     0x0300 },

...

                { "sonycd",  0x1800 },
                { NULL, 0 }
        };

...

}
\end{verbatim}
\end{tscreen}




¶Ôì¶ 2.2.x °æµÄºËÐÄ, ±ØÐë½« {\ttfamily "loop", 0x0700} ÓëÇ°áá¸÷Ò»ÐÐ(¹²ÈýÐÐ)¼Óµ½ {\ttfamily /init/main.c} µÄÔ­Ê¼ÂëÖÐ¶ø³ÉÎªÏÂÃæµÄÑù×Ó



\begin{tscreen}
\begin{verbatim}
static struct dev_name_struct {
        const char *name;
        const int num;
} root_dev_names[] __initdata = {
#ifdef CONFIG_ROOT_NFS
        { "nfs",     0x00ff },
#endif
#ifdef CONFIG_BLK_DEV_LOOP
        { "loop",    0x0700 },
#endif
#ifdef CONFIG_BLK_DEV_IDE
        { "hda",     0x0300 },

...

        { "ddv", DDV_MAJOR << 8},
#endif
        { NULL, 0 }
};
\end{verbatim}
\end{tscreen}


µ±ºËÐÄ×éÌ¬ÉèºÃáá, Ëû±ØÐë±»±àÒë³É {\ttfamily zImage} µµ ({\ttfamily make zImage}).
±àÒëºÃµÄµµ°¸»á±»·ÅÔÚ {\ttfamily arch/i386/boot/zImage}.






\subsection{½¨Á¢³õÊ¼»¯¼ÇÒäÌå´Åµú×°ÖÃ}

½¨Á¢³õÊ¼»¯¼ÇÒäÌå´Åµú×î¼òµ¥µÄ·½Ê½ÊÇ½«Ëüµ±³ÉÈÆ»Ø×°ÖÃ¹ÒÔØ.
Äã±ØÐëÊ¹ÓÃ root µÄÈ¨ÏÞÀ´×öÕâ¼þÊÂ.
½¨Á¢³ÌÐòÈçÏÂËùÊ¾, ÕâÐ©Ö¸ÁîÊÇÔÚ root µÄ¼ÒÄ¿Â¼ ({\ttfamily /root}) ÖÐÖ´ÐÐµÄ.



\begin{tscreen}
\begin{verbatim}
mkdir /root/initrd
dd if=/dev/zero of=initrd.img bs=1k count=1024
mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img
mount initrd.img /root/initrd -t ext2 -o loop
cd initrd
[½¨Á¢±ØÐëµÄµµ°¸]
cd ..
umount /root/initrd
gzip -c -9 initrd.img > initrdgz.img
\end{verbatim}
\end{tscreen}


ÕâÐ©Ö¸ÁîµÄ×÷ÓÃÈçÏÂËùÊö.
\begin{enumerate}
\item ½¨Á¢Ò»¸ö¸ø³õÊ¼»¯¼ÇÒäÌåÊ¹ÓÃµÄ¹ÒÔØµã (Ò»¸ö¿ÕÄ¿Â¼).
\item ½¨Á¢Ò»¸öÖ¸¶¨´óÐ¡µÄ¿Õµµ°¸, ´Ë´¦ÎÒ½¨Á¢Ò»¸ö 1024kB µÄµµ°¸, Äã±ØÐëÒÀ¾ÝÄãËùÒª·ÅÖÃµµ°¸µÄÁ¿À´¾ö¶¨Õâ¸öµµ°¸µÄ´óÐ¡. (µµ°¸´óÐ¡ÊÇ×îááÒ»¸ö²ÎÊý)
\item ½«Õâ¸öµµ°¸¸ñÊ½»¯³É ext2 µµ°¸ÏµÍ³.
\item ½«Õâ¸öµµ°¸ÒÔÈÆ»ØµÄ·½Ê½¹ÒÔØµ¹¹ÒÔØµãÉÏ.
\item ÇÐ»»Ä¿Â¼µ½ÈÆ»ØÉè±¸µÄ¹ÒÔØµãÖÐ.
\item ½¨Á¢±ØÐëµÄµµ°¸ (Ï¸½Ú½«ÔÚááÃæÌÖÂÛ).
\item Àë¿ªÈÆ»Øµµ°¸Ëù¹ÒÔØµÄÄ¿Â¼.
\item ½«ÈÆ»ØÉè±¸Ð¶ÔØ.
\item ½¨Á¢Ò»¸öÑ¹ËõµÄ°æ±¾ÒÔ¹©ááÐøÊ¹ÓÃ.
\end{enumerate}


{\bfseries ³õÊ¼»¯¼ÇÒäÌå´ÅµúµÄÄÚÈÝ}

Äã±ØÐëÖÁÉÙÓÐÏÂÁÐµÄµµ°¸·ÅÖÃì¶³õÊ¼»¯¼ÇÒäÌå´ÅµúÖÐ, ·ñÔò½«²»ÄÜÊ¹ÓÃÈÎºÎÖ¸Áî.

\begin{itemize}
\item {\ttfamily /linuxrc} ¹ÒÔØ DOS µµ°¸ÏµÍ³µÄÖ¸Áî¸å. (ÈçÏÂËùÊ¾)
\item {\ttfamily /lib/*} ³ÌÊ½ËùÐèÒªµÄ¶¯Ì¬Á¬½áÆ÷Óëº¯Ê½¿â.
\item {\ttfamily /etc/*} ¶¯Ì¬Á¬½áËùÐèµÄ¿ìÈ¡, ËäÈ»¾²Ì¬Á¬½á³ÌÊ½²»ÐèÒª, µ«¿ÉÒÔ±ÜÃâ¾¯¸æÑ¶Ï¢.
\item {\ttfamily /bin/*} Ê¹ÓÃÕßÃüÁî½âÒëÆ÷ (´Ë´¦ÎÒÊ¹ÓÃ {\ttfamily ash}, ÒòÎªËü±È {\ttfamily bash} Ð¡).
¶ø {\ttfamily mount} Óë {\ttfamily losetup} ³ÌÊ½ÊÇÓÃì¶¹ÒÔØ DOS ´ÅµúÓëÉè¶¨ÈÆ»Ø×°ÖÃ.
\item {\ttfamily /dev/*} ±ØÐëµÄ×°ÖÃ¿ØÖÆµµ, ÄãÖÁÉÙÐèÒª {\ttfamily /dev/zero} ÒÔ¹© {\ttfamily ld-linux.so} Ê¹ÓÃ, {\ttfamily /dev/hda*} ÒÔ¹ÒÔØ DOS ´Åµú, ÒÔ¼° {\ttfamily /dev/loop*} ÒÔ¹ÒÔØÈÆ»Ø×°ÖÃ.
\item {\ttfamily /mnt} Ò»¸ö¿ÕµÄ¹ÒÔØµã, ÒÔ¹© DOS ´Åµú¹ÒÔØ.
\end{itemize}


ÏÂÃæÊÇÎÒËùÓÃµÄÆðÊ¼»¯¼ÇÒäÌå´ÅµúÖ®ÄÚÈÝ, ËùÐè¿Õ¼äÔ¼ 800 kB.



\begin{tscreen}
\begin{verbatim}
total 18
drwxr-xr-x   2 root     root         1024 Jun  2 13:57 bin
drwxr-xr-x   2 root     root         1024 Jun  2 13:47 dev
drwxr-xr-x   2 root     root         1024 May 20 07:43 etc
drwxr-xr-x   2 root     root         1024 May 27 07:57 lib
-rwxr-xr-x   1 root     root          964 Jun  3 08:47 linuxrc
drwxr-xr-x   2 root     root        12288 May 27 08:08 lost+found
drwxr-xr-x   2 root     root         1024 Jun  2 14:16 mnt

./bin:
total 168
-rwxr-xr-x   1 root     root        60880 May 27 07:56 ash
-rwxr-xr-x   1 root     root         5484 May 27 07:56 losetup
-rwsr-xr-x   1 root     root        28216 May 27 07:56 mount
lrwxrwxrwx   1 root     root            3 May 27 08:08 sh -> ash

./dev:
total 0
brw-r--r--   1 root     root       3,   0 May 20 07:43 hda
brw-r--r--   1 root     root       3,   1 May 20 07:43 hda1
brw-r--r--   1 root     root       3,   2 Jun  2 13:46 hda2
brw-r--r--   1 root     root       3,   3 Jun  2 13:46 hda3
brw-r--r--   1 root     root       7,   0 May 20 07:43 loop0
brw-r--r--   1 root     root       7,   1 Jun  2 13:47 loop1
crw-r--r--   1 root     root       1,   3 May 20 07:42 null
crw-r--r--   1 root     root       5,   0 May 20 07:43 tty
crw-r--r--   1 root     root       4,   1 May 20 07:43 tty1
crw-r--r--   1 root     root       1,   5 May 20 07:42 zero

./etc:
total 3
-rw-r--r--   1 root     root         2539 May 20 07:43 ld.so.cache

./lib:
total 649
lrwxrwxrwx   1 root     root           18 May 27 08:08 ld-linux.so.1 -> ld-linux.so.1.7.14
-rwxr-xr-x   1 root     root        21367 May 20 07:44 ld-linux.so.1.7.14
lrwxrwxrwx   1 root     root           14 May 27 08:08 libc.so.5 -> libc.so.5.3.12
-rwxr-xr-x   1 root     root       583795 May 20 07:44 libc.so.5.3.12

./lost+found:
total 0

./mnt:
total 0
\end{verbatim}
\end{tscreen}


±È½Ï¸´ÔÓµÄ²½ÖèÊÇ½¨Á¢ {\ttfamily dev} Ä¿Â¼ÏÂÃæµÄ×°ÖÃ¿ØÖÆµµ.
Äã¿ÉÒÔÓÃ {\ttfamily /dev} ÏÂÃæÏÖÓÐµÄ×°ÖÃ¿ØÖÆµµÎª¡õ±¾, ²¢ÒÔ {\ttfamily mknod} ³ÌÊ½À´½¨Á¢ËûÃÇ.



{\bfseries /linuxrc Ö¸Áîµµ}

ÆðÊ¼»¯¼ÇÒä´ÅµúÖÐµÄ {\ttfamily /linuxrc} Ö¸Áî¸åÊÇÓÃÀ´Íê³É¹ÒÔØÈÆ»Ø×°ÖÃËùÐèµÄÇ°ÖÃ×¼±¸.

ÏÂÃæµÄ¡õÀýÊÇÒÔ {\ttfamily /dev/hda1} Îª DOS ·Ö¸îÇø, ²¢ÔÚ³É¹¦¹ÒÔØ DOS ·Ö¸îÇøáá, ½«{\ttfamily /linux/linuxdsk.img} Éè¶¨Îª {\ttfamily /dev/loop0} ;²¢½« {\ttfamily /linux/linuxswp.img} Éè¶¨Îª {\ttfamily /dev/loop1}.



\begin{tscreen}
\begin{verbatim}
#!/bin/sh

echo INITRD: Trying to mount /dev/hda1 as msdos

if /bin/mount -n -t msdos /dev/hda1 /mnt; then

   echo INITRD: Mounted OK
   /bin/losetup /dev/loop0 /mnt/linux/linuxdsk.img
   /bin/losetup /dev/loop1 /mnt/linux/linuxswp.img
   exit 0

else

   echo INITRD: Mount failed
   exit 1

fi
\end{verbatim}
\end{tscreen}


Ç°ÃæµÄ {\ttfamily /dev/loop0} ×°ÖÃ½«±»¹ÒÔØÎª¸ùÄ¿Â¼, ááÃæµÄ {\ttfamily /dev/loop1} Ôò½«±»×÷Îª¼ÇÒäÌåÖÃ»»ÇøÊ¹ÓÃ.



Èç¹ûÄãÏ£Íû root ÒÔÍâµÄÊ¹ÓÃÕßÒ²ÄÜÐ´Èë DOS ·Ö¿ÅÇø, Äã±ØÐë¸Ä³ÉÊ¹ÓÃ {\ttfamily mount -n -t msdos /dev/hda1 /mnt -o uid=0,gid=0,umask=000,quiet}.
Õâ»á½«ËùÓÐ¶Ô DOS ·Ö¸îÇøµÄ´æÈ¡¶ÔÓ¦³É root, ²¢ÇÒÊÊµ±µÄÉè¶¨È¨ÏÞ.






\subsection{½¨Á¢¸ùÄ¿Â¼×°ÖÃ}

ÄãËùÊ¹ÓÃµÄ¸ùÄ¿Â¼×°ÖÃ½«ÊÇ {\ttfamily linuxdsk.img} Õâ¸öµµ°¸.
Äã¿ÉÒÔÓÃÓë½¨Á¢ÆðÊ¼¼ÇÒäÌå´ÅµúÏàÍ¬µÄ·½·¨½¨Á¢Õâ¸öµµ°¸, Ëù²»Í¬´¦½öÔÚì¶±ØÐë½Ï´ó, ×ãÒÔÈÝÄÉÄãÒª°²×°µÄ³ÌÊ½.



×î¼òµ¥µÄ°ì·¨ÊÇ½«ÏÖÓÐµÄ Linux ÏµÍ³¸´ÖÆµ½Õâ¸öµµ°¸ÏµÍ³ÖÐ.
µ±È»ÄãÒ²¿ÉÒÔÖØÐÂ°²×°Ò»Ì×ÐÂµÄ Linux ÏµÍ³.



¼ÙÉèÄãÒÑ¾­×ö¹ýÕâÐ©ÊÂ, ÄãÖ»Òª×÷Ò»Ð©Ð¡¸Ä±ä.



{\ttfamily /etc/fstab} µµ°¸±ØÐë½«¸ùÄ¿Â¼´ÅµúÓëÖÃ»»Çø¶ÔÓ¦µ½ÄãÔÚÆôÊ¾¼ÇÒäÌå´ÅµúÖÐµÄÈÆ»ØÉè±¸.



\begin{tscreen}
\begin{verbatim}
/dev/loop0     /      ext2   defaults 1 1
/dev/loop1     swap   swap   defaults 1 1
\end{verbatim}
\end{tscreen}


Õâ½«È·±£ºËÐÄ»áÊ¹ÓÃÕýÈ·µÄ¸ùÄ¿Â¼×°ÖÃ.
Ò²¿ÉÒÔÓÃÏàÍ¬µÄ·½·¨¼ÓÈëÖÃ»»´Åµú.
ÄãÒ²±ØÐëÒÆ³ýÆäËû¸ùÄ¿Â¼´ÅµúÓëÖÃ»»ÇøµÄ¶ÔÓ¦.



Èç¹ûÄãÏ£ÍûÔÚ Linux Æô¶¯ááÄÜ¹»¶ÁÈ¡ DOS ·Ö¸îÇø, Äã±ØÐë×÷ÏÂÃæÕâÐ©¶îÍâµÄÐ¡ÐÞ¸Ä.



½¨Á¢½Ð×ö {\ttfamily /initrd} µÄÄ¿Â¼, ÕâÊÇÔÙÈÆ»Ø¸ùÄ¿Â¼ÏµÍ³¹ÒÔØáá, ³õÊ¼¼ÇÒäÌå´Åµú¹ÒÔØµÄµØ·½.

½¨Á¢Ò»¸ö·ûºÅÁ¬½Ó {\ttfamily /DOS} Ö¸Ïò {\ttfamily /initrd/mnt}, Ò²¾ÍÊÇ DOS ·Ö¸îÇø±»¹ÒÔØµÄµØ·½.

ÔÚ rc µµÖÐ¼ÓÈëÀàËÆ {\ttfamily mount -f -t msdos /dev/hda1 /initrd/mnt} µÄÖ¸Áî, ÒÔ½¨Á¢Ò»¸ö "¼ÙµÄ" ¹ÒÔØ, Èç´ËÀýÈç {\ttfamily df} µÈ³ÌÊ½²Å»áÖªµÀÕâ¸ö¹ÒÔØ.
Èç¹ûÄãÔÚ {\ttfamily /linuxrc} ÖÐÓÃ²»Í¬µÄÉè¶¨, Çë×ÔÐÐÐÞÕýÒÔ·ûºÏÉè¶¨.



ÓÉì¶ºËÐÄÔÚÖ®Ç°±ã»á±»ÔØÈë, ËùÒÔÄã²»ÐèÒªÔÚ¸ùÄ¿Â¼×°ÖÃÖÐ·ÅÖÃÏµÍ³ºËÐÄ.
µ«Èç¹ûÄãÊ¹ÓÃÁËºËÐÄµÄÄ£×é, ÄãÈÔÈ»±ØÐë½«ÕâÐ©Ä£×é·ÅÔÚ¸ùÄ¿Â¼×°ÖÃÖÐ.






\subsection{½¨Á¢ÖÃ»»×°ÖÃ}

ÄãËùÊ¹ÓÃµÄÖÃ»»×°ÖÃ½«ÊÇ {\ttfamily linuxswap.img}.
Õâ¸öÖÃ»»×°ÖÃÏàµ±ÈÝÒ×½¨Á¢.
Ê×ÏÈÈçÍ¬Ö®Ç°µÄ×ö·¨½¨Á¢Ò»¸ö¿Õµµ°¸, È»ááÖ´ÐÐ {\ttfamily mkswap linuxswap.img} À´¸ñÊ½»¯Õâ¸öÖÃ»»µµ.



ÖÃ»»¿Õ¼äµÄ´óÐ¡ÒÀ¾Ý¸öÈËµÄÊ¹ÓÃ¶ø²»Í¬, µ«ÎÒ½¨Òé½«ËüÉèÎª´óì¶ 8MB, µ«Ð¡ì¶ÊµÌå¼ÇÒäÌåÁ¿.






\subsection{½¨Á¢ MSDOS Ä¿Â¼}

ÄãËùÒªÊ¹ÓÃµÄµµ°¸±ØÐë±»°áÒÆµ½ DOS ·Ö¸îÇøÖÐ.



±ØÐë±»·ÅÔÚ {\ttfamily C:$\backslash$LINUX} Ä¿Â¼ÏÂµÄµµ°¸°üÀ¨

\begin{itemize}
\item {\ttfamily LINUXDSK.IMG} ×÷Îª¸ùÄ¿Â¼×°ÖÃµÄÓ°Ïñµµ.
\item {\ttfamily LINUXSWP.IMG} ÖÃ»»×°ÖÃ.
\end{itemize}





\subsection{½¨Á¢¿ª»úÈíµú}

¿ª»úÈíµúµÄÖÆ×÷Óë±ê×¼ DOS ¿ª»úÈíµúÏàÍ¬.

ÔÚ DOS ÏÂÊ¹ÓÃ {\ttfamily format a: /s} ÒÔ½¨Á¢¿ª»úÈíµú.



ÔÚÕâÕÅÈíµúÉÏ, Äã±ØÐë½¨Á¢Ò»¸ö {\ttfamily AUTOEXEC.BAT} µµ, ÈçÏÂËùÊ¾.
²¢ÇÒ¸´ÖÆ Linux ÏµÍ³ºËÐÄÓëÑ¹Ëõ¹ýµÄÆðÊ¼¼ÇÒäÌå´Åµúµµ°¸, ÒÔ¼° {\ttfamily LOADLIN} Ö´ÐÐµµ.

\begin{itemize}
\item {\ttfamily AUTOEXEC.BAT} - DOS ÏÂµÄ¿ª»ú×Ô¶¯Ö´ÐÐÅú´Îµµ.
\item {\ttfamily LOADLIN.EXE} - {\ttfamily LOADLIN} Ö´ÐÐµµ.
\item {\ttfamily ZIMAGE} - Linux ÏµÍ³ºËÐÄ.
\item {\ttfamily INITRDGZ.IMG} - Ñ¹Ëõ¹ýµÄÆðÊ¼¼ÇÒäÌå´Åµúµµ.
\end{itemize}


{\ttfamily AUTOEXEC.BAT} ½öÐèÒªÏÂÃæÕâÐÐ.

\begin{tscreen}
\begin{verbatim}
\loadlin \zImage initrd=\initrdgz.img root=/dev/loop0 ro
\end{verbatim}
\end{tscreen}


Õâ»áÖ¸¶¨ÒªÓÃµÄÏµÍ³ºËÐÄÓëÆðÊ¼»¯¼ÇÒäÌå´ÅµúµµÒÔ¼°¸ùÄ¿Â¼´ÅµúµÄÎ»ÖÃ, ²¢½«¸ùÄ¿Â¼ÒÔÎ¨¶ÁµÄ·½Ê½¹ÒÔØ.




\section{Æô¶¯ÏµÍ³}

ÒªÓÃÕâ¸ö¸ùÄ¿Â¼×°ÖÃÆô¶¯±ØÐë½«Ç°ÃæËù×öµÄ¿ª»úÈíµú·Åì¶ PC ÖÐ, ²¢ÓÉÕâ¸öÈíµú¿ª»ú.



Äã½«»á¿´µ½ÏÂÁÐµÄ³ÌÐò
\begin{enumerate}
\item DOS Æô¶¯
\item AUTOEXEC.BAT Ö´ÐÐ
\item LOADLIN Ö´ÐÐ
\item Linux ºËÐÄ±»¸´ÖÆµ½¼ÇÒäÌåÖÐ
\item ÆðÊ¼¼ÇÒäÌå´Åµú±»¸´ÖÆµ½¼ÇÒäÌåÖÐ
\item Linux ºËÐÄ¿ªÊ¼Ö´ÐÐ
\item ÔÚÆðÊ¼¼ÇÒäÌå´ÅµúÖÐµÄ {\ttfamily /linuxrc} ÃüÁî¸å±»Ö´ÐÐ
\item DOS ·Ö¸îÇø±»¹ÒÔØ, ÇÒ¸ùÄ¿Â¼×°ÖÃÓëÖÃ»»×°ÖÃ±»Éè¶¨
\item ÓÉÈÆ»Ø×°ÖÃÍê³É¿ª»ú³ÌÐò
\end{enumerate}


¿ª»úÍê³Éáá, Äã¿ÉÒÔÈ¡³ö¿ª»úÈíµú²¢Ê¹ÓÃÕâ¸ö Linux ÏµÍ³.




\subsection{¿ÉÄÜ·¢ÉúµÄÎÊÌâÓë½â¾ö·½Ê½}

¿ª»ú³ÌÐò¿ÉÄÜÔÚÐí¶à¹Ø¿¨ÉÏÊ§°Ü, ÎÒ½«ÊÔÖø½âÊÍËûÃÇÓë¸ÃÈçºÎ¼ì²é.



DOS µÄÆô¶¯ºÜÈÝÒ×±æ±ð, ËûÓ¦¸Ã»áÏÔÊ¾ {\ttfamily MS-DOS Starting ...}.
Èç¹ûÃ»ÓÐÏÔÊ¾, ÔòÕâ¸öÈíµú¿ÉÄÜÊÇ²»¿É¿ª»úµÄ, »òµçÄÔ²»ÊÇÓÉÕâÌ¨Èíµú»ú¿ª»ú.



µ± {\ttfamily AUTOEXEC.BAT} ±»Ö´ÐÐµÄÊ±ºò, ËùÓÐ±»Ö´ÐÐµÄÖ¸ÁîÔ¤Éè»áÏÔÊ¾ÔÚÓ©Ä»ÉÏ.
ÔÚ´Ë´¦Ó¦¸ÃÖ»ÓÐÒ»ÐÐ, ²¢ÒÔ {\ttfamily LOADLIN} ¿ªÍ·.



µ± {\ttfamily LOADLIN} Ö´ÐÐÊ±, Ó¦¸ÃÓÐ¶þÑùºÜÈÝÒ×¿´µÄµÄÊÂÇé·¢Éú.
Ê×ÏÈÊÇËû»á½«ºËÐÄÔØÈë¼ÇÒäÌåÖÐ.
½ÓÖø»á½«ÆðÊ¼¼ÇÒäÌå´ÅµúÔØÈë¼ÇÒäÌå.
Õâ¶þ¸ö¶¼¿ÉÒÔÓÉ {\ttfamily Loading...} Ñ¶Ï¢È·ÈÏ.



ºËÐÄ½«×Ô¼º½âÑ¹Ëõ, ¶øÇÒµ±ºËÐÄµµ°¸Ëð»µÊ±, ½«ÏÔÊ¾ {\bfseries crc} ´íÎó.
µ±ºËÐÄ¿ªÊ¼Ö´ÐÐÊ±, »áÏÔÊ¾Ò»¶Ñ³õÊ¼»¯³ÌÐòÓë¼ì²éÑ¶Ï¢.
³õÊ¼¼ÇÒäÌå´ÅµúµÄÔØÈëÒ²»áÔÚ´Ë½×¶ÎÏÔÊ¾.



µ± {\ttfamily /linuxrc} ¿ªÊ¼Ö´ÐÐÊ±, ²»»áÓÐ¿É¹©Õï¶ÏµÄÑ¶Ï¢²úÉú, µ«Äã¿ÉÒÔ×Ô¼º¼ÓÈë¸¨ÖúÑ¶Ï¢À´¼ì²é.
ÔÚÕâ¸ö³ÌÐòÖÐ, Èç¹ûÔÚ½«ÈÆ»Ø×°ÖÃµ±³É¸ùÄ¿Â¼×°ÖÃÊ±Ê§°ÜµÄ»°, Äã½«»áµÃµ½ "Ã»ÓÐ¸ùÄ¿Â¼×°ÖÃ" µÄÑ¶Ï¢, ÇÒºËÐÄ»á·ÅÆúÖ´ÐÐ.



½ÓÏÂÀ´¶¨ÒåÔÚ¸ùÄ¿Â¼×°ÖÃÖÐµÄÕý³£¿ª»ú³ÌÐò»á±»Æô¶¯.
ÄãÓÐ¿ÉÄÜµÃµ½¸ùÄ¿Â¼±»¹ÒÔØ³É¿É¶ÁÐ´µÄ¾¯¸æ, µ«ÔÚ {\ttfamily LOADLIN} Ö¸ÁîÖÐµÄ '{\ttfamily ro}' ¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ.
µ±¿ª»ú³ÌÐòÅª²»ÇåÄÄ¸öÊÇ¸ùÄ¿Â¼×°ÖÃÊ±, »á²úÉúÒ»Ð©ÎÊÌâ, Õâ¸öÎÊÌâ¶à°ëÀ´×Ô {\ttfamily /etc/fstab} ÖÐµÄ´íÎó.



µ±¿ª»ú³ÌÐòÍê³Éáá, Ê£ÏÂµÄÎÊÌâÊÇ³ÌÊ½¸ã²»Çå³þ DOS ·Ö¸îÇø±»¹ÒÔØÔÚºÎ´¦.
ÕâÒ²ÊÇÎªºÎÒªÖ´ÐÐÒ»¸ö"¼Ù"µÄ¹ÒÔØÖ¸Áî, Õâ½«Ê¹Äã½ÏÈÝÒ×´æÈ¡ DOS ·Ö¸îÇø.






\subsection{²Î¿¼ÎÄ¼þ}

ÔÚÎÒ½¨Á¢µÚÒ»¸öÈë»Ø¸ùÄ¿Â¼µµ°¸ÏµÍ³Ê±, ÎÒ²Î¿¼ÁËÏÂÁÐÎÄ¼þ:



\begin{itemize}
\item Linux ºËÐÄÔ­Ê¼Âë, ÌØ±ðÊÇ {\ttfamily init/main.c}
\item Linux ºËÐÄËµÃ÷ÎÄ¼þ, ÌØ±ðÊÇ {\ttfamily Documentation/initrd.txt} ÒÔ¼° {\ttfamily Documentation/ramdisk.txt}.
\item {\ttfamily LILO} ËµÃ÷ÎÄ¼þ.
\item {\ttfamily LOADLIN} ËµÃ÷ÎÄ¼þ.
\end{itemize}







\section{ÆäËûÈÆ»Ø¸ùÄ¿Â¼×°ÖÃµÄ¿ÉÄÜÓÃÍ¾}

µ±ÓÉ DOS ·Ö¸îÇøÆô¶¯ Linux µÄ·½·¨È·Á¢Ö®áá, ÎÒÃÇ½«¿ÉÒÔÓÃÔÚÏÂÃæµÄÓÃÍ¾ÉÏ.






\subsection{½« Linux °²×°ÔÚ½öÓÐ DOS ·Ö¸îÇøµÄÓ²µúÉÏ}

¼ÈÈ»¿ÉÒÔÀûÓÃÈíµúÓë´æÔÚ DOS ´ÅµúÖÐµÄÒ»¸öµµ°¸À´Æô¶¯ Linux ÏµÍ³, ÄÇÒ²¿ÉÒÔÍêÈ«Ê¹ÓÃ DOS ´ÅµúÀ´Æô¶¯ÏµÍ³.

Ò»¸öÉè¶¨ºÃµÄ¿ª»úÑ¡µ¥¿ÉÒÔÓÃÀ´´Ó {\ttfamily AUTOEXEC.BAT} ÖÐÆô¶¯ {\ttfamily LOADLIN}, ÕâÄÜÊ¹¿ª»úËÙ¶È½Ï¿ì, µ«È´»áÓëÆäËû²¿·ÖÏà¹Ø.






\subsection{ÀûÓÃ LILO Æô¶¯}

Ê¹ÓÃ {\ttfamily LOADLIN} Ö»ÊÇÆäÖÐÒ»ÖÖÆô¶¯ Linux ºËÐÄµÄ·ÅÊ½.
ÁíÍâ¿ÉÒÔÊ¹ÓÃ {\ttfamily LILO} À´Æô¶¯ÇÒ²»ÐèÒªÊ¹ÓÃ DOS.

ÔÚÕâ¸ö×´¿öÏÂ DOS ¸ñÊ½µÄÈíµú±»»»³É ext2fs ¸ñÊ½µÄÈíµú.
ÆäËûÏ¸½Ú¶¼·Ç³£ÏàËÆ, ±ØÐë½«ÏµÍ³ºËÐÄÓë³õÊ¼¼ÇÒäÌå´Åµú·Åì¶¸ÃÈíµúÉÏ.

ÎÒÑ¡ÔñÊ¹ÓÃ {\ttfamily LOADLIN} µÄÔ­ÒòÔÚì¶ {\ttfamily LILO} ÐèÒª½Ï¸´ÔÓµÄÖ¸Áî.
¶øÇÒ¿ÉÒÔÔÚ DOS ÏÂÊ¹ÓÃµÄÈíµúÒ²½ÏÈÝÒ×´¦Àí.






\subsection{½« Linux °²×°ÔÚ VFAT / NTFS µµ°¸ÏµÍ³ÉÏ}

ÎÒÔø¾­ÊÔ¹ý½« Linux °²×°ÔÚ NTFS Ö®ÉÏ, ¶øÇÒÃ»Ò²ÈÎºÎÎÊÌâ.
µ«ÔÚ±ê×¼µÄ 2.0.x °æºËÐÄÖÐ, NTFS ²¢²»±»Ö§Ô®, µ«Äã¿ÉÒÔÔÚ
\onlynameurl{http://www.informatik.hu-berlin.de/\~{}loewis/ntfs/}
ÕÒµ½ÐÞ²¹µµ.
ÔÚ 2.2.x °æµÄºËÐÄÖÐ, NTFS ÒÑ±»Ö§Ô®.

Ê¹ÓÃÔÚ VFAT »ò NTFS Ê±Óë±¾ÎÄ¡õÀý²»Í¬Ö®´¦½öÔÚì¶ÖÆ×÷ÆðÊ¼¼ÇÒäÌå´ÅµúÊ±, ±àÐ´ {\ttfamily /linuxrc} Ö¸Áî¸ãÒÔ¹ÒÔØµµ°¸ÏµÍ³Ê±, ±ØÐëÒÔ vfat »ò ntfs Îª²ÎÊý¶ø·Ç msdos.

¾ÝÎÒËùÖªÃ»ÓÐÀíÓÉ²»ÄÜÓÃÔÚ VFAT ·Ö¸îÇøÉÏ.\\ 
(Òë×¢: µÜÊÇÓÃÔÚ VFAT ÉÏÃæ, ²¢ÒÔ 100 MB ZIP Æô¶¯ Linux)




\subsection{°²×° Linux ¶ø²»ÐèÖØÐÂ¸ñÊ½»¯}

Õý³£°²×° Linux Ì×¼þÊ±¶¼±ØÐëÓÉÈíµú»ú¿ª»ú, ²¢ÖØÐÂ¸ñÊ½»¯Ó²µú.
ÀûÓÃ±¾ÎÄµÄ·½·¨Ò²¿ÉÒÔ½¨Á¢ÈÆ»Øµµ°¸, ²¢¼ÌÐøÕý³£µÄ°²×°³ÌÐò, ²¢½«ÏµÍ³°²×°ì¶ÈÆ»Ø×°ÖÃ¶ø²»ÊÇÒ»¸ö·Ö¸îÇøÖÐ.

Õâ¿ÉÒÔ×÷Îª°²×°ÔÚ {\ttfamily UMSDOS} ÍâµÄÁíÒ»ÖÖÑ¡Ôñ, Õâ½«»á¸üÓÐÐ§ÂÊµÄÊ¹ÓÃ´Åµú¿Õ¼ä, ÒòÎªÔÚ ext2fs ÖÐ×îÐ¡ÅäÖÃµ¥Î»ÊÇ 1kB, ¶øÔÚ DOS ÖÐÔòÊÇ 32kB.
Í¬Ê±Ò²¿ÉÒÔÓÃÔÚ VFAT »ò NTFS ÉÏ¶ø²»»á²úÉúÆäËûÎÊÌâ.






\subsection{´Ó²»¿É¿ª»úµÄÉè±¸ÉÏÆô¶¯ Linux}

Õâ¸ö·½·¨Ò²¿ÉÒÔÓÃÔÚÕý³£²»ÄÜÓÃÀ´¿ª»úµÄÉè±¸ÉÏÆô¶¯ Linux ÏµÍ³.



\begin{itemize}
\item ¹âµúÆ¬
\item Zip ´ÅµúÆ¬
\item Æ½ÐÐ²º´Åµú×°ÖÃ
\end{itemize}


»¹ÓÐÐí¶àÆäËûµÄ×°ÖÃ¿ÉÒÔÊ¹ÓÃ, NFS ¸ùÄ¿Â¼ÏµÍ³ÒÑ¾­±»ºËÐÄËùÖ§Ô®, ËùÒÔ±¾ÎÄµÄ·½·¨Ó¦¸ÃÒ²¿ÉÒÔÓÃ.



\end{document}
