On 2014-11-11 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).
The RAMDISK kernel doesn't include dump(8), but it does have restore(8).
If you physically move the disk, you can boot it, if the new hardware
permits booting from the alternate disk. Use single-user mode (boot -s)
and you have access to the full set of partitions with only root mounted
read/only.
If I recall correctly, dump(8) and restore(8) are both in /sbin, you
will
need a read/write /tmp directory in order to use restore.
After dump/restore of all partitions, you can then run installboot(8)
and
update /etc/fstab.