[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving Unstable to new HDD



KS wrote:
Hello all,

I have a 80GB+40GB pair of HDDs in my desktop. The 40GB is the one which
came with the system and contains the original Windows installation. The
 80GB hard disk contains the Debian unstable system with different
partitions for /, /boot, /usr, /home, /tmp, /var and a couple of others
for data storage.

I have ordered a 320GB SATA disk (along with a Promise controller card)
and intend to move the Debian system to it (while keeping the 40GB as it
is). Just redoing the installation on the new HDD is a possibility but I
was wondering what other options are there to archive the goal. If I use
dd, can I have the new partition size larger than the original one or
does it have to stay same? What would be best way to move the system to
the larger HDD and also have bigger /usr and /home partitions?

- For convenience format your new disk similar to the old one, ie. for the content of the present /dev/hda1 (or /dev/hdb1) create a new /dev/sda1 etc.

- If you want to sort your new partitions differently, you just have to edit your /etc/fstab accordingly. If your data moves from, say hda1 to sda1, you have to edit the corresponding entries in /etc/fstab (in this case: change one letter).

- copy all the data from the 'old' partition to the new one. I would use something like rsync, but you can just copy the data.

This way the only requirement for the size of the new partition is that it is big enough to hold your data (it could also be smaller, it could also be a different filesystem etc.)

Of course you could also use dd or a partition imager to copy your data, but the simplest solution for me would be to just copy the data.

You have to modify your boot manager as well, depending on where it is and whether you want to keep the old linux disk as well.

Take care, YMMV, HTH,
Johannes



Reply to: