On 11/11/14 14:23, Dave Anderson wrote:
> My apologies for what seems to be a rather simple and not really OpenBSD
> specific question, but searching hasn't found any good answers.
> 
> I've got an old PC running i386 OpenBSD which is dying; the disk seems
> to be good, but I need to replace the rest of the hardware.  Usually I'd
> just move the disk to the new system, but the old system is EIDE and the
> new one is SATA -- so I need to copy the old disk (which I can put in an
> external enclosure and connect to the new system via USB) to the new one
> (which is a different size and probably a different geometry, so the new
> and old partitions probably won't be exactly the same sizes).
> 
> It's clearly possible to boot the new system from an install CD (or, if
> necessary, a USB stick with a full install on it) then fdisk and
> disklabel the new disk and newfs / dump|restore the partitions one by
> one, followed up by installboot, editing the duids in /etc/fstab, and
> fixing up /etc/hostname.*, but I'm hoping that there's a better way.
> 
> Thanks in advance for any suggestions (or confirmations that there is no
> better way).
> 
>       Dave

Personally, I'd probably just do a pkg_info to see all the installed
packages, build out a new machine EXACTLY as I want it on the new disk,
install the same packages, copy over the config files and any other data
files.  Done.  Save the old machine (or the disk in a usb enclosure) in
case you find something missing.

In cases where I was copying over multi-boot systems including OSs that
are not so "portable", I've put the old disk in an external enclosure,
used dd to copy the entire disk image from the old disk to the new disk,
and then fluffed things out on the new disk...but it's hard to justify
with OpenBSD, as the reconfig of a new system is usually pretty easy.

Nick.

Reply via email to