From owner-freebsd-isp Thu Feb 24 20:28:21 2000 Delivered-To: freebsd-isp@freebsd.org Received: from manor.msen.com (manor.msen.com [148.59.4.13]) by hub.freebsd.org (Postfix) with ESMTP id 6E9C137BD27 for ; Thu, 24 Feb 2000 20:28:17 -0800 (PST) (envelope-from wayne@staff.msen.com) Received: (from wayne@localhost) by manor.msen.com (8.9.3/8.9.3) id XAA07373 for freebsd-isp@FreeBSD.ORG; Thu, 24 Feb 2000 23:27:07 -0500 (EST) (envelope-from wayne) Date: Thu, 24 Feb 2000 23:27:07 -0500 From: "Michael R. Wayne" To: freebsd-isp@FreeBSD.ORG Subject: Re: CD backup of client "appliances"? Message-ID: <20000224232707.A6716@manor.msen.com> References: <20000224115618.J28829@jade.chc-chimes.com> <00022421231300.01728@ns1.horizon.na> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <00022421231300.01728@ns1.horizon.na>; from tim@iafrica.com.na on Thu, Feb 24, 2000 at 08:27:13PM +0200 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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