\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{Linux+FreeBSD mini-HOWTO ÖÐÒë°æ}
\author{×÷Õß: Niels Kristian Bech Jensen, {\ttfamily \onlynameurl{nkbj@image.dk}} \\ 
ÒëÕß: \onlynameurl{»ÆÔòÈÙ} {\ttfamily \onlynameurl{tjhuang@technologist.com}}}
\date{v1.4, 23 January 1998
·­ÒëÈÕÆÚ: 17 March 1998}
\abstract{Õâ·ÝÎÄ¼þÍ¾ÊöÈçºÎÔÚÒ»¸öÏµÍ³ÖÐÊ¹ÓÃ Linux ºÍ FreeBSD. Ëü½éÉÜ FreeBSD, ²¢ÌÖÂÛÕâÁ½¸öÏµÍ³ÈçºÎ»¥ÏàÓ°Ïì, ÈçÒ»Æð·ÖÏí swap ¿Õ¼ä. ÄãÔÚ¶ÁÕâ·ÝÎÄ¼þÖ®Ç°, Ó¦¸ÃÒªÓÐÊ¹ÓÃ Linux Óë×öÓ²µú·Ö¸îµÄ¾­Ñé. Èç¹ûÄã¶ÔÕâÆªÎÄ¼þÓÐÈÎºÎµÄÆÀÂÛ, ÎÊÌâ, Óë½¨Òé, Çë²»ÒªÓÌÔ¥,
Ð´·âµç×ÓÓÊ¼þ¸øÎÒ.   ÎÒÒ²Ï£ÍûÌýÌýÓÐÍ¬Ê±Ê¹ÓÃ Linux ºÍ NetBSD »ò OpenBSD ¾­ÑéµÄÈËËµËµ. }


\begin{document}
\maketitle
\tableofcontents

\section{Ê²÷áÊÇ FreeBSD? }

FreeBSD ºÍ Linux Ò»ÑùÊÇ¸öÃâ·ÑµÄ, ÈçÍ¬ unix °ãµÄ×÷ÒµÏµÍ³. 
×îÖ÷ÒªµÄ²îÒìÊÇ, Linux ÊÇ×ÔÊ×µ½Î²´ÓÐÂ·¢Õ¹µÄ, ¶ø FreeBSD ÊÇ»ùì¶ 4.4BSD (°Ø¿ËÀ´´óÑ§Èí¡õ Distribution) ×ÔÓÉ redistribution µÄÄÇÒ»¸ö²¿·Ý¶øÀ´. 
Õâ¸ö²¿·ÝÒ²±»³ÆÎª 4.4BSD-lite.  Õâ¸öÊÂÊµÒ²Ðí»áÊ¹ÈËÕâ÷áÏë: FreeBSD ±È Linux ¸ü½üì¶'ÕæÕý'µÄunix.
FreeBSD Ö»ÄÜÔÚ Intel PC Æ½Ì¨ÉÏ(i386»ò¸ü¸ß)Ö´ÐÐ. ¶øÒÆÖ²µ½ DEC Alpha Æ½Ì¨µÄ°æ±¾Ä¿Ç°ÕýÔÚ±»ÌÖÂÛ.
FreeBSD ¶ÔÓ²¡õµÄÐèÇóÓë Linux ·Ç³£µÄÏàÏñ.

FreeBSD µÄ·¢Õ¹Óë Linux ±È½ÏÆðÀ´ÊÇ±È½Ï·â±ÕµÄ. Ö÷ÒªµÄ¾ö¶¨ÊÇÓÉÒ»¸ö¿ª·¢ÈËÔ±Ëù³ÉÁ¢µÄÖÐÐÄÍÅ¶Ó¸ºÔð. 
´óµÄ¸Ä±äÏÈÔÚmail-list ÉÏÊÂÏÈ×öÌÖÂÛ. 
FreeBSD ÓÐÁ½¸ö·¢Õ¹Ê÷, (ÈçÍ¬ Linux Ò»°ã) : {\itshape ``-current''\/} ºÍ {\itshape ``-stable"\/}.  
ÐÂ¹¦ÄÜµÄ·¢Õ¹ÔÚ``-current"·¢Õ¹Ê÷ÖÐ, ¶ø``-stable"Ê÷ÖÐµÄ¸Ä±äÖ÷Òª¶¼ÊÇ¼º³ýÈ¥ bug µÄÁË.

FreeBSD ÈçÍ¬ LinuxÒ»°ã¿É×ÔÓÉÃâ·ÑµÄÊ¹ÓÃÓë(re-)É¢·¢.  ÏµÍ³µÄ´ó²¿·ÝÊÇÔÚBSD °æÈ¨ÏÂ·¢ÐÐ, ¶øÆäËûµÄÔòÊÇÔÚ GNU GPL »ò GNU LPGL ÏÂ.

Äã¿ÉÒÔÔÚ \nameurl{http://www.freebsd.org/}{FreeBSD Inc.} ÏÂÕÒµ½¸ü¶àµÄ×ÊÑ¶»òÊÇÏÂÔØÕû¸öÏµÍ³.  ×îÐÂ ``-stable"µÄ°æ±¾ºÍ
``-current"·¢Õ¹³ÌÊ½Âë¿ÉÒÔÔÚ \nameurl{http://www.cdrom.com/}{Walnut Creek CDROM} ¹ºµÃ. (ËûÃÇÊÇÊ¹ÓÃ FreeBSD À´Ìá¹© web ºÍ ftp ·þÎñ)




\section{FreeBSD ±êÊ¾Ó²µúµÄ·½Ê½}

Linux ºÍ FreeBSD Ê¹ÓÃÁ½ÖÖ²»Í¬µÄ·½Ê½À´±êÊ¾ÓëÇÐ¸îÓ²µú. 


\subsection{FreeBSD ``slices'' ºÍ ``partitions''}

FreeBSD Ö»ÐèÒªÓÃÓ²µúÉÏµÄÒ»¸öÖ÷Ó²µúÇÐ¸îÇø.  
Õâ¸öÖ÷ÇÐ¸îÇøÔÚ FreeBSD µÄÊõÓïÖÐ±»³ÆÎª {\itshape ``slice''\/}.
È»ááËüÓÃ {\ttfamily disklabel} Õâ¸ö³ÌÊ½ÔÚÕâ¸öÖ÷Ó²µúÇÐ¸îÇøÖÐÖÆÔìÂß¼­ÇÐ¸îÇø.
ÕâÐ©Âß¼­ÇÐ¸îÇøÔÚ FreeBSD µÄÊõÓïÖÐ±»³ÆÎª{\itshape ``partitions''\/}. 
Õâ¸ö¹ÛÄîÓë Linux (ºÍ DOS) ´¦ÀíÀ¨³äÇÐ¸îÇøÖÐµÄÂß¼­ÇÐ¸îÇøÊÇ·Ç³£ÏàÏñµÄ.
×¢Òâ: Linux {\ttfamily fdisk} ³ÌÊ½µÄÖ÷¹¦ÄÜ±íÖÐ²¢²»»á½« FreeBSD slice ÖÐµÄ partitions ÏÔÊ¾³öÀ´, µ«ÊÇÄã¿ÉÒÔÊ¹ÓÃÃüÁî 'b' À´ÏÔÊ¾ BSD ´Åµú±êÇ©µÄÑ¶Ï¢.
ËüµÄÊä³ö½«ÈçÕâÑù : ({\ttfamily /dev/hda4} ÊÇ FreeBSD µÄ slice): 

\begin{tscreen}
\begin{verbatim}
# fdisk /dev/hda 
 
Command (m for help): p
Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes 
   Device Boot   Begin    Start      End   Blocks   Id  System
/dev/hda1   *        1        1       27    54400+  83  Linux native
/dev/hda2           28       28       55    56448   83  Linux native
/dev/hda3           56       56      403   701568   83  Linux native
/dev/hda4          404      404      621   439488   a5  BSD/386 
Command (m for help): b
Reading disklabel of /dev/hda4 at sector 1624897. 
BSD disklabel command (m for help): p
8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    64512  1624896    4.2BSD        0     0     0   # (Cyl.  404 - 419)
  b:   104832  1689408      swap                        # (Cyl.  420 - 445)
  c:   878976  1624896    unused        0     0         # (Cyl.  404 - 621)
  e:    64512  1794240    4.2BSD        0     0     0   # (Cyl.  446 - 461)
  f:   645120  1858752    4.2BSD        0     0     0   # (Cyl.  462 - 621) 
BSD disklabel command (m for help): q
#
\end{verbatim}
\end{tscreen}

ÔÚµÚÒ»¸öÀ¸Î»ÖÐµÄ×ÖÄ¸ `a'...`f' ÓëÏÂÃæ FreeBSD slice µÄÀý×ÓÖÐµÄÊÇÏàÍ¬µÄ.
×ÖÄ¸`b'Ö¸µÄÊÇ swap partition, ¶ø`c'Ö¸µÄÊÇÕû¸ö slice.
ÔÄ¶Á FreeBSD ÎÄ¼þÒÔ±ã»ñÈ¡Ö¸¶¨ÕâÐ©×ÖÄ¸¸ø²»Í¬ÇÐ¸îÐÍÌ¬µÄ``±ê×¼·½·¨" µÄ¸ü¶à×ÊÑ¶. 




\subsection{Linux ºÍ FreeBSD ÖÐµÄÓ²µúÓëÇÐ¸îÇø±êÊ¾.}

Linux ºÍ FreeBSD ÖÐµÄÓ²µúÊÇÈçÏÂÁÐ·½·¨±êÊ¾µÄ:
\begin{tscreen}
\begin{verbatim}
Linux FreeBSD
First IDE drive /dev/hda /dev/wd0
Second IDE drive /dev/hdb /dev/wd1
First SCSI drive /dev/sda /dev/sd0
Second SCSI drive /dev/sdb /dev/sd1
\end{verbatim}
\end{tscreen}
 
FreeBSD slice ÊÇÈçÏÂ·½·¨±êÊ¾:
({\ttfamily /dev/hda} Îª¡õÀý):
\begin{tscreen}
\begin{verbatim}
Linux FreeBSD
First primary partition /dev/hda1 /dev/wd0s1
Second primary partition /dev/hda2 /dev/wd0s2
Third primary partition /dev/hda3 /dev/wd0s3
Fourth primary partition /dev/hda4 /dev/wd0s4
\end{verbatim}
\end{tscreen}
 
FreeBSD slice ÖÐµÄ partitions ÈçÏÂÊö·½·¨±êÊ¾
({\ttfamily /dev/hda4} ÊÇÀý×ÓÖÐµÄ FreeBSD slice ):
\begin{tscreen}
\begin{verbatim}
Linux label FreeBSD label Default FreeBSD mount point 
/dev/hda5 /dev/wd0s4a /
/dev/hda6 /dev/wd0s4b swap
/dev/hda7 /dev/wd0s4e /var
/dev/hda8 /dev/wd0s4f /usr
\end{verbatim}
\end{tscreen}
 
Èç¹ûÄãÔÚ LinuxÖÐÖ´ÐÐ {\ttfamily dmesg} Äã½«»á¿´µ½ÈçÏÂ (Linux µÄ kernel ±ØÐëÓÐ  {\bfseries UFS} Ö§Ô®²ÅÄÜ×àÐ§. ¿´ \ref{installlinux} {(°²×°²¢×¼±¸ Linux)}) ²¿·Ý:
\begin{tscreen}
\begin{verbatim}
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >
\end{verbatim}
\end{tscreen}
 
Èç¹ûÄãÔÚ {\ttfamily /dev/sdb3} slice ÖÐ°²×° FreeBSD, ¶øÇÒ {\ttfamily /dev/sdb2} ÊÇÒ»¸öº¬ÓÐÁ½¸öÂß¼­ÇÐ¸îµÄ Linux À©³äÇÐ¸î ({\ttfamily /dev/sdb5} ¼° {\ttfamily /dev/sdb6}), Ö®Ç°µÄÀý×Ó¿´ÆðÀ´½«ÈçÍ¬ÕâÑù:
\begin{tscreen}
\begin{verbatim}
Linux label FreeBSD label Default FreeBSD mount point 
/dev/sdb7 /dev/sd1s3a /
/dev/sdb8 /dev/sd1s3b swap
/dev/sdb9 /dev/sd1s3e /var
/dev/sdb10 /dev/sd1s3f /usr
\end{verbatim}
\end{tscreen}
 
ÔÚ {\ttfamily dmesg} µÄÊä³öÖÐ¿´ÆðÀ´½«Èç
\begin{tscreen}
\begin{verbatim}
Partition check:
sdb: sdb1 sdb2 < sdb5 sdb6 > sdb3 < sdb7 sdb8 sdb9 sdb10 >
\end{verbatim}
\end{tscreen}
 
Èç¹ûÄãÓÐÒ»¸ö Linux ÑÓÉì´ÅÇøÔÚ FreeBSD slice {\itshape Ö®áá\/}, Äã±ãÓÐÁËÂé·³.
ÒòÎª´ó¶àÊýµÄ Linux ºËÐÄ°²×°´ÅÆ¬Ã»ÓÐÄÚº¬{\bfseries UFS} Ö§Ô®, 
ËüÃÇÈÏ²»µÃ FreeBSD slice ÖÐµÄ partitions.
¿´µ½µÄ({\ttfamily /dev/hda3} ÊÇ FreeBSD slice ¶ø {\ttfamily /dev/hda4} ÊÇ Linux ÑÓÉìÇÐ¸î)

\begin{tscreen}
\begin{verbatim}
Partition check:
hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 > hda4 < hda9 hda10 >
\end{verbatim}
\end{tscreen}

³öÏÖ³É:
\begin{tscreen}
\begin{verbatim}
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
\end{verbatim}
\end{tscreen}
 

Õâ»áµ¼ÖÂ´íÎóµÄÉèÊ©Ö¸¶¨, ²¢»áÁî×ÊÁÏÒÅÊ§. 
ÎÒµÄ½¨ÒéÊÇ {\itshape ÓÀÔ¶°ÑÄãµÄ FreeBSD slice ·ÅÔÚÈÎºÎ Linux ÑÓÉìÇÐ¸îÖ®áá, ²¢ÇÒ²»ÒªÔÚ°²×° FreeBSD áá, ¸Ä±ä Linux ÑÓÉìÇÐ¸îÖÐµÄÈÎºÎÂß¼­ÇÐ¸î\/}. 




\section{ÔÚ Linux ºÍ FreeBSD¼ä·ÖÏí Swap ¿Õ¼ä}

ÕâÒ»¸öÆª·ùÃèÊöÎÒÈçºÎÈÃ Linux ºÍ FreeBSD ¹²ÓÃÒ»¸ö Swap ÇÐ¸î. ¿ÉÄÜ»¹ÓÐ±ðµÄ·½·¨¿ÉÒÔ×öµ½ÏàÍ¬µÄ½á¹û.
ÕâÀïËùÓÃµÄ Linux ÊÇ Red Hat 4.1 ºÍ 4.2 (Linux ºËÐÄ 2.0.29 ºÍ 2.0.30) Óë FreeBSD 2.2.2.
Èç¹ûÄãÔ¸Òâ, Äã¿ÉÒÔÔÚ°²×°  Linux Ö®Ç°ÏÈ°²×° FreeBSD, µ«Òª×¢Òâ FreeBSD slice ÖÐ partition µÄË³Ðò.




\subsection{°²×°ºÍ×¼±¸ Linux\label{installlinux}}

µÚÒ»²½ÊÇÈçÆ½³£Ò»ÑùµÄ°²×° Linux. Äã±ØÐëÔÚÄãµÄÓ²µúÖÐÁôÏÂ¸ø FreeBSD slice µÄ¿Õ¼ä.
Äã²»ÓÃ×÷ Linux µÄ Swap ÇÐ¸î, µ«Èç¹ûÄãÒªÕâÑùÒ»¸öÇÐ¸î, ¾Í°ÑËü·ÅÔÚÄãÒª¸ø FreeBSD µÄ¿Õ¼äÖÐ. 
ÕâÑù, Äã±ã¿ÉÒÔÔÚÉÔááÉ¾³ýÕâ¸öÇÐ¸î, ²¢°ÑËüÄÃÀ´¸ø FreeBSD ÓÃ . 

ÔÚÍê³É Linux µÄ°²×°áá, Äã±ØÐëÒªÖØÐÂ±àÒë kernel. Èç¹ûÄã¶ÔÕâ²»Çå³þ, ¿ÉÒÔ²Î¿¼ {\bfseries The Linux Kernel HOWTO}.
Äã {\itshape ±ØÐë\/} ¼ÓÈë¶Ô {\bfseries UFS µµ°¸ÏµÍ³} µÄÖ§Ô®, Óë¶Ô {\bfseries BSD disklabel (FreeBSD partition tables)} µÄÖ§Ô®.
\begin{tscreen}
\begin{verbatim}
UFS filesystem support (read only) (CONFIG_UFS_FS) [N/y/m/?] y
BSD disklabel (FreeBSD partition tables) support (CONFIG_BSD_DISKLABEL) [N/y/?]
(NEW) y
\end{verbatim}
\end{tscreen}
 
°²×°ÐÂµÄºËÐÄ²¢ÖØÐÂ¿ª»ú. Èç¹ûÄãÓÐ½¨¹¹ Linux Swap ÇÐ¸î, °ÑÔÚ{\ttfamily /etc/fstab} µµÖÐÈÎºÎº¬ÓÐ {\itshape swap\/}  µÄÄÇ¼¸ÐÐÉ¾È¥. 
{\itshape È·¶¨ÄãÓÐ¿ÉÓÃµÄÐÂºËÐÄ¿ª»úÆ¬\/} Äã±ã¿ÉÒÔ¿ªÊ¼À´°²×° FreeBSD ÁË.


\subsection{°²×° FreeBSD}

ÒÀ FreeBSD ÎÄ¼þÖÐËùÃèÊöµÄ·½Ê½À´°²×°ÄãµÄ FreeBSD.
Èç¹ûÄãÓÐ½¨¹¹ Linux swap ÇÐ¸î, °ÑËüÉ¾³ý, (Äã¿ÉÒÔÊ¹ÓÃ FreeBSD µÄ{\ttfamily fdisk} ³ÌÊ½.)
×¢ÒâÒ»ÏÂ FreeBSD slice ÖÐ partitions µÄË³Ðò. 
Èç¹ûÄãÊ¹ÓÃÔ¤ÉèµÄ±êÇ©±àÂë, µÚ¶þ¸ö partition ½«ÊÇswap ÇÐ¸î. Íê³É FreeBSD µÄ°²×°,
²¢{\itshape Ê¹ÓÃLinuxµÄ¿ª»úÆ¬\/} ÖØÐÂ¿ª»ú½øÈë Linux.




\subsection{ÔÚ Linux ÖÐÉè¶¨ FreeBSD µÄ swap ÇÐ¸î}

ÔÚ½øÈë Linux ááÖ´ÐÐ {\ttfamily dmesg}. ÔÚËüµÄÊä³öÄãÓ¦¸Ã»á¿´µ½ÀàËÆÕâÑùµÄ¶«Î÷: 
\begin{tscreen}
\begin{verbatim}
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >
\end{verbatim}
\end{tscreen}
 
Õâ±íÊ¾ {\ttfamily /dev/hda4} ÊÇÄãµÄ FreeBSD slice, ¶ø {\ttfamily /dev/hda5}, {\ttfamily /dev/hda6}, {\ttfamily /dev/hda7} ºÍ {\ttfamily /dev/hda8} ÊÇ
FreeBSD ÇÐ¸î. Èç¹ûÄãµÄ swap ÇÐ¸îÊÇÔÚ slice ÖÐµÄµÚ¶þ¸öÇÐ¸î, ÄÇ½«»áÊÇ {\ttfamily /dev/hda6}.
Äã±ØÐë°ÑÏÂÃæµÄÕâ¼¸ÐÐ·Åµ½ÄãµÄ {\ttfamily /etc/fstab} µµÖÐÀ´¿ªÆô swap partition µÄ¹¦ÄÜ.
\begin{tscreen}
\begin{verbatim}
/dev/hda6 none swap sw 0 0
\end{verbatim}
\end{tscreen}
 
FreeBSD ¿ÉÒÔÓÃÈÎºÎÐÍÌ¬µÄÇÐ¸îÀ´µ±×÷ swap ÇÐ¸î, µ« Linux µÄ swap ÇÐ¸îÐèÒªÌØ±ðµÄÇ©Ãû. 
Õâ¸öÇ©ÃûÊÇÓÃ {\ttfamily mkswap} À´½¨¹¹µÄ.
FreeBSD Ê¹ÓÃÕâ¸ö¹²ÓÃµÄ swap ÇÐ¸îÊ±»á¶ÔÕâ¸öÇ©ÃûÔì³ÉÆÆ»µ, ËùÒÔÄã±ØÐëÔÚÃ¿´Î½øÈë Linux µÄÊ±ááÖ´ÐÐ {\ttfamily mkswap}.
ÒªÈÃÕâ¸ö¶¯×÷×Ô¶¯Ö´ÐÐ, Äã±ØÐëÕÒ³öÖ´ÐÐ {\ttfamily swapon} µÄ script ²¢ÔÚ¿ª»úÊ±Ö´ÐÐ.
ÒÔ Red Hat ¶øÑÔ, ÕâÊÇ {\ttfamily /etc/rc.d/rc.sysinit}. °ÑÏÂÃæÕâÒ»ÐÐ·Åµ½ {\ttfamily swapon -a} {\itshape Ç°\/}:  
\begin{tscreen}
\begin{verbatim}
awk -- '/swap/ && ($1 !~ /#/) { system("mkswap "$1"") }' /etc/fstab
\end{verbatim}
\end{tscreen}
 
Õâ½«»áÔÚÃ¿´Î¿ª»úÊ±, ÔÚ {\ttfamily /etc/fstab} ÖÐµÄÈÎºÎ swap ÇÐ¸îÉÏÖ´ÐÐ {\ttfamily mkswap}, ³ý·ÇÄã°ÑËüÈ¡Ïû (Ê¹ÓÃ ``\#'' µ±Ò»ÐÐµÄµÚÒ»¸ö×ÖÔª)

ÔÚÄãÖØÐÂ¿ª»ú½øÈë Linux áá, Ê¹ÓÃ {\ttfamily free} À´¼ì²é swap ¿Õ¼äµÄ´óÐ¡. 
ÄãÒ²±ØÐëÖØÐÂ¿ª»ú½øÈë FreeBSD À´È·ÈÏÒ»ÇÐ¶¼ÈçÔ¤ÆÚµÄÔË×÷.  
Èç¹ûÃ»ÓÐ, ÄÇÄã¿ÉÄÜÊ¹ÓÃÁË´íÎóµÄÇÐ¸îÀ´µ±×÷ swap ÇÐ¸î. 
Î¨Ò»µÄ½â¾ö°ì·¨, ±ãÊÇÖØÐÂÔÙ°²×° FreeBSD, ²¢ÔÙÊÔÒ»´Î. ¾­ÑéÊÇºÃµÄµ¼Ê¦. :-)




\section{Ê¹ÓÃ LILO À´Æô¶¯ FreeBSD }

Äã¿ÉÒÔ·Ç³£ÈÝÒ×µÄÊ¹ÓÃ LILO À´Æô¶¯ FreeBSD. Èç¹ûÄãÒªÊ¹ÓÃ LILO, ²»Òª°²×° FreeBSD µÄ boot loader ({\ttfamily Booteasy}).
ÔÚÄãµÄ{\ttfamily /etc/lilo.conf} µµÖÐ¼ÓÈëÏÂÁÐÕâ¼¸ÐÐ, ²¢Ö´ÐÐ  {\ttfamily lilo} ( FreeBSD slice ÊÇÔÚ {\ttfamily /dev/hda4}):

\begin{tscreen}
\begin{verbatim}
other=/dev/hda4
table=/dev/hda
label=FreeBSD
\end{verbatim}
\end{tscreen}
 
Èç¹ûÄã°Ñ FreeBSD °²×°ÔÚµÚ¶þ¿Å SCSI Ó²µúÖÐ, Ê¹ÓÃÀàËÆÕâÑùµÄÉè¶¨(FreeBSD slice ÔÚ {\ttfamily /dev/sdb2}):
\begin{tscreen}
\begin{verbatim}
other=/dev/sdb2
table=/dev/sdb
loader=/boot/chain.b
label=FreeBSD
\end{verbatim}
\end{tscreen}
 




\section{¼Ü¹¹µµ°¸ÏµÍ³}


\subsection{ÔÚ Linux ÖÐ¼Ü¹¹ UFS µµ°¸ÏµÍ³}

²»ÐÒµÄ, Linux ºËÐÄ¶Ô UFS µÄÖ§Ô®ÓÐÎÊÌâ. µ±ÄãÊÔÖøÈ¥¼Ü¹¹ UFS µµ°¸ÏµÍ³Ê±, Ö»»áµÃµ½Ò»Ð©´íÎóÑ¶Ï¢(µµ°¸ÏµÍ³ÊÂÊµÉÏÒÑ¾­±»¼ÜÉÏÈ¥ÁË, µ«ÄãÈ´²»ÄÜ¶Áµ½ÈÎºÎ¶«Î÷).
ËùÐÒ Linux 2.0.xx  ºËÐÄ (xx{$<$}30) ÓÐÒ»¸öÐÂ (ALPHA) °æ±¾µÄ UFS µµ°¸ÏµÍ³Ö§Ô®, ÔÚ \nameurl{ftp://sunsite.unc.edu/pub/Linux/ALPHA/ufs/}{SunSite}.
Õâ±»³ÆÎª {\bfseries U2FS}, ¶øÄ¿Ç°µÄ°æ±¾ÊÇ {\ttfamily u2fs-0.4.3.tar.gz}. 
{\bfseries U2FS} ÊÇÓÃÏÂÁÐµÄ·½Ê½À´°²×°(¼ÙÉè{\ttfamily u2fs-0.4.3.tar.gz} ÊÇ´æ·ÅÔÚ{\ttfamily /usr/src}): 
\begin{tscreen}
\begin{verbatim}
cd /usr/src
tar xvzf u2fs-0.4.3.tar.gz
patch -p0 -E < u2fs-0.4.3.patch
\end{verbatim}
\end{tscreen}
 

Linux  2.0.31 »ò¸üÐÂµÄºËÐÄ({\ttfamily u2fs-0.4.4.tar.gz}), Óë×îÐÂµÄ 2.1.xx ºËÐÄÊÊÓÃµÄ {\bfseries U2FS}°æ±¾, ¿ÉÒÔÔÚ \nameurl{http://www.image.dk/~nkbj/u2fs/}{Õâ¸öÍøÕ¾} ÕÒµ½.
ÏÖÔÚÄã±ØÐëÖØÐÂ½¨Á¢Ö§Ô® {\bfseries U2FS µµ°¸ÏµÍ³} ºÍ {\bfseries BSD disklabel} µÄºËÐÄ. 
²Î¿¼ \ref{installlinux} {(°²×°ºÍ×¼±¸ Linux)} À´µÃµ½¸ü¶àµÄ×ÊÁÏ. µ±Ê¹ÓÃ{\bfseries U2FS}Ê±, Äã¿ÉÒÔºöÂÔºËÐÄµÄ {\bfseries UFS µµ°¸ÏµÍ³} Ö§Ô®. 
µ±Íê³ÉÐÂµÄºËÐÄ°²×°áá, Äã¿ÉÒÔÊ¹ÓÃÈçÏÂÁÐµÄÖ¸ÁîÀ´¼Ü¹¹ÄãµÄ UFS µµ°¸ÏµÍ³(ËùÓÐÔÚ FreeBSD slice ÖÐµÄÇÐ¸î, ³ýÁË swap ÇÐ¸î.
\begin{tscreen}
\begin{verbatim}
mount -t u2fs /dev/hda8 /mnt
\end{verbatim}
\end{tscreen}
 
Õâ¸ö UFS Ö§Ô®ÊÇÎ¨¶ÁµÄ. ÄÇ¼´ÊÇÄã¿ÉÒÔ×ÔUFS µµ°¸ÏµÍ³ÖÐ¶ÁÈ¡,µ«Äã²»ÄÜ¶ÔÆä×÷Ð´Èë.


\subsection{ÔÚ FreeBSDÉÏ¼Ü¹¹ ext2fs µµ°¸ÏµÍ³\label{ext2fs}}

ÒªÔÚ FreeBSD ÖÐ¼Ü¹¹ ext2fs µµ°¸ÏµÍ³, ÄãÒªÏÈ½¨Á¢Ò»¸öÖ§Ô® ext2f µÄºËÐÄ. 
Çë²ÎÕÕ FreeBSD µÄÎÄ¼þÀ´Ã÷°×ÈçºÎ½øÐÐ. 
·ÅÕâ¼¸ÐÐ 
\begin{tscreen}
\begin{verbatim}
options "EXT2FS"
\end{verbatim}
\end{tscreen}
 
ÔÚÄãÐÂºËÐÄµÄÉè¶¨µµÖÐ.
ÔÚÍê³ÉÊ¹ÓÃÐÂµÄºËÐÄÀ´¿ª»úáá, Äã¿ÉÒÔÓÃÏÂÁÐÕâ¼¸ÐÐÀ´¼Ü¹¹ÄãµÄ ext2fs µµ°¸ÏµÍ³
\begin{tscreen}
\begin{verbatim}
mount -t ext2fs /dev/wd0s3 /mnt
\end{verbatim}
\end{tscreen}
 
×¢Òâ: Äã²»ÄÜ°Ñ ext2fs µµ°¸ÏµÍ³¼Ü¹¹ÔÚ FreeBSD µÄÑÓÉìÇÐ¸îÖÐ.

»ùì¶ FreeBSD µÄÄ³Ð©´íÎó, Äã±ØÐëÔÚ¹Ø±Õ FreeBSD {\itshape Ç°\/}Ð¶ÏÂËùÓÐµÄ ext2fs µµ°¸ÏµÍ³.
Èç¹ûÄãÔÚÓÐ ext2fs µµ°¸ÏµÍ³Î´Ð¶ÏÂÇ°¾Í¹Ø±Õ FreeBSD, FreeBSD ±ã²»ÄÜ sync UFS µµ°¸ÏµÍ³.
Õâ»áµ¼ÖÂFreeBSDÏÂ´ÎÆô¶¯Ê± {\ttfamily fsck} ±»Ö´ÐÐ. Õâ¸ö´íÎó¾Ý±¨¸æËµÒÑÔÚ``-current" ·¢Õ¹Ê÷ÖÐ±»ÐÞÕý. 




\section{Ö´ÐÐÍâÀ´µÄÖ´ÐÐµµ}


\subsection{ÔÚ Linux ÏÂÖ´ÐÐ FreeSBD µÄÖ´ÐÐµµ}

{\ttfamily iBCS} package ÓÐÌá¹©ÔÚ Linux ÏÂÖ´ÐÐ FreeBSD Ö´ÐÐµµµÄÖ§Ô®; µ«ËüÒÑÌ«ÀÏ¾ÉÇÒÃ»ÓÐÈËÎ¬»¤. ÎÒ²»ÄÜ³É¹¦ÈÃËü¶¯×÷.
Èç¹ûÄãÐÒÔËµØ½ÐËü¶¯ÆðÀ´, ÇëÄã¸æËßÎÒ. 




\subsection{ÔÚ FreeBSD ÏÂÖ´ÐÐ Linux µÄÖ´ÐÐµµ}

FreeBSD ÓÐÄÜÁ¦À´Ö´ÐÐ Linux µÄÖ´ÐÐµµ, °üÀ¨ a.out ºÍELF ÐÍÊ½.
ÒªÕâ÷á×ö, Äã±ØÐëÒª²ÉÈ¡ÏÂÁÐÈý¸ö²½Öè: 
\begin{enumerate}
\item Äã±ØÐë¿ªÆôÓë Linux ÏàÈÝµÄ»úÖÆ. ÒªÕâ÷á×ö (in FreeBSD 2.2.2 ---
ÆäËû°æ±¾µÄÏ¸½Ú¿ÉÄÜ²»Í¬) ÄãÒªÐÞ¸ÄÄãµÄ{\ttfamily /etc/rc.conf}
µµ°¸, ²¢ÐÞ¸Ä 
\begin{tscreen}
\begin{verbatim}
linux_enable="NO"
\end{verbatim}
\end{tscreen}

³É
\begin{tscreen}
\begin{verbatim}
linux_enable="YES"
\end{verbatim}
\end{tscreen}
\item Äã±ØÐë°²×° Linux ¹²ÏíµÄ³ÌÊ½¿â. ËüÃÇÔÚ FreeBSD 2.2.2 ÖÐ±»°üº¬³ÉÎª package{\ttfamily linux\_lib-2.4.tgz}
(¸üÐÂµÄ°æ±¾¿ÉÄÜÒÑ¾­³öÀ´ÁË.) Ö´ÐÐÕâ¸öÃüÁî
\begin{tscreen}
\begin{verbatim}
pkg_add <path_to_package>/linux_lib-2.4.tgz
\end{verbatim}
\end{tscreen}

À´°²×°Õâ¸öpackage. $<$path\_to\_package$>$ ÊÇÕâ¸öpackage´æ·ÅµÄÄ¿Â¼.
\item °²×°ÄãÒªÖ´ÐÐµÄ Linux ³ÌÊ½. ÕâÐ©³ÌÊ½¿ÉÈÎÒâ°²×°ÔÚ UFS »ò ext2fs µµ°¸ÏµÍ³ÖÐ. 
¿´ÕÂ½Ú \ref{ext2fs} {(ÔÚ FreeBSD ÉÏ¼Ü¹¹ ext2fs µµ°¸ÏµÍ³)} À´»ñÈ¡ÔÚ FreeBSD ÖÐÊ¹ÓÃ ext2fs µµ°¸ÏµÍ³µÄ¸ü¶à×ÊÑ¶.
\end{enumerate}
 
ÎÒÒÑ³É¹¦µØÊ¹ÓÃÕâÐ©·½·¨ÔÚ FreeBSD 2.2.2 Ö´ÐÐ Linux °æµÄ Applixware 4.3 ºÍ Netscape 3.01 
(Á½¸ö¶¼ÊÇ ELF ¸ñÊ½), (ÊÇµÄ, ÎÒÖªµÀÓÐ FreeBSD °æµÄ Netscape 4.) ¶Á FreeBSD µÄÎÄ¼þÀ´ÁË½âÓÐ¹ØÕâ¸öÖ÷Ìâ. 


\section{²Î¿¼ÎÄÏ×ì¶ÆäËûÓÐÈ¤µÄÎÄ¼þ}

×îÐÂ°æµÄÕâ·Ý mini-HOWTO ÄÜ¹»ÔÚ \nameurl{http://www.image.dk/nkbj/}{ÎÒµÄ homepage} ÖÐÕÒÖø, ÓÐÊýÖÖ¸ñÊ½ (°üÀ¨ SGML Óë PostScript.) 
Õâ·ÝÎÄ¼þÒÑ±» Mr. Teruyoshi Fujiwara ·­Òë³ÉÈÕÎÄ, ³ÉÎª \nameurl{ftp://jf.linux.or.jp/pub/JF/other-formats/}{JF project} µÄÒ»²¿·Ý. 

FreeBSD ÊÖ²áÓë FreeBSD FAQ ±»Óë FreeBSD Ò»ÆðÉ¢·¢. ËüÃÇÒ²¿ÉÒÔÔÚ\nameurl{http://www.freebsd.org/}{FreeBSD Inc.} ÖÐ±»ÕÒÖø.
Õâ¸öÍøÕ¾Ò²ÓÐºÜ¶à¹Øì¶ FreeBSD µÄÆäËû×ÊÑ¶. 

Linux Kernel HOWTO ±»É¢·¢³ÉÎª \nameurl{http://sunsite.unc.edu/LDP/}{The Linux Documentation Project} µÄÒ»²¿·Ý.




\section{¸ÐÐ»ºÍ°æÈ¨}

¸ÐÐ»\nameurl{http://hotel.prosa.dk/bsd-dk/}{*BSD µ¤ÂóÊ¹ÓÃÕßÈº}³ÉÔ±µÄ»Ø´ðÒ»Î» FreeBSD ÐÂÊÖµÄÎÊÌâ, Ò²¸ÐÐ» Mr. Takeshi
Okazaki ÈÃÎÒ×¢Òâµ½{\bfseries U2FS} µÄ´æÔÚ. 


\subsection{Disclaimer}

ËäÈ»ÕâÎÄ¼þÄÚÈÝËùÌá¹©µÄÑ¶Ï¢ÊÇ±»ÏàÐÅÕýÈ·µÄ, ×÷Õß±¾ÈË½«²»ÎªÎÄ¼þÖÐµÄÄÚÈÝ¸ºÔð. 
Çë×Ô¼º³Ðµ£Ê¹ÓÃÕâÐ©¼¼ÇÉºÍ¡õÀýµÄ·çÏÕ.




\subsection{Copyright }

Copyright (c) 1997, 1998 by Niels Kristian Bech Jensen. This document may
be distributed only subject to the terms and conditions set forth in \nameurl{http://sunsite.unc.edu/LDP/LICENSE.html}{the LDP license}. 
°æÈ¨ Copyright (c) 1997, 1998 by Niels Kristian Bech Jensen.  
Õâ·ÝÎÄ¼þÖ»¿ÉÔÚ×ñÊØ \nameurl{http://sunsite.unc.edu/LDP/LICENSE.html}{the LDP license} µÄÌõÎÄºÍÌõ¼þÏÂ±»É¢·¢. 

\end{document}
