Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2001 14:26:03 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Rick Duvall <maillist@coastsight.com>
Cc:        questions@freebsd.org
Subject:   Re: Backup and Verify
Message-ID:  <15069.59979.914483.424575@guru.mired.org>
In-Reply-To: <Pine.BSF.4.21.0104180934020.60328-100000@ns1.coastsight.com>
References:  <15069.49404.687348.64785@guru.mired.org> <Pine.BSF.4.21.0104180934020.60328-100000@ns1.coastsight.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Rick Duvall <maillist@coastsight.com> 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".

	<mike	
--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15069.59979.914483.424575>