\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{Backup-With-MSDOS mini-HOWTO}
\author{Christopher Neufeld, {\ttfamily neufeld@physics.utoronto.ca}}
\date{v, 5 August 1997}
\abstract{¦¹¥÷ HOWTO °O­z¦p¦ó§Q¥Î Linux ¬Û®eªººÏ±a¾÷¦w¸Ë¦b MS-DOS ªº¾÷¾¹¡A¨Ó³Æ¥÷ Linux ¾÷¾¹ªºÀÉ®×¨t²Î ( filesystem )¡C}


\begin{document}
\maketitle
\tableofcontents

\section{«e¨¥ / ¤¶²Ð}

¦­¥ý§Ú¦bºô¤W´£¥X¦p¦ó¥Î Colorado Jumbo 250 ºÏ±a¾÷¡£tape drive¡¤¦b MS-DOS ªº¾÷¾¹¤W³Æ¥÷ Linux ¾÷¾¹³o­Ó°ÝÃD¡C±q§Ú©Ò¦^¦¬ªº¹q¤l¶l¥ó¤¤Åã¥Ü¡A³o¬O¤@­Ó¸g±`³Q«ä¦Òªº°ÝÃD¡C²{¦b§Ú±N¥¦¾ã²z«á¡A¤½§G§@ªk¡C¦pªG¦³¥ô¦ó¤H·Q­n§â³o­Ó©ñ¤J HOWTO ¤å¥ó¤¤¡A½ÐÅý§Úª¾¹D¡C
§Ú­n·PÁÂ Jim Nance
¡£\onlynameurl{jlnance@isscad.com}¡¤
«ü¥X MS-DOS ªº¾÷¾¹¤£¤@©wÁ`¬O­Ó MS-DOS ªº¾÷¾¹¡C³o­Ó¤èªkÀ³¸Ó¤]¥i¥H¹B¥Î¦b¥ô¦ó¨ä¥L³Q ftape ¼Ò¦¡©Ò¤ä´©ªººÏ±a¾÷¡A¤Î¥Ñ©ó¾A·í©úÅã§ïÅÜªº SCSI ºÏ±a¾÷
¡£¨Ò¦p´À´« /dev/st0 for /dev/ftape¡¤¡C

§Ú©Ò³]©wªº¼Ð·Ç¡£criteria¡¤¬O°_·½©ó³]©wÀ³¸Ó¾¨¶q¦w¥þ»P¬Û·íÂ²³æ¡A¨Ã¥u¦û¥Î¤@ÂI©ÎµL¶·MS-DOS ¾÷¾¹¤WªºµwºÐªÅ¶¡¡C¥¦À³¸Ó¤]¯à´_­ì³ÌÁVªº¨t²Î±¡ªp¡A¬Æ¦Ü¥]¬AµwºÐªº¿ò¥¢¡A©Î»Ý­n«ì´_¬°³Ì­ì©lªº Linux ÀÉ®×¨t²Î¡C¦b¦¹°O­zªº¤èªkµL¶·¨Ï¥Î MS-DOS ¾÷¾¹ªºµwºÐªÅ¶¡¡A¥i¬O¨º¾÷¾¹»Ý­n³Q«ü©w¡£assigned ¡¤¤@­Ó IP\#¡C§A±N»Ý­n¤T¤ù¤w®æ¦¡¤Æªº1.44 MB ³n¦¡ºÏºÐ¤ù¡C


\section{¤èªk}

¦b³o¥÷¤å¥óªº¦U³B¡A§Ú±N·|´£¨ì¨â­Ó¾÷¾¹¦p ``{\ttfamily msdos}'' »P ``{\ttfamily linux}''¡C``{\ttfamily msdos}''  ¬O¾÷¾¹ªº¦WºÙ¡A¥¦¥²¶·¾Ö¦³¤@­ÓºÏ±a¾÷¡A¦Ó³q±`°õ¦æ MS-DOS¡C``{\ttfamily linux}''  ¬O§AÀ|¸Õ¥hÂÇ¥ÑºÏ±a¾÷¨Ó³Æ¥÷©Î«ì´_¥¦ªººÏºÐªº Linux ¾÷¾¹¡C
¬°Â²³æ°_¨£¡A§Ú±N²Ä¤@³¡¾÷¾¹ºÙ°µ {\ttfamily msdos}'' §Y¨Ï¥¦¦b°õ¦æ Linux¡C
¦¹¥~¡A©Ò¦³¤å¥ó¤¤ªº¸ô®|¡£path¡¤¦WºÙÀ³¸Ó¥[¥H¦Ò¼{ Linux ¾÷¾¹»P·j´M¤Î±Ï´©¡£Search-And-Rescue (SAR)¡¤ªººÏ¤ù¸Ë¸m©ó¦ó³B¡A¨âªÌ¦b¨t²Î¤Wªº¬Û¹ïªºÃö«Y¡C
¨º·N¿×µÛ¦pªGÀÉ®×  {\ttfamily /etc/passwd} ¬O¤@­Ó§Aªº Linux ¾÷¾¹ªºµwºÐ¤¤ªº¥[±KÀÉ®×¡£password file ¡¤¡A¦¹®É¦b³oºØ±¡ªp¡A{\ttfamily /tape144/etc/passwd} ¬O¦b³nºÐ¾÷¤Wªº¬Û¹ïÀ³ÀÉ®×¡C

§Ú¨Ï¥Î Karel Kubat ªº³Æ¥÷©R¥O½Z¡£scripts¡¤¡Aª©¥»¼Æ 1.03¡A¥i©ó¦¹³B±o¨ì
\begin{tscreen}
\nameurl{ftp://sunsite.enc.edu:/pub/Linux/system/Backup/backup-1.03.tar.gz}{}
\end{tscreen}

¦b¤å¥ó¦U³B¡A§Ú±N·|Â²³æªº´£¤Î³o¨Ç``{\ttfamily ³Æ¥÷©R¥O½Z}''¡C
§A¤£¤@©w»Ý­n¨Ï¥Î³o­Ó©R¥O½Z¨Ó³Æ¥÷§AªºªF¦è¨ìºÏ±a¾÷¤W¡C
§Ú³ßÅw³o¨Ç©R¥O½Z, ¦]¬°¥L­Ì¨Ï¥Î afio §âÀ£ÁYÀÉ¸ÑÀ£³Æ¥÷,    ¦Ó¤£¬O§âÀÉ®×À£ÁY³Æ¥÷. «eªÌ¤ñ¸û¦w¥þ, ¦]¬° restore ®É­Y¦³¤@ÂIÅª¨ú¿ù»~, ¤£·|³y¦¨©Ò¦³ÀÉ®×´_­ì¥¢±Ñ¡C§ÚÅ¥»D Karel ¤£¦A¤ä´©¡£supporting¡¤ÀÉ®×³Æ¥÷¡A¦ý²{¦b¦³²£«~ 'tob' ©ÎºÏ±a¾É¦V¡£tape oriented¡¤ªºÀÉ®×³Æ¥÷¡C
ÁöµM§Ú¦Û¤v¨Ã¥¼À|¸Õ¹L·sªº®M¸Ë³nÅé¡A¥¦¤£¥i¯à»P¦¹³Bµ{§Çªº´y­z­nÂI¦³­«­nªº®t²§¡C

©Ò¦³ªº°_ÀY¡AÀò±o ftape ¼Ò²Õ¡£module¡¤¡C¥¦¬O©Ò¦³²{¥N®Ö¤ßªº¤@³¡¥÷¡A¦ý¦pªG§A¨Ï¥Î¸ûÂÂªº®Ö¤ß¡A§A¥i¥H¦b¦¹³B§ä¨ì³o­Ó¼Ò²Õ¡G
\begin{tscreen}
\nameurl{ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/ftape-2.05.tar.gz}{}
\end{tscreen}

±µ¤U¨Ó¡A¨ú±o Slackware ¶}¾÷ºÏºÐ
¡£§Ú¨Ï¥Îºô¸ôºÏºÐ¡A¦ý³o¨S¤°»ò¤£¦P¡¤»P {\ttfamily tape144} ®ÚºÏºÐ¡A´£¨ÑÂ½ª©¡£the images ¡¤¦³Ãö 3{\tt\char`\"}1/2 ³nºÐ¾÷¡C

­n¥Î ftape ³o­Ó¼Ò²Õ¡A¥¦ªºª©¥»¤@©w­n©M§A¦b½sÄ¶ ftape ®É¥Îªº¨º­Ó®Ö¤ßªºª©¥»¤@¼Ë¤~¦æ¡C
§Ú¤£¯à¦b {\ttfamily tape144} ®ÚºÏºÐ¡£ root disk¡¤¨Ï¥Î {\ttfamily ftape.o} ¼Ò²Õ¡A§Ú·Q¬O¦]¬°¸Ó¼Ò²Õ¬°²Å¸¹¡£symbols ¡¤©Ò­é¹Ü¡£stripped ¡¤¦Ó¨S¦³¦w¸Ë¡C©Ò¥H§A²{¦b¥²¶·¦Ûºô¸ô¨ú±o¤ä´© ftape ·s {\ttfamily ftape.o} ªº·s®Ö¤ß¡£¦pªG§A¨Ï¥ÎÂÂªº®Ö¤ß¡¤¡C
¸ÔÅªÀH {\ttfamily ftape} ÀÉ®×¶Ç°eªº«ü¤Þ¨Ó«ü¾É¦¹¶¥¬q¡C
°O¦í¡A§A©Ò½sÄ¶ªº®Ö¤ß¥²¶·¤ä´© Linux »P MS-DOS ¨â¥x¾÷¾¹ªº¤A¤Óºô¸ô¥d¡C

½Æ»s¸û·sªº®Ö¤ß°Æ¥»ÂÐ»\ºô¸ô¶}¾÷ºÏºÐ¤Wªº¡C
¨Ï¥Î {\ttfamily /bin/cp}¡A¦Ó«D§Q¥Î ``{\ttfamily dd}'' ©R¥O«Ø¥ß¤@­Ó¶}¾÷ºÏºÐ¡A¦p¦P§A«Ø¥ß¤@­Ó¥i¶}¾÷ªº®Ö¤ß°Æ¥»¡£kernel image¡¤¡C
±N¶}¾÷ºÏºÐ¼g¤W«OÅ@¡A¼Ð¥Ü¥¦¬° SAR\#1¡C

²{¦b¡A¸Ë¤W {\ttfamily tape144} ®ÚºÏºÐ¡C
§Ú±N°²³]¸Ë³]ªºÂI¦b {\ttfamily /tape144}¡A¨ÓÁ×§KÀÉ®×¦WºÙªº²V²c¡C
§Ú­Ì»Ý­n¥hÄÀ©ñ¥¦ªº¤@¨ÇªÅ¶¡¡A©Ò¥H§R°£±µ¤U¨ÓªºÀÉ®×¡G
\begin{tscreen}
\begin{verbatim}
/tape144/bin/dialog
/tape144/bin/elvis
/tape144/bin/vi
/tape144/boot/ftape.o
\end{verbatim}
\end{tscreen}


²{¦b¡A«Ø¥ß¤@­Ó·sÀÉ®×¡G
\begin{tscreen}
\begin{verbatim}
/tape144/etc/exports
\end{verbatim}
\end{tscreen}

¥¦±N¥]¬A±µ¦p¤Uªº¤@¦æ¡G
\begin{tscreen}
\begin{verbatim}
/mnt    msdos(ro)
\end{verbatim}
\end{tscreen}

¦¹³Bªº ``{\ttfamily msdos}'' À³¸Ó­n¥H¦³¦w¸ËºÏ±a¾÷ªº MS-DOS ¾÷¾¹ªº¦W¦r©Î IP\# ¨Ó¨ú¥N¡C

µM«á¡A¦p¦¹§A¤£»Ý­n¥h¨Ì¿à©m¦W¦øªA¾¹¡£name server¡¤¡A¥[¤J´X¦æ Linux »P MS-DOS ¾÷¾¹ªº¦W¦r»P IP ¸¹½X¨ìÀÉ®× {\ttfamily /tape144/etc/hosts}¡C
Á|¨Ò¨Ó»¡¡A§Úªº¥]¬A¦p¤Uªº¨â¦æ¡G
\begin{tscreen}
\begin{verbatim}
128.100.75.114  caliban.physics.utoronto.ca caliban caliban.physics
128.100.75.111  ariel.physics.utoronto.ca ariel ariel.physics
\end{verbatim}
\end{tscreen}


²{¦b¡A¦³¤@¨ÇÃö©ó inetd °t¸m¡£configuration¡¤³oÃþªº°ÝÃD¡C§Ú­Ì¦b¥¦¤¤¿é¤J rsh daemon §¹¾ãªº¸ô®|¡C
§ïÅÜ {\ttfamily /tape144/etc/inetd.conf} ¤¤²Ä¤Q¤E¦æ¦¨¬°¡G
\begin{tscreen}
\begin{verbatim}
shell   stream  tcp     nowait  root    /usr/etc/tcpd   /usr/etc/in.rshd
\end{verbatim}
\end{tscreen}


¥[¤J§½³¡ºô¸ô¡£local net ¡¤³q°T¸ô®|¸ê°T¨ì {\ttfamily /tape144/etc/rc.d/rc.inet1}¡AÅý MS-DOS ªº¾÷¾¹¯à¨Ï¥Îºô¸ô¡C
³o®æ¦¡¡£format ¡¤¨Ì¾a§Aªººô¸ô°t¸m¦Ó©w¡A§A¥i¥H¦Û§Aªº Linux ¤¤ {\ttfamily /etc/rc.d/rc.inet1}½Æ»s¥X¾A·íªº®æ¦¡¡C
¦b§Úªººô¸ô¡A»Ý­n³Q¼W¥[¤@¦æ¡G
\begin{tscreen}
\begin{verbatim}
/etc/ifconfig eth0 128.100.75.111 broadcast 128.100.75.0 netmask 255.255.255.0
/etc/route add -net 128.100.75.0 netmask 255.255.255.0
\end{verbatim}
\end{tscreen}

¦b¶i¤J ifconfig  ªº IP\# ¬O MS-DOS ¾÷¾¹ªº¨º­Ó¡C

²{¦b¡A½Æ»s³o­ÓÀÉ®×¨ì {\ttfamily /tape144/etc/rc.d/rc.inet1-l}¡A¨Ã¥B¦b·sªºÀÉ®×§ïÅÜ IP\# ¦b¦¹ÀÉ®×¤¤¥i¤ÏÀ³¦¹¬° Linux ¾÷¾¹¦Ó    ¤£¬O MSDOS ¾÷¾¹.

¦A¨Ó¡A°Å¤U {\ttfamily /tape144/etc/rc.local}¤¤ªº²Ä 3 ¨ì²Ä 11 ¦æ¡C
¨º¬O­Ó°õ¦æÀÉ®× {\ttfamily rc.inet*} ªº«ü¥O¡C
§Ú­Ì¤£§Æ±æ³o¨Æ¦b¶}¾÷ªº®É­Ôµo¥Í¡C

«Ø¥ß¤@­Ó·sªºÀÉ®×¡G{\ttfamily /tape144/root/.rhosts} ¥]¬A¦¹¦æ¡G
\begin{tscreen}
\begin{verbatim}
linux root
\end{verbatim}
\end{tscreen}

¦¹³B¡A¦A¤@¦¸ªº¡A ``{\ttfamily linux}''  ¥Nªí´À¥N©Ò¦³ªº¾÷¾¹¦WºÙ¡£¥]¬A»â°ì¡£domain¡¤¡¤©Î Linux ¾÷¾¹ªº IP\#¡C

¦b {\ttfamily /tape144/etc/passwd} ªº±K½X°Ï°ì¶ñ¤J±K½Xµ¹ root login,¨Ã¥B§A¦b°µ³Æ¥÷®É, Á×§K§O¤H login ¨ì MS-DOS ¾÷¾¹¡C
§A¥i¥HÂÇ¥Ñ¦Û§A Linux ¾÷¾¹ªº {\ttfamily /etc/passwd file} ½Æ»s¹ïÀ³ªº»â°ì¨Ó¹F¦¨¡C

½Æ»s /usr/bin/rsh into /tape144/usr/bin.

½Æ»s±µ¤U¨ÓªºÀÉ®×¡A¥Ñ {\ttfamily /usr/etc} ¨ì {\ttfamily /tape144/usr/etc}¡G
\begin{tscreen}
\begin{verbatim}
in.rshd
rpc.mountd
rpc.nfsd
rpc.portmap
services
tcpd
\end{verbatim}
\end{tscreen}


«Ø¥ß¤@­Ó·sªº©R¥O½Z ¢w¢w {\ttfamily /tape144/bin/tapesetup}¡A¥¦¥Ñ±µ¤U¨Óªº©Ò²Õ¦¨¡G
¡£§ïÅÜ ``{\ttfamily linux}'' ¹ïÀ³¦¨¬°§Aªº Linux ¾÷¾¹ªº¦W¦r¡¤¡C
\begin{tscreen}
\begin{verbatim}
#! /bin/sh

/bin/sh /etc/rc.d/rc.inet1
/bin/sh /etc/rc.d/rc.inet2

/bin/mount linux:/nfs /mnt
/bin/insmod /mnt/ftape.o
\end{verbatim}
\end{tscreen}

ª`·N¡I³Ìªñªº®Ö¤ß±N¤£»Ý­n insmod ³o¦æ¡C

±µ¤U¨Ó¡A«Ø¥ß¥t¥~¤@­Ó·sªº©R¥O½Z ¢w¢w {\ttfamily /tape144/bin/msdosset}¡A¤º®e¦p¤U¡G
¡£§ïÅÜ ``{\ttfamily linux}'' ¹ïÀ³¦¨¬°§Aªº Linux ¾÷¾¹ªº¦W¦r¡¤¡C
\begin{tscreen}
\begin{verbatim}
#! /bin/sh 

/bin/sh /etc/rc.d/rc.inet1
/bin/sh /etc/rc.d/rc.inet2

mount linux:/mnt /mnt
/bin/insmod /mnt/ftape.o
\end{verbatim}
\end{tscreen}

¦p¦P¤W­zªº¡A·sªº®Ö¤ß±N¤£»Ý­n insmod ³o¦æ¡C

«Ø¥ß¤@­Ó©öÅªªºÀÉ®× ¢w¢w {\ttfamily /tape144/root/notes}¡A¥¦¥]¬A¥Î¨Ó§¹¥þ´_­ì®É¦¹³B©Ò¦Cªº¦³¥Î¸ê°T¡G
\begin{tscreen}
\begin{verbatim}
¬°¤F§¹¥þ´_­ì¤@­Ó©U§£µwºÐ¡A¨Ï¥Î SAR ºÏ¤ù #1 »P #2 ¨Ó±N§Aªº Linux ¾÷¾¹¶}¾÷¡AµM«á¦p¤U¿é¤J¡G

   /bin/sh /etc/rc.d/rc.inet1-l
   /bin/sh /etc/rc.d/rc.inet2

   /usr/etc/rpc.portmap
   /usr/etc/rpc.mountd
   /usr/etc/rpc.nfsd

±µ¤U¨Ó¡A´¡¤J SAR disk #3 ¥B¿é¤J¡G

   mount /dev/fd0 /mnt

«Ø¥ß¤@­Ó·sªº¦w¸ËÂI¡£mount point¡¤¡A¥H¡G

   mkdir /mnt2

¨Ã¦w¸Ë¡£mount ¡¤§Aªº Linux µwºÐ¤À³Î°Ï¦b³o­Ó ÂI¡£point¡¤¤W¡C
­º¥ý§A¥i¯à»Ý¥h­«·s®æ¦¡¤Æ¡£reformat ¡¤¤À³Î°Ï¡C¦pªG¦p¦¹¡A¨Ì´`°O­z¦b Linux ¦w¸Ë HOWTO¡£Linux Installation HOWTO¡¤¤¤ªº¤èªk¡C
SAR ºÏ¤ù¥]¬A¤F©Ò¦³°õ¦æ­«·s®æ¦¡¤Æ®É©Ò»ÝªºÀÉ®×¡C

³Ì«á¡A¨Ï¥ÎºÏ¤ù SAR#1 »P SAR#2 ±N MS-DOS ¾÷¾¹¶}¾÷¡A¨Ã¥B¦b¨º­Ó¾÷¾¹¤W°õ¦æ /bin/msdosset ©R¥O½Z¡C
¥¦¥i¯à»Ý­n¯Ó¶O¤@ÂI®É¶¡¥h°õ¦æ¨º­Ó©R¥O½Z¡A¦]¬°¥¦¥²¶·¥Ñ³nºÐ¾÷¤W¨ú±o NSF ÀÉ®×¡A©Ò¥H½Ð§Ô­@¤ù¨è¡C
²{¦b¡A¦b Linux ¾÷¾¹¤W¥ÑºÏ±a¾÷­««Ø /mnt2¡C
\end{verbatim}
\end{tscreen}


¦pªG§A¨Ï¥Î³Æ¥÷©R¥O½Z¡£backup scripts ¡¤¡A§A±N¥²¶·½Æ»s 'afio' ¨ì {\ttfamily /tape144/local/bin} ¤l¥Ø¿ý¡C
¦¹³Æ¥÷©R¥O½ZÀÉ®×¤£»Ý­n¦b­««ØªººÏºÐ¤W¦³¼È¦sªÅ¶¡¡AÀÉ®×¡£archive ¡¤¥i¥H¶È¨Ï¥Î 'afio' and 'gzip' ´N¥i¥H­««Ø¡C

·í¥¦­Ì°e¨Ó®É¡A§ÚÁÙ¤£·|¨Ï¥Î³Æ¥÷©R¥O½Z¡C
³o­ÓºÏ±a³Æ¥÷¦ü¥G§¹¾ãµL¯Ê ,¦ýµLªk´_­ì(±Ï¦^)¡C§Úµo²{¤É¯Å°Ï¶ô®e¶q¡£block size ¡¤»PÂàÅÜ«ü¥O¨Ó­×¥¿¥¦¡C
³o¸Ì©Ò¥Üªº¬O ``{\ttfamily netbackup}'' ©R¥O½Zªº¤ù¬q¡C
§Q¥Î³o­Ó­×¸Éµ{¦¡¨Ó§ó§ï Linux ¾÷¾¹µwºÐ¤Wªº©M SAR ºÏºÐ¤Wªº netbackup µ{¦¡¡C
\begin{tscreen}
\begin{verbatim}
*** netbackup.orig      Mon Jan  9 17:22:32 1995
--- netbackup   Mon Jan  9 17:23:25 1995
***************
*** 35,41 ****
                  "'mknod", devname, "p'");
      exec ("su -", USERNAME, "-c",
                  "'rsh ", REMOTE_HOST, 
!                       "\"dd", "of=" REMOTE_DEVICE, "obs=20k", "conv=sync\"",
                        "<", devname,
                "'&"
         );
--- 35,41 ----
                  "'mknod", devname, "p'");
      exec ("su -", USERNAME, "-c",
                  "'rsh ", REMOTE_HOST, 
!                       "\"dd", "of=" REMOTE_DEVICE, "\"",
                        "<", devname,
                "'&"
         );
***************
*** 50,56 ****
                  "'mknod", devname, "p'");
      exec ("su", USERNAME, "-c", 
                  "'rsh ", REMOTE_HOST, 
!                       "\"dd", "if=" REMOTE_DEVICE, "ibs=20k", "conv=sync\"",
                        ">", devname,
                "'&"
         );
--- 50,56 ----
                  "'mknod", devname, "p'");
      exec ("su", USERNAME, "-c", 
                  "'rsh ", REMOTE_HOST, 
!                       "\"dd", "if=" REMOTE_DEVICE, "\"",
                        ">", devname,
                "'&"
         );
\end{verbatim}
\end{tscreen}


§A²{¦b§¹¦¨§Aªº SAR ºÏ¤ù \#2¡C
½Ð¥[¤W¨¾¼g«OÅ@¡C

±µ¤U¨Ó¡A´¡¤J¤@­Ó°®²bªº¡B®æ¦¡¤Æ§¹¦¨ªººÏ¤ù¡£§Q¥Î {\ttfamily fdformat} »P {\ttfamily mkfs} ¨Ó«Ø¥ß¡¤¡C
½Æ»s {\ttfamily ftape.o} ÀÉ®×¨ìºÏ¤ù¤W¡A¨Ã¥B¼Ð¥Ü¬° SAR\#3¡C
¦pªG§A¹ï¦¹ºÏ¤ù±Ä¥Î¨¾¼g«OÅ@¡A¦]µÛ¬Y¨Ç²z¥Ñ¡A¨Æ±¡±N·|ÅÜÁV¡C
©Ò¥H½ÐÅý¥¦¥i¥H¼g¤J¡C

¦b Linux ¾÷¾¹¤W¡A¬° NFS ÀÉ®×ªA°È«Ø¥ß¤@­Ó·sªº¥Ø¿ý¡C
§Ú«Ø¤F¤@­Ó¥Ø¿ý¡G
\begin{tscreen}
\begin{verbatim}
/nfs
\end{verbatim}
\end{tscreen}

±N {\ttfamily ftape.o} ¡£unstripped¡A¬ù 500+ kB¡¤¡A¦Ü¦¹¤l¥Ø¿ý¡C
¦b§Aªº Linux ªº¿é¥XÀÉ®× {\ttfamily /etc/exports} ¤W«Ø¥ß¤@­Óµn¿ý¡£entry ¡¤¡G
\begin{tscreen}
\begin{verbatim}
/nfs    msdos(ro)
\end{verbatim}
\end{tscreen}

ª`·N¡I§Aªº NFS ¥Ø¿ý»P¨ä¤l¥Ø¿ýªº©Ò¦³ÀÉ®×§¡¬°«D¦w¥þªº¡C
¬Y¨Ç¤H¤]¯à°÷§Q¥Î¥L¦Û¤vªº¶}¾÷ºÏ¤ù¨Ó¶}±Ò MS-DOS ¾÷¾¹¶i¤J Linux ¨Ã  mount ³o­Ó¥Ø¿ý¡C
¦p¦¹¤@¨Ó¡A§A¤£­n©ñ¸m¥ô¦ó±Ó·PªºªF¦è¦b§Aªº NFS ¤l¥Ø¿ý¡C

­«·s±Ò°Ê§Aªº NFS ¾n¯dµ{¦¡¡£daemons¡¤{\ttfamily rpc.mountd} »P {\ttfamily rpc.nfsd}¡C
¥¦­Ì¦ü¥GµLªk¥Î {\ttfamily SIGHUP} ­«·s±Ò°Ê¡A©Ò¥H§R°£¥¦­ÌµM«á¦A­«·s¤Þ¥Î¡£reinvoke ¡¤¥¦­Ì¡C
¦pªG§A¨Ã¤£¬O¨Ï¥Î³o¨Ç¾n¯dµ{¦¡¦b§Aªº {\ttfamily /etc/rc.d/rc.inet2}¡A§A²{¦b©Î³\­n¥h¥Î¥¦¡C

¦n¤F¡A²{¦b§Ú­Ì§¹¦¨¤F³Æ¥÷»P­««Ø©Ò¦³ªº³]©w¡C
§¹¥þ³Æ¥÷ Linux ¾÷¾¹¡A§Q¥Î SAR\#1 ¨Ó¶}±Ò§Aªº MS-DOS ¾÷¾¹¡C
·í¥X²{²Ä¤G¤ùªº´£¥Ü®É¡A©ñ¤J SAR\#2 Åª¨ú¡C
¨Ï¥Î root µn¿ý¡A°õ¦æ©R¥O½Z¡G{\ttfamily /bin/tapesetup}¡C
µn¥X MS-DOS ¾÷¾¹¡C
¦pªG§A¨Ï¥Î³Æ¥÷©R¥O½Z¡A«hµ{¦¡ netbackup ²{¦b±N·|¹B§@¡C
§A¤]¥i¥H¨Ï¥Î ``{\ttfamily -f msdos:/dev/ftape}'' ±Ò°Ê GNU {\ttfamily tar}¡B{\ttfamily cpio} ©Î {\ttfamily mt}¡A¨Ã§Q¥Î¦¹ªk»s§@§Aªº³Æ¥÷¡C
¦pªG§A¾Ö¦³³Æ¥÷µ{¦¡¡A¦ý¥¦¶È¥i¥H¼g¦¨§½³¡ÀÉ®×¡£local file¡¤¡A¦p¤U¾Þ§@¡C
°²©w¸Ó³Æ¥÷µ{¦¡³QºÙ¬°``{\ttfamily §½³¡³Æ¥÷¡£localbackup¡¤}'' ¡A¼g¤JªºÀÉ®×ÂÇ¥Ñ¸Óµ{¦¡©R¥O¦Cªº¤Þ¼Æ¡£argument¡¤¨Óªí¥Ü¡G
\begin{tscreen}
\begin{verbatim}
mknod /tmp/tapepipe p
rsh msdos dd of=/dev/ftape < /tmp/tapepipe &
localbackup /tmp/tapepipe
\end{verbatim}
\end{tscreen}

·í¥¦§¹¦¨¡A§R°£ {\ttfamily /tmp/tapepipe}¡C

´_­ì¨ì¤@­Ó¬¡ªº¡£live ¡¤Linux ¾÷¾¹¡G
{\ttfamily netbackup} ©R¥O½Z¡B{\ttfamily tar}¡B{\ttfamily cpio} »P¨ä¥L¬Û¦üªº¦b°£¤F³¡¤À¾Þ§@ªÌ¨Ï¥Îªº¯S§O°Ê§@¥~±N¥i§¹¦¨¥þ³¡ªº¤u§@¡C
¦pªG§A¾Ö¦³¤@­Ó³Æ¥÷µ{¦¡¡A¦ý¥¦¶È¯à¼g¨ì§½³¡ÀÉ®×¡£local file¡¤¡A
°õ¦æ¡G
\begin{tscreen}
\begin{verbatim}
mknod /tmp/tapepipe p
rsh -n msdos dd if=/dev/ftape >> /tmp/tapepipe &
localrecovery /tmp/tapepipe
\end{verbatim}
\end{tscreen}

§R°£ {\ttfamily /tmp/tapepipe} ¦b§A§¹¦¨¤§«á¡C

¯d¤ß§Ú¨Ï¥Î '{\ttfamily rsh}' ¦¨¬°¦b MS-DOS ¾÷¾¹¤Wªº°ò¥»¨Ï¥ÎªÌ¡C
¤@­Ó¥¿½Tªº {\ttfamily .rhosts} ¶µ¥Ø¥i¥H¤u§@¥¿±`¡C
³o­Ó¦b '{\ttfamily tape144}' ºÏºÐ¤Wªº°t¸m­ã³\ {\ttfamily rsh} ¦¨¬°¤@­Ó root¡A¦ý¤£­ã³\ {\ttfamily telnet} ©Î {\ttfamily rlogin} ¦¨¬° root¡A±±¨î¥x¡£console¡¤ªºµn¤J¬O³Q­­¨îªº¡C
¦p¦¹¦³¯q©ó¦w¥þ©Ê¡C

¦pªG§A¾á¤ß°òÂ¦ªº {\ttfamily .rhost} ÀÉ®×¡A§A¥i¥H«Ø¥ß¤@­Ó·sªº¨Ï¥ÎªÌ ``{\ttfamily tapeuser}'' ¦b SAR\#2 ¤W¡A¥H­ã³\¨Ó¾Þ§@ºÏ±a¾÷¦ý¨Ã«DºÏºÐ¡£«Ø¥ß¤@­Ó·sªº¸s²Õ¡£group ¡¤¨Ã±N tapeuser ¸m©ó¸Ó¸s²Õ¡AµM«á {\ttfamily chown} »P {\ttfamily chmod} ÀÉ®× {\ttfamily /dev/rft*} »P
{\ttfamily /dev/nrft*}¡¤¡C
§Aªº³Æ¥÷µ{¦¡·í®ÉÀ³¸Ó¯à¤F¸Ñ {\ttfamily rsh} ³o­Ó¦W¦r¬Û¸û©ó root §ó¾A¦X¡C
·íµM¥Ø«e±o¦³¤@­Ó {\ttfamily .rhosts} ÀÉ®×¦b {\ttfamily \~{}tapeuser} ¦b SAR\#2¡C
¦b§Ú¦Û¤vªº¨Ï¥Î¡A¬Û¸û©ó¤@­Ó°òÂ¦ {\ttfamily .rhosts} §Ú·|¿ï¾Ü¦¹ºØ¤èªk¡C

²×©ó¡A³o¥÷¤å¥ó¶êº¡ªº´_­ì¤@­Ó©U§£µwºÐ¡C
°²©w²{¦b Linux ¤À³ÎÁÍ¶Õ§¹¥þ¤£¯à´_­ìªº¡C
¦pªG¦³»Ý­n¡A¹³ Linux ¦w¸Ë HOWTO¤W»¡ªº­«·s®æ¦¡¤Æ¸Ó¤À³Î°Ï¡C
¦Û SAR ºÏ¤ù \#1 ±Ò°Ê Linux ¾÷¾¹¡A·í¥X²{´£¥Ü¡A´¡¤JºÏ¤ù \#2¡C
²{¦b¡A¨Ì´`¦bÀÉ®× {\ttfamily /root/notes} ¤¤ªº±Ô­z¡£³o¸Ì¬O {\ttfamily /tape144/root/notes} ¡A¦b·í¥¦³Q¦w¸Ë¤W§Aªº Linux ¾÷¾¹®É¡¤¡C
¤@¦ý¨â¥x¾÷¾¹³£³Q±Ò°Ê§¹¦¨¡A°õ¦æ§A»Ý­nªº´_­ìºD¨Ò¡£ recovery routine ¡¤¡C
¦pªG§A¬O¨Ï¥Î³Æ¥÷©R¥O½Z¡A§A¥i¥H¦p¤U¾Þ§@¡G
\begin{enumerate}
\item §ïÅÜ§A±N«ì´_ªºµwºÐ¦w¸ËÂIªº«ü«n¡£directory ¡¤¡C
\item ¦pªG¥ô¤@ mounted volumnes ¤w¦b¦¹³Æ¥÷¤W, ¦Ó§A·Q§â¥¦­Ì´_­ì¡A§A¥u­n¦bµwºÐ¤W«Ø¤@¨Ç mount point, µM«á§â³Æ¥÷ mount ¦b³o¨Ç mount point ¤W¡C
\item ¿é¤J©R¥O¡G
\begin{tscreen}
\begin{verbatim}
rsh -n msdos dd if=/dev/ftape | afio -i -v -Z -c 1024 -
        
\end{verbatim}
\end{tscreen}

or
\begin{tscreen}
\begin{verbatim}
rsh -n -l tapeuser msdos dd if=/dev/ftape | afio -i -v -Z -c 1024 -
        
\end{verbatim}
\end{tscreen}

©Î
\begin{tscreen}
\begin{verbatim}
mknod /tmp/backpipe p
rsh -n msdos dd if=/dev/ftape >> /tmp/backpipe &
afio -i -v -Z -c 1024 /tmp/backpipe
        
\end{verbatim}
\end{tscreen}
\end{enumerate}

³o¸Ì¬OÅª¨ú¦b»·¤è¾÷¾¹¤WªººÏ±a¾÷¡A±Nµ²ªG¼g¨ì stdout¡A¨º¬O {\ttfamily afio} ©ÒÂI¨úªº¦a¤è¡C
'{\ttfamily -i}' °Ñ¼Æ§i¶D¥¦¥Î¬Û¹ï©ó'¥Ø«e¥Ø¿ý'¨Ó recover    ¡£¦¹³B¬OµwºÐ¤À³Î°Ïªº®Ú¥Ø¿ý¡¤¡C
'{\ttfamily -v}' ¬O«Ü¤¾ªøªº¡A¦C¥X¥¦­Ì´_­ìªºÀÉ®×²M³æ¡C
'{\ttfamily -Z}' §i¶D afio ¡A¦¹¬°¤@­Ó¦U§OªºÀ£ÁYÀÉ®×¡C
'{\ttfamily -c 1024}' §i¶D¥¦¨Ï¥Î 5 MB ªº¬y°Ê½w½Ä°Ï¨ÓÁ×§K¤Ó¦hªººÏ±aÂà¦^°Ê§@¡C


\section{³Æ§Ñ¿ý}

¦b {\ttfamily /tape144/root/notes} ÀÉ®×¤¤¦C¥Xªº©R¥O¥i¥H¦b©R¥O½Z¤W°õ¦æ¡C
·í§Ú¦bÀ|¸Õªº®É­Ô¡A§Ú±o¨ì rpc ³]©w¿ù»~¡C
§Ú²q·Q¥¦¥u¬O©R¥O°õ¦æªº¤Ó§Ö¡Aportmapper ¦Û¤v¨S¦³¾A·íªº¦w¸Ë§¹¦¨¡C
§Úµo²{¤â°Ê¿é¤J¶¶§Ç¡£sequence ¡¤ªº¤u§@±¡§Î¨}¦n¡A©Ò¥H§Ú±ÀÂË¦p¦¹¡C

§Ú·Q³o¬O¤@­Ó¦w¥þªº³]©w¤èªk¡C
¦³¤H¤´¥i¥H¦b§A¨ú¥XºÏ±a«e, ¥ý¤@¨B§âºÏ±a¨ú¥X±N©Ò¦³ÀÉ®×Åª¥X.    ¹ï©ó­«µø¸ê®Æ¾÷±Kªº¤H·|¦Ò¼{³Æ¥÷¸ê®Æ¬yªº¥[±K.
¤]´N¬O»¡, ­ì³Æ¥÷ªº¿é¥X pipe ¨ì¥[±Kµ{¦¡¦A§â¥[±Kµ{¦¡ªº¿é¥X°e¨ì    ¤§«e©Ò»¡ªº {\ttfamily /tmp/tapepipe}.
¦ý¬O­n¦í·N, ³o­Ó¥[±Kªº³Æ¥÷¦b´_­ì¹Lµ{¤¤ªº¿ù»~¡A±N¾É­P¦b¸ÓÂI¤§    «áªº©Ò¦³ÀÉ®×µLªk´_­ì, ¦]¬°¸Ó³Æ¥÷¬O¤@­Ó¿W¥ßªº DES ¥[±K¸ê®Æ¬y¡C
§Ú­Ì¤]¥i¥H¥Î afio ªº¿ï¶µ, ¥ý§â¨C­ÓÀÉ®× gzip ¦A°µ¥[±K. ¦ý³oºØ
¥ýÀ£ÁYªº§@ªk·|¾É¦Ü¤@°ï¤wª¾ªº¦r¦ê(gzip ¹L·|¦³©T©w header), ¤ñ
¸û®e©ö³Q¯}¸Ñ. ©Ò¥H¤ñ¸û¦nªº§@ªk¬O¸õ¹L gzip, ª½±µ°µ DES ¥[±K,    ¥N»ù¬O»Ý­n¸û¦hªººÏ±aªÅ¶¡. ¤£¥Î»¡¤]ª¾¹D, DES ¥[±K¬O¤£§@À£ÁYªº.

§Úªþ¤Wªº {\ttfamily rc.inet1} ¼gªk¥u¯à¨Ï¥Î¦b¦a°Ïºô¸ô (Local network) ¤W¡A¦Ó¤£¯à¥Î¤@­Ó Gateway ©M¥~¬É·¾³q¡C

¦b§¹¥þ«ì´_¨ìªÅ¥ÕµwºÐªº´Á¶¡¡ASAR ºÏ¤ù \#3 ´£¨Ñ {\ttfamily ftape.o} Åý MS-DOS ¾÷¾¹¬ï¹L NFS¡C
³o¬O¦]¬° {\ttfamily ftape} ¼Ò²Õ¬Y¨ÇÂÂªºª©¥»¤£¯à¦b¦³ºÏ¤ù¦b³nºÐ¾÷®ÉºÞ²z¬Y¨ÇºÏ±a¾÷¡C
¦b¸û·sªº®Ö¤ßµ{¦¡¡A©Ò¦³ªº NFS ­n¯À¡£stuff ¡¤·|³Q©¿²¤¡C

{\bfseries ³o¬O«D±`­«­nªº}¡C
{\bfseries ***´ú¸Õ***} SAR ´_­ìµ{§Ç¡C
I did, but don't leave anything to chance.
½T©w§A¥i¥H¶È¨Ï¥Î SAR ºÏ¤ù´_­ì¦Ü¤Ö¤@­ÓÀÉ®×¨ì Linux ¾÷¾¹¤W¡£¨Ò¦p¨S¦³¦w¸ËµwºÐ¡¤¡C
¦pªG§A¤£¯à­«·s±Ò°Ê Linux ¾÷¾¹¦b¤£·Ó¦¨¤Ó¦h¨Ï¥ÎªÌ¤£«Kªº±¡ªp¤U¡A§ïÅÜ¦b SAR ºÏ¤ù¤¤ªº³]©w¸ê°T¡A«ü¬£ ``{\ttfamily linux}'' ªº¨­¤À¨ì¥t¤@­Ó MS-DOS ¾÷¾¹¡AµM«á±Ò°Ê¨â­Ó MS-DOS ¾÷¾¹¶i¤J Linux ¥h½T©w§¡¥i¥¿±`¹B§@¡C
µM«á¡A±N ``{\ttfamily linux}'' ªº¨­¤À­×¥¿¦^¨Ó¡A¦p¦¹§A¾Ö¦³¤@­Ó¥i¥Îªº SAR ºÏ¤ù¡C


\section{ª©Åv}

Copyright Jan 10, 1995 by Christopher Neufeld
(\onlynameurl{neufeld@physics.utoronto.ca})

­×¥¿©ó ¤G¤ë 6, 1996.

­×¥¿©ó ¤K¤ë 5, 1997.

\end{document}
