HisMajestyTheKing

Cloning OpenBSD/FreeBSDn

Recommended Posts

using dd from a linux or bsd boot cd is all you need. Make sure you do it from single user mode (ie off the CD) and not when you are booting off the source system's hard disk, or you will have problems.

Share this post


Link to post
Share on other sites
You mean as in back up, or the purpose of transfering the current data to a new drive?

In either case, acronis.com has your answer!!!...

SCSA

The dd command will it just fine. acronis works great for windows, but linux/bsd doent need a drive imaging program. (other than dd)

Share this post


Link to post
Share on other sites

A word of caution about using the dd command; way back in the day we used it to clone a Redhat system and it worked fine until a year letter when we went to upgrade the system and found that dd had mucked with the drive geometry and now RH would bomb during the upgrade. We were able to fix it with a bit of fdisk magic, but still I wouldn't recommend it.

The ::::best:::: way IMHO is to create the new partitions, copy everything over to the new disk using cp with the -prx switches and then use a lilo boot floppy to get the thing going again.

If you know exactly what you're doing in lilo...you don't even need a floppy. Just mount the new root paritition, chroot into it, and edit lilo.conf so it installs itself to the new drive with the correct boot options. The key lines are something like:

...
boot=/dev/hdc
disk=/dev/hdc
bios=0x80
root=/dev/hda1
default=Linux-2.4.27

image=/boot/vmlinuz
       label=Linux
       read-only
...

which tells lilo to install to the new drive and not the existing, and that the root partition will be on the primary master after reboot, which will be the first drive detected by bios. After you run lilo, reboot and everything comes back up nice....then you can change all the lilo settings back to /dev/hda.

-Chris

Share this post


Link to post
Share on other sites

Of course in the typical linux user fashion i completely missed the fact that you were talking about OpenBSD/FreeBSD.......though it'd bet copying it all over and using a boot floppy would still be best.

-Chris

Share this post


Link to post
Share on other sites
The dd command will it just fine. acronis works great for windows, but linux/bsd doent need a drive imaging program. (other than dd)

*need*? No, but if you already have a copy of Acronis True Image might as well use it. If you just want to copy from one HD to another (like from a 20GB to a 40GB) it should work fine. If you're looking to use it as a backup, it'll work even better since you can dump an image to another drive, or to a network drive and store multiple copies, compressed.

Share this post


Link to post
Share on other sites

It's not for backup but for cloning an existing base installation onto other machines or onto a bigger disk for the same machine. Again, I'm not interested in sector copies.

Is it possible to make a tar of the content of every partition, partition the new disk and untar to the new partitions?

Share this post


Link to post
Share on other sites
dd if=/dev/hda of=/dev/hdb

Could boot from a linux cd, and give that a whirl.

I've found linux dd performance when cloning disks to be abysmal.

Chewing up huge amounts of cpu while taking forever.

Its not just one particular distro, I've tried

tomsrbt, knoppix, and other recovery distros, all exhibit the same behavior.

An openbsd boot floppy does the job just nicely. Just remember to use the 'c' device to specify the entire disk.

greg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now