copying hard drives

Modulok modulok at
Fri Jun 10 22:37:42 UTC 2011

>> I would like a way to take peoples windows -or- unix systems and
>> store each on portable hard drive as a single file - so that in the
>> end I have a large, say 2TB drive with a number of peoples operating
>> system backed up - that can later be restored.

Use dd to make a sector-for-sector level copy into a file. It will work
regardless of the operating system you're copying. However, be aware that
some operating systems do not have a hardware abstraction layer. As such
their kernels are optumised to run on the hardware they were installed on.
They can can only be restored to the exact same hardware. This is usually
the case with WindowsXP. (Though you can still mount and extract data
from the dd generated image.)

    dd if=/dev/ad6 of=foo.bin bs=1m

>> It would be nice to have the operating system on a stick - so I
>> could boot into the program from a clients computer, connect a large
>> drive, and backup their entire drive.

You can do this with any 'live' operating system. Most UNIX like systems offer
a comparable 'dd' command. For example, you could boot to an Ubuntu CD, or even
Freesbie, if that's still around.

>> which I know dd can do - but I wonder if there is a way to do this so that
>> clone drive can be smaller that the original.

For this on FreeBSD, use dump(8) and restore(8) commands. Of course, they will
only be suitable for FreeBSD, as they are file system (UFS) dependent.


More information about the freebsd-questions mailing list