Date: Thu, 24 Feb 2000 23:27:07 -0500 From: "Michael R. Wayne" <wayne@staff.msen.com> To: freebsd-isp@FreeBSD.ORG Subject: Re: CD backup of client "appliances"? Message-ID: <20000224232707.A6716@manor.msen.com> In-Reply-To: <00022421231300.01728@ns1.horizon.na>; from tim@iafrica.com.na on Thu, Feb 24, 2000 at 08:27:13PM %2B0200 References: <20000224115618.J28829@jade.chc-chimes.com> <00022421231300.01728@ns1.horizon.na>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 24, 2000 at 08:27:13PM +0200, Tim Priebe wrote:
>
> You should be able to fit the image of a freshly installed system on a large
> drive on to a cdrom, just do something like
>
> dd if=/dev/wd0 bs=1024000|gzip - >file
Assume the drives are different sizes. Assume the geometry is different.
Here's a quick start, feel free to poke holes in it or fill in unknowns:
# Read and save all information about this disk
cd $client_name
set DISK=da0 (or wd0)
# what command to read to determine how many slices on the disk?
foreach slice ( ??)
# Make a copy of this disklabel
disklabel -r ${DISK}${slice} > label.${DISK}.${slice}
foreach partition (a b c d e f g h)
# Read each partition. Should we use a blocksize here?
if (fstype from disklabel == '4.2BSD')
dd if=/dev/r${DISK}${slice}${partition} | gzip -9 > r${DISK}${slice}${partition}.dd.gz
endif
end
end
# Make a copy of the boot code. How?
# What did we forget?
# Make this into a .iso file
# Write the saved information out to a new drive
cd $client_name
# Get the disk name from the directory.
# How do we get virgin disk geometry?
# Using the info in label.${DISK}.* insure that the new disk is at least
# as large as the old one. If larger, put the extra sectors into a new
# slice. If smaller, fail with an error.
# Install all slices (how?)
# label the disk, dealing with alternate geometry
# gunzip and dd each partition out to the drive
# Restore the boot code (how?)
# What did we forget?
OK, now we just need some ofthe blanks filled in :-)
/\/\ \/\/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000224232707.A6716>
