old-www/LDP/LG/issue12/yard.html

130 lines
5.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Yet Another Rescue Disk</title>
</head>
<body BGCOLOR="#ffefd5" TEXT="#483d8b">
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>
&quot;</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>The YARD Rescue Disk Package</h1></center>
<center><h4><a href="mailto: layers@vax2.rainis.net">by Larry
Ayers</a></h4></center>
<center>Copyright (c) 1996</center><BR>
<center><H5>Published in Issue 12 of the Linux Gazette</H5></center>
<hr>
<center><h3>Introduction</h3></center>
<p>It is a common practice to use the rescue/boot disks supplied with a Linux
distribution if filesystem problems occur and you need to boot from a floppy.
Typically these disks consist of a bootable compressed kernel on disk 1, with
the second disk containing basic maintenance tools such as fsck.
<p>On the few occasions I've had to boot from such disks the transition from
my familiar Linux environment to the bare-essentials, limited boot-disk system
(constrained by the size of a floppy disk) has been disconcerting, to say the
least. Typically if an editor is available it's a small one with which I've
never worked, and many of the tools I'm used to having around aren't there.
<p>Recently <a href="mailto: fawcett@nynexst.com">Tom Fawcett</a> has been
refining a suite of customizable Perl scripts which make the creation of
boot-disks from scratch easier. YARD (for Yet Another Rescue Disk) makes use
of (and requires) the optional Linux kernel compressed ramdisk option, which
allows you to load a compressed disk image into memory at boot-up. Paul
Gortmaker has written a lucid explanation of the new ramdisk options in the
file "ramdisk.txt", which is in the Documentation subdirectory of recent
kernel source releases.
<center><h3>Installation and Usage</h3></center>
<p>The Yard distribution contains two files which need to be edited as a first
step. <i>Config.pl</i> is a Perl script which sets such preferences as the
type of floppy you're using and whether you are making a single boot-disk or a
double. The <i>Bootdisk_Contents</i> file contains a list of all of the files
and utilities you would like on your disk(s). This file needs to be edited
heavily, as it includes much more than will fit on even two disks. Anything
you like can be included in this file.
<p>The next step is to run the Perl script <i>make_root_fs</i>. This script
gathers up all of the files you've specified (as well as all libraries upon
which they depend) and constructs a root filesystem upon whichever device was
specified in the <i>Config.pl</i> script. A ramdisk works well. The new
filesystem is then compressed with gzip into a single file in your /tmp
directory. Once this process is complete yet another Perl script,
<i>check_root_fs</i> is run, which makes sure that all needed
libraries,etc. are present.
<p>After all of this preparation you're ready to actually write the rescue
disks; here's where you find out if you've attempted to cram too much into
them. The <i>write_rescue_disk</i> script first copies your compressed kernel
(vmlinuz) onto the disk (the first disk if it's a two-disk set) and then
copies the compressed filesystem image you've constructed onto whatever is
left. It took me several tries to pare down what I wanted Initially on the
disks to what would actually fit. The virtue of the Yard system is that all
you need to do to try again is re-edit the <i>Bootdisk_Contents</i> file and
re-make the filesystem. Yard also writes log-files which can be helpful in
diagnosing problems.
<p>Modular kernels are great, but if you boot a kernel image and a capability
you need is a demand-loaded module you're out of luck. Yard sidesteps this
potential problem by including your modules directory in the compressed
filesystem, as well as making sure that the kernel-daemon /sbin/kerneld is
started at boot-up.
<p>The result of this process is a customized miniature Linux system. It's a
nice feeling to know that if your filesystem is in shambles due to a power
outage or a beta program run amuck that you at least have familiar tools
available.
<p>Once you've managed to edit a set of Yard configuration files which will
successfully write working rescue disks, consider saving copies of these files
in case the disks become corrupted. I just replaced the supplied files with
my edited copies, then tarred and gzipped the Yard distribution and saved it
to floppy.
<center><h3>Caveats</h3></center>
<p>Yard gives you the option of using or not using Lilo to boot your disks. I
first tried Yard with Lilo, as Lilo has always worked well for me. It
wouldn't work with my Yard disks, so I disabled that option. I'm using an old
version of Lilo, left over from my original Slackware 3.00 Linux installation,
which may explain this failure. Yard works fine without it. Lilo might be
necessary if you need to include parameters in order to boot your system, such
as those required for some SCSI hard disks.
<center><h3>Availability</h3></center>
<p>Yard is available from <a href="http://www.cs.umass.edu/~fawcett/">the Yard
home-page</a>, as well as from the sunsite archive and its mirrors. It's well
worth trying if you want the ultimate in control over just what is included on
your rescue disks.
<hr>
<address><a href="http://vax2.rain.gen.mo.us/~layers/">Larry Ayers&lt;layers@vax2.rain.gen.mo.us&gt;</a></address>
<!-- hhmts start -->
Last modified: Wed Nov 20 09:21:50 CST 1996
<!-- hhmts end -->
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./updates.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="expo.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
</body> </html>