Re: Trasnfering an intalled system to another hd
The procedure I normally use is to connect the new drive to the same system, create
partitions of identical size to the existing system partitions (root, /usr, /var
/opt etc) and any user partitions whose size does not need to change, and make
new partitions out of the additional space. Then boot single
user (so / and /var are readonly) and dd those across to the appropriate partitions
on the new drive. These are usually small partitions, so this is fairly quick.
The other partitions I normally mount readonly by default, so those I dd while
the old system is running.
If I need to expand an existing filesystem, like /home, I format the expanded
partition and use rsync to copy the contents. Be careful about things like
preserving attributes, like hard links. If preferred you could also
dump and restore using tape.
Then make the new drive the primary drive and boot to it. You can either
use a boot floppy or CD initially, and then rewrite your boot sector in the
usual way to make sure the new system disk is bootable, or if you are careful
you can update the boot sectore from the old system.
This system is simple because it works even for my partitions which contain
Windows, BSD, and other operating systems. (I certainly don't want the pain
of trying to re-install the original windows system, which is needed if I
ever need to prove to a vendor that their hardware is defective...).
So far this method has always produced an exact copy my original system,
whose original 2GB drive has doubled in size about 5 times over the years.
Don't try to copy the old partition table with DD, as sometimes it will reflect
differences in drive geometry. But the content of partitions can be treated as
a simple array of blocks, so dd can duplicate it, and it doesn't matter if
individual partitions move - except that if the order changes then you will
need to update /etc/fstab, and other OSs (like Windows) may have more
restrictive rules - I normally reserve the first three primary partitions
for 'other' OS's to avoid problems with this..
On Tue, Feb 28, 2006 at 04:55:55PM -0300, Fernando Cacciola wrote:
> I have Debian Sarge, full of stuff, installed on a HD, but it's running out
> of space.
> What's the simplest way to transfer the entire system to a bigger HD?
> Fernando Cacciola
Digby R. S. Tarvin digbyt(at)digbyt.com