How to move FreeBSD to a different disk

I have a FreeBSD installation on a hard disk and it only uses 10% of the disk and I could fit it on a 16GB pendrive. How would I go about transfering it?
 
Here is a script used to copy an ARM installation from sd card to emmc. It might give you some hints what is required.
There are many ways of doing this. I like this method so far. Compress with tar your live system and extract to your target's prepared disk.
 
I have a FreeBSD installation on a hard disk and it only uses 10% of the disk and I could fit it on a 16GB pendrive. How would I go about transfering it?

... or you can even use a live FreeBSD or Linux CD

Code:
dd if=/dev/ada0 of=/dev/ada1 bs=1024b

ada0 is the same machine you put the CD in:
ada1 is where ada0 will be copied to. if its a flash check /dev/ for type da0

use bs=1024b anything larger will be the same speed.

If you replace the ada0 with the word zero you will wipe ada1 super-clean. This could make the hard drive last for another 15 years.

dd(1) is is slow but flawless as long as the user don't cross it up.
It takes a little over an hour and a half for 1TB HDD.

dump(8) is much quicker and it provides the finest of defragmentation ever.

First, I dump, than I save it as my most precious backup. You can figure the rest from there.
 
Partition Magic and Partition Commander were the real dd(1) tools. I agree with wblock@, so I’m taking back my recommendation of using FreeBSD. It works for certain things but not all. You must learn where it works when FreeBSD is live. Since the death of Partition Magic all we have now is cfdisk and it don't care what you dd. Even if a datacenter say it’s my fault, I’ll know better.
 
Back
Top