From owner-freebsd-questions Wed Apr 18 12:26: 9 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id B8F3B37B42C for ; Wed, 18 Apr 2001 12:26:04 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 30453 invoked by uid 100); 18 Apr 2001 19:26:03 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15069.59979.914483.424575@guru.mired.org> Date: Wed, 18 Apr 2001 14:26:03 -0500 To: Rick Duvall Cc: questions@freebsd.org Subject: Re: Backup and Verify In-Reply-To: References: <15069.49404.687348.64785@guru.mired.org> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Rick Duvall types: > Well, on the Bootable cd is another place I am having trouble. Actually, > in a couple of places. I really can't help with that - I've not built a bootable CD either. > The first place I am having trouble with is to actually get the CD to > boot, and run my own install program rather than the regular FreeBSD > install. mkisofs will create the image, but I don't know how to write > boot blocks to it. You don't write boot blocks to it; you tell cdrecord where the boot blocks are, and it builds a bootable CD. > Another problem is, how do I create a custom install program? Maybe a > shell script would be easier than that ANSI install program. But, even at > that, how can i write a script that will automatically detect the new hard > drive (replacement drive), partition, label, and format it to my specs > without them having to specify the values themselves? Why bother detecting the drive? Just assume it's there in the right place, and provide a note that "fdisk: cannot open disk /dev/ad0: Device not configured" means the drive isn't properly installed. With one partition - root on a - the seequence is: fdisk -IB /dev/ad0 disklabel -W /dev/ad0s1 # Just to be sure disklabel -R -B /dev/ad0s1 /etc/restore/system_diskabel disklabel -N /dev/ad0s1 newfs /dev/ad0s1a mount /dev/ad0s1a /mnt cd /mnt tar xzf /etc/restore/dump.tar.gz Going with a bootable CD for the root file system of the running system just makes things easier. You drop the two B options, mount on and cd to /var, and make sure the dump.tar.gz has no spooled data in it - mostly just directories. Your instructions have to walk them through dealing with a single-user boot in that case, but after it's up, you tell them: Type the command "/etc/restore/restore" and if that completes properly, type the command "exit". http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message