Installation - image of anther machine
Josh Grosse
josh at jggimi.homeip.net
Fri Oct 10 11:39:31 CEST 2008
On Fri, Oct 10, 2008 at 11:01:41AM +1100, Chris Henderson wrote:
> I'm installing OpenBSD 4.3-release on a new machine. Rather than
> installing everything from scratch, I'd like to take an image of
> another machine. This will save me a lot of time configuring
> everything by hand from scratch. The things I want in the new machine
> are the things that the old machine has, like: packages, compiled from
> ports Java & opera, users, .rc files, any /etc changes.
>
> Is this possible? Thanks.
Of course it is. It's exactly the same as a disaster recovery, isn't it?
And of course, you test your D/R procedures, don't you? :)
The sequence is: 1) back up your existing system, 2) configure your new
system, 3) restore the filesystems, 4) configure boot blocks, 5) reboot.
1) Backup of OpenBSD filesystems is best done by the dump(8) program as
described in FAQ 14.9; the example there use tape devices. Backup may be done
on other media -- external disk drives, over a network to another system, etc.
Describe your backup media and someone may be able to give you specific advice.
Other backup software that might be usable include tar(1), pax(1), cpio(1),
dd(1) ... or 3rd party packages such as gtar, bacula, amanda, or external
software like g4u.
2) Configuring your new system means configuring MBR data if your architecture
uses it, via fdisk(8), configuring BSD partition via disklabel(8), and
formatting them with newfs(8). One typically boots the ramdisk kernel from
OpenBSD installation media, which may be on CD, diskette, hard drive, or
network. If you don't know how to do this yourself, you could go through the
installation scripts to the point of installing the filesets.
3) Restoration will depend on the method you use for backup. The ramdisk
kernel includes dd, tar, pax, cpio, and restore(8). The latter will require a
/tmp space to be mounted. If you use a 3rd party product, you may need
to install OpenBSD and the 3rd party product before conducting your
restoration, if it does not have a standalone D/R facility.
4) Making your restored system bootable requires installing boot blocks,
and is architecture dependent. For i386/amd64, fdisk can install the
first stage boot loader, and this should be done as part of step 2, above.
On amd64 or i386, the second stage boot loader setup is done with the
installboot(8) program.
More information about the Openbsd-newbies
mailing list