My home server runs Debian Lenny, and I'm about to upgrade the system drive to a larger drive.
In the process, I want to take the opportunity to reorganize the partitions and resize them. For learning purposes, I'm planning to migrate from an MBR partition table to GPT.
Because of those two changes, I can't just run "dd if=/old/drive of=/new/drive" (well, not without lots more work afterwards). I could use the debootstrap process to get a fresh installation on the new system drive, but I used that technique during the last system upgrade and it's probably overkill for this.
Can I just copy the partitions from the old drive to the new?
Will "dd if=/dev/hda1 of=/dev/hdb2" work, assuming /dev/hdb2 is larger than /dev/hda1? (If so, the filesystem can be resized to take advantage of the new larger partition, right?)
Would parted (or gparted) be a better tool for copying the contents of the partitions?