\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 ¼ÇÊöÈçºÎÀûÓÃ Linux ÏàÈÝµÄ´Å´ø»ú°²×°ÔÚ MS-DOS µÄ»úÆ÷£¬À´±¸·Ý Linux »úÆ÷µÄµµ°¸ÏµÍ³ ( filesystem )¡£}


\begin{document}
\maketitle
\tableofcontents

\section{Ç°ÑÔ / ½éÉÜ}

ÔçÏÈÎÒÔÚÍøÉÏÌá³öÈçºÎÓÃ Colorado Jumbo 250 ´Å´ø»ú£Ûtape drive£ÝÔÚ MS-DOS µÄ»úÆ÷ÉÏ±¸·Ý Linux »úÆ÷Õâ¸öÎÊÌâ¡£´ÓÎÒËù»ØÊÕµÄµç×ÓÓÊ¼þÖÐÏÔÊ¾£¬ÕâÊÇÒ»¸ö¾­³£±»Ë¼¿¼µÄÎÊÌâ¡£ÏÖÔÚÎÒ½«ËüÕûÀíáá£¬¹«²¼×÷·¨¡£Èç¹ûÓÐÈÎºÎÈËÏëÒª°ÑÕâ¸ö·ÅÈë HOWTO ÎÄ¼þÖÐ£¬ÇëÈÃÎÒÖªµÀ¡£
ÎÒÒª¸ÐÐ» Jim Nance
£Û\onlynameurl{jlnance@isscad.com}£Ý
Ö¸³ö MS-DOS µÄ»úÆ÷²»Ò»¶¨×ÜÊÇ¸ö MS-DOS µÄ»úÆ÷¡£Õâ¸ö·½·¨Ó¦¸ÃÒ²¿ÉÒÔÔËÓÃÔÚÈÎºÎÆäËû±» ftape Ä£Ê½ËùÖ§Ô®µÄ´Å´ø»ú£¬¼°ÓÉì¶ÊÊµ±Ã÷ÏÔ¸Ä±äµÄ SCSI ´Å´ø»ú
£ÛÀýÈçÌæ»» /dev/st0 for /dev/ftape£Ý¡£

ÎÒËùÉè¶¨µÄ±ê×¼£Ûcriteria£ÝÊÇÆðÔ´ì¶Éè¶¨Ó¦¸Ã¾¡Á¿°²È«ÓëÏàµ±¼òµ¥£¬²¢Ö»Õ¼ÓÃÒ»µã»òÎÞÐëMS-DOS »úÆ÷ÉÏµÄÓ²µú¿Õ¼ä¡£ËüÓ¦¸ÃÒ²ÄÜ¸´Ô­×îÔãµÄÏµÍ³Çé¿ö£¬ÉõÖÁ°üÀ¨Ó²µúµÄÒÅÊ§£¬»òÐèÒª»Ö¸´Îª×îÔ­Ê¼µÄ Linux µµ°¸ÏµÍ³¡£ÔÚ´Ë¼ÇÊöµÄ·½·¨ÎÞÐëÊ¹ÓÃ MS-DOS »úÆ÷µÄÓ²µú¿Õ¼ä£¬¿ÉÊÇÄÇ»úÆ÷ÐèÒª±»Ö¸¶¨£Ûassigned £ÝÒ»¸ö IP\#¡£Äã½«ÐèÒªÈýÆ¬ÒÑ¸ñÊ½»¯µÄ1.44 MB ÈíÊ½´ÅµúÆ¬¡£


\section{·½·¨}

ÔÚÕâ·ÝÎÄ¼þµÄ¸÷´¦£¬ÎÒ½«»áÌáµ½Á½¸ö»úÆ÷Èç ``{\ttfamily msdos}'' Óë ``{\ttfamily linux}''¡£``{\ttfamily msdos}''  ÊÇ»úÆ÷µÄÃû³Æ£¬Ëü±ØÐëÓµÓÐÒ»¸ö´Å´ø»ú£¬¶øÍ¨³£Ö´ÐÐ MS-DOS¡£``{\ttfamily linux}''  ÊÇÄã¡õÊÔÈ¥½åÓÉ´Å´ø»úÀ´±¸·Ý»ò»Ö¸´ËüµÄ´ÅµúµÄ Linux »úÆ÷¡£
Îª¼òµ¥Æð¼û£¬ÎÒ½«µÚÒ»²¿»úÆ÷³Æ×ö {\ttfamily msdos}'' ¼´Ê¹ËüÔÚÖ´ÐÐ Linux¡£
´ËÍâ£¬ËùÓÐÎÄ¼þÖÐµÄÂ·¾¶£Ûpath£ÝÃû³ÆÓ¦¸Ã¼ÓÒÔ¿¼ÂÇ Linux »úÆ÷ÓëËÑÑ°¼°¾ÈÔ®£ÛSearch-And-Rescue (SAR)£ÝµÄ´ÅÆ¬×°ÖÃì¶ºÎ´¦£¬Á½ÕßÔÚÏµÍ³ÉÏµÄÏà¶ÔµÄ¹ØÏµ¡£
ÄÇÒâÎ½ÖøÈç¹ûµµ°¸  {\ttfamily /etc/passwd} ÊÇÒ»¸öÄãµÄ Linux »úÆ÷µÄÓ²µúÖÐµÄ¼ÓÃÜµµ°¸£Ûpassword file £Ý£¬´ËÊ±ÔÚÕâÖÖÇé¿ö£¬{\ttfamily /tape144/etc/passwd} ÊÇÔÚÈíµú»úÉÏµÄÏà¶ÔÓ¦µµ°¸¡£

ÎÒÊ¹ÓÃ Karel Kubat µÄ±¸·ÝÃüÁî¸å£Ûscripts£Ý£¬°æ±¾Êý 1.03£¬¿Éì¶´Ë´¦µÃµ½
\begin{tscreen}
\nameurl{ftp://sunsite.enc.edu:/pub/Linux/system/Backup/backup-1.03.tar.gz}{}
\end{tscreen}

ÔÚÎÄ¼þ¸÷´¦£¬ÎÒ½«»á¼òµ¥µÄÌá¼°ÕâÐ©``{\ttfamily ±¸·ÝÃüÁî¸å}''¡£
Äã²»Ò»¶¨ÐèÒªÊ¹ÓÃÕâ¸öÃüÁî¸åÀ´±¸·ÝÄãµÄ¶«Î÷µ½´Å´ø»úÉÏ¡£
ÎÒÏ²»¶ÕâÐ©ÃüÁî¸å, ÒòÎªËûÃÇÊ¹ÓÃ afio °ÑÑ¹Ëõµµ½âÑ¹±¸·Ý,    ¶ø²»ÊÇ°Ñµµ°¸Ñ¹Ëõ±¸·Ý. Ç°Õß±È½Ï°²È«, ÒòÎª restore Ê±ÈôÓÐÒ»µã¶ÁÈ¡´íÎó, ²»»áÔì³ÉËùÓÐµµ°¸¸´Ô­Ê§°Ü¡£ÎÒÌýÎÅ Karel ²»ÔÙÖ§Ô®£Ûsupporting£Ýµµ°¸±¸·Ý£¬µ«ÏÖÔÚÓÐ²úÆ· 'tob' »ò´Å´øµ¼Ïò£Ûtape oriented£ÝµÄµµ°¸±¸·Ý¡£
ËäÈ»ÎÒ×Ô¼º²¢Î´¡õÊÔ¹ýÐÂµÄÌ××°ÈíÌå£¬Ëü²»¿ÉÄÜÓë´Ë´¦³ÌÐòµÄÃèÊöÒªµãÓÐÖØÒªµÄ²îÒì¡£

ËùÓÐµÄÆðÍ·£¬»ñµÃ ftape Ä£×é£Ûmodule£Ý¡£ËüÊÇËùÓÐÏÖ´úºËÐÄµÄÒ»²¿·Ý£¬µ«Èç¹ûÄãÊ¹ÓÃ½Ï¾ÉµÄºËÐÄ£¬Äã¿ÉÒÔÔÚ´Ë´¦ÕÒµ½Õâ¸öÄ£×é£º
\begin{tscreen}
\nameurl{ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/ftape-2.05.tar.gz}{}
\end{tscreen}

½ÓÏÂÀ´£¬È¡µÃ Slackware ¿ª»ú´Åµú
£ÛÎÒÊ¹ÓÃÍøÂ·´Åµú£¬µ«ÕâÃ»Ê²÷á²»Í¬£ÝÓë {\ttfamily tape144} ¸ù´Åµú£¬Ìá¹©·­°æ£Ûthe images £ÝÓÐ¹Ø 3{\tt\char`\"}1/2 Èíµú»ú¡£

ÒªÓÃ ftape Õâ¸öÄ£×é£¬ËüµÄ°æ±¾Ò»¶¨ÒªºÍÄãÔÚ±àÒë ftape Ê±ÓÃµÄÄÇ¸öºËÐÄµÄ°æ±¾Ò»Ñù²ÅÐÐ¡£
ÎÒ²»ÄÜÔÚ {\ttfamily tape144} ¸ù´Åµú£Û root disk£ÝÊ¹ÓÃ {\ttfamily ftape.o} Ä£×é£¬ÎÒÏëÊÇÒòÎª¸ÃÄ£×éÎª·ûºÅ£Ûsymbols £ÝËù°þ¶á£Ûstripped £Ý¶øÃ»ÓÐ°²×°¡£ËùÒÔÄãÏÖÔÚ±ØÐë×ÔÍøÂ·È¡µÃÖ§Ô® ftape ÐÂ {\ttfamily ftape.o} µÄÐÂºËÐÄ£ÛÈç¹ûÄãÊ¹ÓÃ¾ÉµÄºËÐÄ£Ý¡£
Ïê¶ÁËæ {\ttfamily ftape} µµ°¸´«ËÍµÄÖ¸ÒýÀ´Ö¸µ¼´Ë½×¶Î¡£
¼Ç×¡£¬ÄãËù±àÒëµÄºËÐÄ±ØÐëÖ§Ô® Linux Óë MS-DOS Á½Ì¨»úÆ÷µÄÒÒÌ«ÍøÂ·¿¨¡£

¸´ÖÆ½ÏÐÂµÄºËÐÄ¸±±¾¸²¸ÇÍøÂ·¿ª»ú´ÅµúÉÏµÄ¡£
Ê¹ÓÃ {\ttfamily /bin/cp}£¬¶ø·ÇÀûÓÃ ``{\ttfamily dd}'' ÃüÁî½¨Á¢Ò»¸ö¿ª»ú´Åµú£¬ÈçÍ¬Äã½¨Á¢Ò»¸ö¿É¿ª»úµÄºËÐÄ¸±±¾£Ûkernel image£Ý¡£
½«¿ª»ú´ÅµúÐ´ÉÏ±£»¤£¬±êÊ¾ËüÎª SAR\#1¡£

ÏÖÔÚ£¬×°ÉÏ {\ttfamily tape144} ¸ù´Åµú¡£
ÎÒ½«¼ÙÉè×°ÉèµÄµãÔÚ {\ttfamily /tape144}£¬À´±ÜÃâµµ°¸Ãû³ÆµÄ»ìÏý¡£
ÎÒÃÇÐèÒªÈ¥ÊÍ·ÅËüµÄÒ»Ð©¿Õ¼ä£¬ËùÒÔÉ¾³ý½ÓÏÂÀ´µÄµµ°¸£º
\begin{tscreen}
\begin{verbatim}
/tape144/bin/dialog
/tape144/bin/elvis
/tape144/bin/vi
/tape144/boot/ftape.o
\end{verbatim}
\end{tscreen}


ÏÖÔÚ£¬½¨Á¢Ò»¸öÐÂµµ°¸£º
\begin{tscreen}
\begin{verbatim}
/tape144/etc/exports
\end{verbatim}
\end{tscreen}

Ëü½«°üÀ¨½ÓÈçÏÂµÄÒ»ÐÐ£º
\begin{tscreen}
\begin{verbatim}
/mnt    msdos(ro)
\end{verbatim}
\end{tscreen}

´Ë´¦µÄ ``{\ttfamily msdos}'' Ó¦¸ÃÒªÒÔÓÐ°²×°´Å´ø»úµÄ MS-DOS »úÆ÷µÄÃû×Ö»ò IP\# À´È¡´ú¡£

È»áá£¬Èç´ËÄã²»ÐèÒªÈ¥ÒÀÀµÐÕÃûËÅ·þÆ÷£Ûname server£Ý£¬¼ÓÈë¼¸ÐÐ Linux Óë MS-DOS »úÆ÷µÄÃû×ÖÓë IP ºÅÂëµ½µµ°¸ {\ttfamily /tape144/etc/hosts}¡£
¾ÙÀýÀ´Ëµ£¬ÎÒµÄ°üÀ¨ÈçÏÂµÄÁ½ÐÐ£º
\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}


ÏÖÔÚ£¬ÓÐÒ»Ð©¹Øì¶ inetd ÅäÖÃ£Ûconfiguration£ÝÕâÀàµÄÎÊÌâ¡£ÎÒÃÇÔÚËüÖÐÊäÈë rsh daemon ÍêÕûµÄÂ·¾¶¡£
¸Ä±ä {\ttfamily /tape144/etc/inetd.conf} ÖÐµÚÊ®¾ÅÐÐ³ÉÎª£º
\begin{tscreen}
\begin{verbatim}
shell   stream  tcp     nowait  root    /usr/etc/tcpd   /usr/etc/in.rshd
\end{verbatim}
\end{tscreen}


¼ÓÈë¾Ö²¿ÍøÂ·£Ûlocal net £ÝÍ¨Ñ¶Â·¾¶×ÊÑ¶µ½ {\ttfamily /tape144/etc/rc.d/rc.inet1}£¬ÈÃ MS-DOS µÄ»úÆ÷ÄÜÊ¹ÓÃÍøÂ·¡£
Õâ¸ñÊ½£Ûformat £ÝÒÀ¿¿ÄãµÄÍøÂ·ÅäÖÃ¶ø¶¨£¬Äã¿ÉÒÔ×ÔÄãµÄ Linux ÖÐ {\ttfamily /etc/rc.d/rc.inet1}¸´ÖÆ³öÊÊµ±µÄ¸ñÊ½¡£
ÔÚÎÒµÄÍøÂ·£¬ÐèÒª±»Ôö¼ÓÒ»ÐÐ£º
\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}

ÔÚ½øÈë ifconfig  µÄ IP\# ÊÇ MS-DOS »úÆ÷µÄÄÇ¸ö¡£

ÏÖÔÚ£¬¸´ÖÆÕâ¸öµµ°¸µ½ {\ttfamily /tape144/etc/rc.d/rc.inet1-l}£¬²¢ÇÒÔÚÐÂµÄµµ°¸¸Ä±ä IP\# ÔÚ´Ëµµ°¸ÖÐ¿É·´Ó¦´ËÎª Linux »úÆ÷¶ø    ²»ÊÇ MSDOS »úÆ÷.

ÔÙÀ´£¬¼ôÏÂ {\ttfamily /tape144/etc/rc.local}ÖÐµÄµÚ 3 µ½µÚ 11 ÐÐ¡£
ÄÇÊÇ¸öÖ´ÐÐµµ°¸ {\ttfamily rc.inet*} µÄÖ¸Áî¡£
ÎÒÃÇ²»Ï£ÍûÕâÊÂÔÚ¿ª»úµÄÊ±ºò·¢Éú¡£

½¨Á¢Ò»¸öÐÂµÄµµ°¸£º{\ttfamily /tape144/root/.rhosts} °üÀ¨´ËÐÐ£º
\begin{tscreen}
\begin{verbatim}
linux root
\end{verbatim}
\end{tscreen}

´Ë´¦£¬ÔÙÒ»´ÎµÄ£¬ ``{\ttfamily linux}''  ´ú±íÌæ´úËùÓÐµÄ»úÆ÷Ãû³Æ£Û°üÀ¨ÁìÓò£Ûdomain£Ý£Ý»ò Linux »úÆ÷µÄ IP\#¡£

ÔÚ {\ttfamily /tape144/etc/passwd} µÄÃÜÂëÇøÓòÌîÈëÃÜÂë¸ø root login,²¢ÇÒÄãÔÚ×ö±¸·ÝÊ±, ±ÜÃâ±ðÈË login µ½ MS-DOS »úÆ÷¡£
Äã¿ÉÒÔ½åÓÉ×ÔÄã Linux »úÆ÷µÄ {\ttfamily /etc/passwd file} ¸´ÖÆ¶ÔÓ¦µÄÁìÓòÀ´´ï³É¡£

¸´ÖÆ /usr/bin/rsh into /tape144/usr/bin.

¸´ÖÆ½ÓÏÂÀ´µÄµµ°¸£¬ÓÉ {\ttfamily /usr/etc} µ½ {\ttfamily /tape144/usr/etc}£º
\begin{tscreen}
\begin{verbatim}
in.rshd
rpc.mountd
rpc.nfsd
rpc.portmap
services
tcpd
\end{verbatim}
\end{tscreen}


½¨Á¢Ò»¸öÐÂµÄÃüÁî¸å ¡ª¡ª {\ttfamily /tape144/bin/tapesetup}£¬ËüÓÉ½ÓÏÂÀ´µÄËù×é³É£º
£Û¸Ä±ä ``{\ttfamily linux}'' ¶ÔÓ¦³ÉÎªÄãµÄ Linux »úÆ÷µÄÃû×Ö£Ý¡£
\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}

×¢Òâ£¡×î½üµÄºËÐÄ½«²»ÐèÒª insmod ÕâÐÐ¡£

½ÓÏÂÀ´£¬½¨Á¢ÁíÍâÒ»¸öÐÂµÄÃüÁî¸å ¡ª¡ª {\ttfamily /tape144/bin/msdosset}£¬ÄÚÈÝÈçÏÂ£º
£Û¸Ä±ä ``{\ttfamily linux}'' ¶ÔÓ¦³ÉÎªÄãµÄ Linux »úÆ÷µÄÃû×Ö£Ý¡£
\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}

ÈçÍ¬ÉÏÊöµÄ£¬ÐÂµÄºËÐÄ½«²»ÐèÒª insmod ÕâÐÐ¡£

½¨Á¢Ò»¸öÒ×¶ÁµÄµµ°¸ ¡ª¡ª {\ttfamily /tape144/root/notes}£¬Ëü°üÀ¨ÓÃÀ´ÍêÈ«¸´Ô­Ê±´Ë´¦ËùÁÐµÄÓÐÓÃ×ÊÑ¶£º
\begin{tscreen}
\begin{verbatim}
ÎªÁËÍêÈ«¸´Ô­Ò»¸öÀ¬»øÓ²µú£¬Ê¹ÓÃ SAR ´ÅÆ¬ #1 Óë #2 À´½«ÄãµÄ Linux »úÆ÷¿ª»ú£¬È»ááÈçÏÂÊäÈë£º

   /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

½ÓÏÂÀ´£¬²åÈë SAR disk #3 ÇÒÊäÈë£º

   mount /dev/fd0 /mnt

½¨Á¢Ò»¸öÐÂµÄ°²×°µã£Ûmount point£Ý£¬ÒÔ£º

   mkdir /mnt2

²¢°²×°£Ûmount £ÝÄãµÄ Linux Ó²µú·Ö¸îÇøÔÚÕâ¸ö µã£Ûpoint£ÝÉÏ¡£
Ê×ÏÈÄã¿ÉÄÜÐèÈ¥ÖØÐÂ¸ñÊ½»¯£Ûreformat £Ý·Ö¸îÇø¡£Èç¹ûÈç´Ë£¬ÒÀÑ­¼ÇÊöÔÚ Linux °²×° HOWTO£ÛLinux Installation HOWTO£ÝÖÐµÄ·½·¨¡£
SAR ´ÅÆ¬°üÀ¨ÁËËùÓÐÖ´ÐÐÖØÐÂ¸ñÊ½»¯Ê±ËùÐèµÄµµ°¸¡£

×îáá£¬Ê¹ÓÃ´ÅÆ¬ SAR#1 Óë SAR#2 ½« MS-DOS »úÆ÷¿ª»ú£¬²¢ÇÒÔÚÄÇ¸ö»úÆ÷ÉÏÖ´ÐÐ /bin/msdosset ÃüÁî¸å¡£
Ëü¿ÉÄÜÐèÒªºÄ·ÑÒ»µãÊ±¼äÈ¥Ö´ÐÐÄÇ¸öÃüÁî¸å£¬ÒòÎªËü±ØÐëÓÉÈíµú»úÉÏÈ¡µÃ NSF µµ°¸£¬ËùÒÔÇëÈÌÄÍÆ¬¿Ì¡£
ÏÖÔÚ£¬ÔÚ Linux »úÆ÷ÉÏÓÉ´Å´ø»úÖØ½¨ /mnt2¡£
\end{verbatim}
\end{tscreen}


Èç¹ûÄãÊ¹ÓÃ±¸·ÝÃüÁî¸å£Ûbackup scripts £Ý£¬Äã½«±ØÐë¸´ÖÆ 'afio' µ½ {\ttfamily /tape144/local/bin} ×ÓÄ¿Â¼¡£
´Ë±¸·ÝÃüÁî¸åµµ°¸²»ÐèÒªÔÚÖØ½¨µÄ´ÅµúÉÏÓÐÔÝ´æ¿Õ¼ä£¬µµ°¸£Ûarchive £Ý¿ÉÒÔ½öÊ¹ÓÃ 'afio' and 'gzip' ¾Í¿ÉÒÔÖØ½¨¡£

µ±ËüÃÇËÍÀ´Ê±£¬ÎÒ»¹²»»áÊ¹ÓÃ±¸·ÝÃüÁî¸å¡£
Õâ¸ö´Å´ø±¸·ÝËÆºõÍêÕûÎÞÈ± ,µ«ÎÞ·¨¸´Ô­(¾È»Ø)¡£ÎÒ·¢ÏÖÉý¼¶Çø¿éÈÝÁ¿£Ûblock size £ÝÓë×ª±äÖ¸ÁîÀ´ÐÞÕýËü¡£
ÕâÀïËùÊ¾µÄÊÇ ``{\ttfamily netbackup}'' ÃüÁî¸åµÄÆ¬¶Î¡£
ÀûÓÃÕâ¸öÐÞ²¹³ÌÊ½À´¸ü¸Ä Linux »úÆ÷Ó²µúÉÏµÄºÍ SAR ´ÅµúÉÏµÄ netbackup ³ÌÊ½¡£
\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}


ÄãÏÖÔÚÍê³ÉÄãµÄ SAR ´ÅÆ¬ \#2¡£
Çë¼ÓÉÏ·ÀÐ´±£»¤¡£

½ÓÏÂÀ´£¬²åÈëÒ»¸öÇ¬¾»µÄ¡¢¸ñÊ½»¯Íê³ÉµÄ´ÅÆ¬£ÛÀûÓÃ {\ttfamily fdformat} Óë {\ttfamily mkfs} À´½¨Á¢£Ý¡£
¸´ÖÆ {\ttfamily ftape.o} µµ°¸µ½´ÅÆ¬ÉÏ£¬²¢ÇÒ±êÊ¾Îª SAR\#3¡£
Èç¹ûÄã¶Ô´Ë´ÅÆ¬²ÉÓÃ·ÀÐ´±£»¤£¬ÒòÖøÄ³Ð©ÀíÓÉ£¬ÊÂÇé½«»á±äÔã¡£
ËùÒÔÇëÈÃËü¿ÉÒÔÐ´Èë¡£

ÔÚ Linux »úÆ÷ÉÏ£¬Îª NFS µµ°¸·þÎñ½¨Á¢Ò»¸öÐÂµÄÄ¿Â¼¡£
ÎÒ½¨ÁËÒ»¸öÄ¿Â¼£º
\begin{tscreen}
\begin{verbatim}
/nfs
\end{verbatim}
\end{tscreen}

½« {\ttfamily ftape.o} £Ûunstripped£¬Ô¼ 500+ kB£Ý£¬ÖÁ´Ë×ÓÄ¿Â¼¡£
ÔÚÄãµÄ Linux µÄÊä³öµµ°¸ {\ttfamily /etc/exports} ÉÏ½¨Á¢Ò»¸öµÇÂ¼£Ûentry £Ý£º
\begin{tscreen}
\begin{verbatim}
/nfs    msdos(ro)
\end{verbatim}
\end{tscreen}

×¢Òâ£¡ÄãµÄ NFS Ä¿Â¼ÓëÆä×ÓÄ¿Â¼µÄËùÓÐµµ°¸¾ùÎª·Ç°²È«µÄ¡£
Ä³Ð©ÈËÒ²ÄÜ¹»ÀûÓÃËû×Ô¼ºµÄ¿ª»ú´ÅÆ¬À´¿ªÆô MS-DOS »úÆ÷½øÈë Linux ²¢  mount Õâ¸öÄ¿Â¼¡£
Èç´ËÒ»À´£¬Äã²»Òª·ÅÖÃÈÎºÎÃô¸ÐµÄ¶«Î÷ÔÚÄãµÄ NFS ×ÓÄ¿Â¼¡£

ÖØÐÂÆô¶¯ÄãµÄ NFS ×¤Áô³ÌÊ½£Ûdaemons£Ý{\ttfamily rpc.mountd} Óë {\ttfamily rpc.nfsd}¡£
ËüÃÇËÆºõÎÞ·¨ÓÃ {\ttfamily SIGHUP} ÖØÐÂÆô¶¯£¬ËùÒÔÉ¾³ýËüÃÇÈ»ááÔÙÖØÐÂÒýÓÃ£Ûreinvoke £ÝËüÃÇ¡£
Èç¹ûÄã²¢²»ÊÇÊ¹ÓÃÕâÐ©×¤Áô³ÌÊ½ÔÚÄãµÄ {\ttfamily /etc/rc.d/rc.inet2}£¬ÄãÏÖÔÚ»òÐíÒªÈ¥ÓÃËü¡£

ºÃÁË£¬ÏÖÔÚÎÒÃÇÍê³ÉÁË±¸·ÝÓëÖØ½¨ËùÓÐµÄÉè¶¨¡£
ÍêÈ«±¸·Ý Linux »úÆ÷£¬ÀûÓÃ SAR\#1 À´¿ªÆôÄãµÄ MS-DOS »úÆ÷¡£
µ±³öÏÖµÚ¶þÆ¬µÄÌáÊ¾Ê±£¬·ÅÈë SAR\#2 ¶ÁÈ¡¡£
Ê¹ÓÃ root µÇÂ¼£¬Ö´ÐÐÃüÁî¸å£º{\ttfamily /bin/tapesetup}¡£
µÇ³ö MS-DOS »úÆ÷¡£
Èç¹ûÄãÊ¹ÓÃ±¸·ÝÃüÁî¸å£¬Ôò³ÌÊ½ netbackup ÏÖÔÚ½«»áÔË×÷¡£
ÄãÒ²¿ÉÒÔÊ¹ÓÃ ``{\ttfamily -f msdos:/dev/ftape}'' Æô¶¯ GNU {\ttfamily tar}¡¢{\ttfamily cpio} »ò {\ttfamily mt}£¬²¢ÀûÓÃ´Ë·¨ÖÆ×÷ÄãµÄ±¸·Ý¡£
Èç¹ûÄãÓµÓÐ±¸·Ý³ÌÊ½£¬µ«Ëü½ö¿ÉÒÔÐ´³É¾Ö²¿µµ°¸£Ûlocal file£Ý£¬ÈçÏÂ²Ù×÷¡£
¼Ù¶¨¸Ã±¸·Ý³ÌÊ½±»³ÆÎª``{\ttfamily ¾Ö²¿±¸·Ý£Ûlocalbackup£Ý}'' £¬Ð´ÈëµÄµµ°¸½åÓÉ¸Ã³ÌÊ½ÃüÁîÁÐµÄÒýÊý£Ûargument£ÝÀ´±íÊ¾£º
\begin{tscreen}
\begin{verbatim}
mknod /tmp/tapepipe p
rsh msdos dd of=/dev/ftape < /tmp/tapepipe &
localbackup /tmp/tapepipe
\end{verbatim}
\end{tscreen}

µ±ËüÍê³É£¬É¾³ý {\ttfamily /tmp/tapepipe}¡£

¸´Ô­µ½Ò»¸ö»îµÄ£Ûlive £ÝLinux »úÆ÷£º
{\ttfamily netbackup} ÃüÁî¸å¡¢{\ttfamily tar}¡¢{\ttfamily cpio} ÓëÆäËûÏàËÆµÄÔÚ³ýÁË²¿·Ö²Ù×÷ÕßÊ¹ÓÃµÄÌØ±ð¶¯×÷Íâ½«¿ÉÍê³ÉÈ«²¿µÄ¹¤×÷¡£
Èç¹ûÄãÓµÓÐÒ»¸ö±¸·Ý³ÌÊ½£¬µ«Ëü½öÄÜÐ´µ½¾Ö²¿µµ°¸£Ûlocal file£Ý£¬
Ö´ÐÐ£º
\begin{tscreen}
\begin{verbatim}
mknod /tmp/tapepipe p
rsh -n msdos dd if=/dev/ftape >> /tmp/tapepipe &
localrecovery /tmp/tapepipe
\end{verbatim}
\end{tscreen}

É¾³ý {\ttfamily /tmp/tapepipe} ÔÚÄãÍê³ÉÖ®áá¡£

ÁôÐÄÎÒÊ¹ÓÃ '{\ttfamily rsh}' ³ÉÎªÔÚ MS-DOS »úÆ÷ÉÏµÄ»ù±¾Ê¹ÓÃÕß¡£
Ò»¸öÕýÈ·µÄ {\ttfamily .rhosts} ÏîÄ¿¿ÉÒÔ¹¤×÷Õý³£¡£
Õâ¸öÔÚ '{\ttfamily tape144}' ´ÅµúÉÏµÄÅäÖÃ×¼Ðí {\ttfamily rsh} ³ÉÎªÒ»¸ö root£¬µ«²»×¼Ðí {\ttfamily telnet} »ò {\ttfamily rlogin} ³ÉÎª root£¬¿ØÖÆÌ¨£Ûconsole£ÝµÄµÇÈëÊÇ±»ÏÞÖÆµÄ¡£
Èç´ËÓÐÒæì¶°²È«ÐÔ¡£

Èç¹ûÄãµ£ÐÄ»ù´¡µÄ {\ttfamily .rhost} µµ°¸£¬Äã¿ÉÒÔ½¨Á¢Ò»¸öÐÂµÄÊ¹ÓÃÕß ``{\ttfamily tapeuser}'' ÔÚ SAR\#2 ÉÏ£¬ÒÔ×¼ÐíÀ´²Ù×÷´Å´ø»úµ«²¢·Ç´Åµú£Û½¨Á¢Ò»¸öÐÂµÄÈº×é£Ûgroup £Ý²¢½« tapeuser ÖÃì¶¸ÃÈº×é£¬È»áá {\ttfamily chown} Óë {\ttfamily chmod} µµ°¸ {\ttfamily /dev/rft*} Óë
{\ttfamily /dev/nrft*}£Ý¡£
ÄãµÄ±¸·Ý³ÌÊ½µ±Ê±Ó¦¸ÃÄÜÁË½â {\ttfamily rsh} Õâ¸öÃû×ÖÏà½Ïì¶ root ¸üÊÊºÏ¡£
µ±È»Ä¿Ç°µÃÓÐÒ»¸ö {\ttfamily .rhosts} µµ°¸ÔÚ {\ttfamily \~{}tapeuser} ÔÚ SAR\#2¡£
ÔÚÎÒ×Ô¼ºµÄÊ¹ÓÃ£¬Ïà½Ïì¶Ò»¸ö»ù´¡ {\ttfamily .rhosts} ÎÒ»áÑ¡Ôñ´ËÖÖ·½·¨¡£

ÖÕì¶£¬Õâ·ÝÎÄ¼þÔ²ÂúµÄ¸´Ô­Ò»¸öÀ¬»øÓ²µú¡£
¼Ù¶¨ÏÖÔÚ Linux ·Ö¸îÇ÷ÊÆÍêÈ«²»ÄÜ¸´Ô­µÄ¡£
Èç¹ûÓÐÐèÒª£¬Ïñ Linux °²×° HOWTOÉÏËµµÄÖØÐÂ¸ñÊ½»¯¸Ã·Ö¸îÇø¡£
×Ô SAR ´ÅÆ¬ \#1 Æô¶¯ Linux »úÆ÷£¬µ±³öÏÖÌáÊ¾£¬²åÈë´ÅÆ¬ \#2¡£
ÏÖÔÚ£¬ÒÀÑ­ÔÚµµ°¸ {\ttfamily /root/notes} ÖÐµÄÐðÊö£ÛÕâÀïÊÇ {\ttfamily /tape144/root/notes} £¬ÔÚµ±Ëü±»°²×°ÉÏÄãµÄ Linux »úÆ÷Ê±£Ý¡£
Ò»µ«Á½Ì¨»úÆ÷¶¼±»Æô¶¯Íê³É£¬Ö´ÐÐÄãÐèÒªµÄ¸´Ô­¹ßÀý£Û recovery routine £Ý¡£
Èç¹ûÄãÊÇÊ¹ÓÃ±¸·ÝÃüÁî¸å£¬Äã¿ÉÒÔÈçÏÂ²Ù×÷£º
\begin{enumerate}
\item ¸Ä±äÄã½«»Ö¸´µÄÓ²µú°²×°µãµÄÖ¸ÄÏ£Ûdirectory £Ý¡£
\item Èç¹ûÈÎÒ» mounted volumnes ÒÑÔÚ´Ë±¸·ÝÉÏ, ¶øÄãÏë°ÑËüÃÇ¸´Ô­£¬ÄãÖ»ÒªÔÚÓ²µúÉÏ½¨Ò»Ð© mount point, È»áá°Ñ±¸·Ý mount ÔÚÕâÐ© mount point ÉÏ¡£
\item ÊäÈëÃüÁî£º
\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}

ÕâÀïÊÇ¶ÁÈ¡ÔÚÔ¶·½»úÆ÷ÉÏµÄ´Å´ø»ú£¬½«½á¹ûÐ´µ½ stdout£¬ÄÇÊÇ {\ttfamily afio} ËùµãÈ¡µÄµØ·½¡£
'{\ttfamily -i}' ²ÎÊý¸æËßËüÓÃÏà¶Ôì¶'Ä¿Ç°Ä¿Â¼'À´ recover    £Û´Ë´¦ÊÇÓ²µú·Ö¸îÇøµÄ¸ùÄ¿Â¼£Ý¡£
'{\ttfamily -v}' ÊÇºÜÈß³¤µÄ£¬ÁÐ³öËüÃÇ¸´Ô­µÄµµ°¸Çåµ¥¡£
'{\ttfamily -Z}' ¸æËß afio £¬´ËÎªÒ»¸ö¸÷±ðµÄÑ¹Ëõµµ°¸¡£
'{\ttfamily -c 1024}' ¸æËßËüÊ¹ÓÃ 5 MB µÄÁ÷¶¯»º³åÇøÀ´±ÜÃâÌ«¶àµÄ´Å´ø×ª»Ø¶¯×÷¡£


\section{±¸ÍüÂ¼}

ÔÚ {\ttfamily /tape144/root/notes} µµ°¸ÖÐÁÐ³öµÄÃüÁî¿ÉÒÔÔÚÃüÁî¸åÉÏÖ´ÐÐ¡£
µ±ÎÒÔÚ¡õÊÔµÄÊ±ºò£¬ÎÒµÃµ½ rpc Éè¶¨´íÎó¡£
ÎÒ²ÂÏëËüÖ»ÊÇÃüÁîÖ´ÐÐµÄÌ«¿ì£¬portmapper ×Ô¼ºÃ»ÓÐÊÊµ±µÄ°²×°Íê³É¡£
ÎÒ·¢ÏÖÊÖ¶¯ÊäÈëË³Ðò£Ûsequence £ÝµÄ¹¤×÷ÇéÐÎÁ¼ºÃ£¬ËùÒÔÎÒÍÆ¼öÈç´Ë¡£

ÎÒÏëÕâÊÇÒ»¸ö°²È«µÄÉè¶¨·½·¨¡£
ÓÐÈËÈÔ¿ÉÒÔÔÚÄãÈ¡³ö´Å´øÇ°, ÏÈÒ»²½°Ñ´Å´øÈ¡³ö½«ËùÓÐµµ°¸¶Á³ö.    ¶Ôì¶ÖØÊÓ×ÊÁÏ»úÃÜµÄÈË»á¿¼ÂÇ±¸·Ý×ÊÁÏÁ÷µÄ¼ÓÃÜ.
Ò²¾ÍÊÇËµ, Ô­±¸·ÝµÄÊä³ö pipe µ½¼ÓÃÜ³ÌÊ½ÔÙ°Ñ¼ÓÃÜ³ÌÊ½µÄÊä³öËÍµ½    Ö®Ç°ËùËµµÄ {\ttfamily /tmp/tapepipe}.
µ«ÊÇÒª×¡Òâ, Õâ¸ö¼ÓÃÜµÄ±¸·ÝÔÚ¸´Ô­¹ý³ÌÖÐµÄ´íÎó£¬½«µ¼ÖÂÔÚ¸ÃµãÖ®    ááµÄËùÓÐµµ°¸ÎÞ·¨¸´Ô­, ÒòÎª¸Ã±¸·ÝÊÇÒ»¸ö¶ÀÁ¢µÄ DES ¼ÓÃÜ×ÊÁÏÁ÷¡£
ÎÒÃÇÒ²¿ÉÒÔÓÃ afio µÄÑ¡Ïî, ÏÈ°ÑÃ¿¸öµµ°¸ gzip ÔÙ×ö¼ÓÃÜ. µ«ÕâÖÖ
ÏÈÑ¹ËõµÄ×÷·¨»áµ¼ÖÁÒ»¶ÑÒÑÖªµÄ×Ö´®(gzip ¹ý»áÓÐ¹Ì¶¨ header), ±È
½ÏÈÝÒ×±»ÆÆ½â. ËùÒÔ±È½ÏºÃµÄ×÷·¨ÊÇÌø¹ý gzip, Ö±½Ó×ö DES ¼ÓÃÜ,    ´ú¼ÛÊÇÐèÒª½Ï¶àµÄ´Å´ø¿Õ¼ä. ²»ÓÃËµÒ²ÖªµÀ, DES ¼ÓÃÜÊÇ²»×÷Ñ¹ËõµÄ.

ÎÒ¸½ÉÏµÄ {\ttfamily rc.inet1} Ð´·¨Ö»ÄÜÊ¹ÓÃÔÚµØÇøÍøÂ· (Local network) ÉÏ£¬¶ø²»ÄÜÓÃÒ»¸ö Gateway ºÍÍâ½ç¹µÍ¨¡£

ÔÚÍêÈ«»Ö¸´µ½¿Õ°×Ó²µúµÄÆÚ¼ä£¬SAR ´ÅÆ¬ \#3 Ìá¹© {\ttfamily ftape.o} ÈÃ MS-DOS »úÆ÷´©¹ý NFS¡£
ÕâÊÇÒòÎª {\ttfamily ftape} Ä£×éÄ³Ð©¾ÉµÄ°æ±¾²»ÄÜÔÚÓÐ´ÅÆ¬ÔÚÈíµú»úÊ±¹ÜÀíÄ³Ð©´Å´ø»ú¡£
ÔÚ½ÏÐÂµÄºËÐÄ³ÌÊ½£¬ËùÓÐµÄ NFS ÒªËØ£Ûstuff £Ý»á±»ºöÂÔ¡£

{\bfseries ÕâÊÇ·Ç³£ÖØÒªµÄ}¡£
{\bfseries ***²âÊÔ***} SAR ¸´Ô­³ÌÐò¡£
I did, but don't leave anything to chance.
È·¶¨Äã¿ÉÒÔ½öÊ¹ÓÃ SAR ´ÅÆ¬¸´Ô­ÖÁÉÙÒ»¸öµµ°¸µ½ Linux »úÆ÷ÉÏ£ÛÀýÈçÃ»ÓÐ°²×°Ó²µú£Ý¡£
Èç¹ûÄã²»ÄÜÖØÐÂÆô¶¯ Linux »úÆ÷ÔÚ²»ÕÕ³ÉÌ«¶àÊ¹ÓÃÕß²»±ãµÄÇé¿öÏÂ£¬¸Ä±äÔÚ SAR ´ÅÆ¬ÖÐµÄÉè¶¨×ÊÑ¶£¬Ö¸ÅÉ ``{\ttfamily linux}'' µÄÉí·Öµ½ÁíÒ»¸ö MS-DOS »úÆ÷£¬È»ááÆô¶¯Á½¸ö MS-DOS »úÆ÷½øÈë Linux È¥È·¶¨¾ù¿ÉÕý³£ÔË×÷¡£
È»áá£¬½« ``{\ttfamily linux}'' µÄÉí·ÖÐÞÕý»ØÀ´£¬Èç´ËÄãÓµÓÐÒ»¸ö¿ÉÓÃµÄ SAR ´ÅÆ¬¡£


\section{°æÈ¨}

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

ÐÞÕýì¶ ¶þÔÂ 6, 1996.

ÐÞÕýì¶ °ËÔÂ 5, 1997.

\end{document}
