1. Install the new drive into the system. (It does not matter if this is ide or sata.)
2. Boot Linux and locate the drive. While you do not have to, I prefer setting up the partitions and formatting ahead of time. Do not name the partitions; simply format them in your favorite fs. Copying the information is done from a console.
For an entire drive, type
dd if=/dev/source bs=32256 of=/dev/destinationwhere the source and destination are expressed as sda, sdb, hda, hdb, etc. This can take some time. I prefer to copy partition information so I can see where I am. Besides, copying swap is a waste of time. So do
dd if=/dev/sda5 bs=32256 of=/dev/sdb4where the content of the 5th partition on sda is copied to the 4th partition of sdb. With this nomenclature, the data of any partition can be targeted to any other partition.
3. After completing all copying, DO NOT REBOOT YET. First, edit the content of the new /etc/fstab to reflect the new location of the partitions. If you are replacing a drive in the exact same place in the system, this step is not necessary. Otherwise, make your edits. For example, in the above copy, I would edit the function of sda5 to become sdb4 in the new drive. If you forget this step, you'll be making edits with a live distro!
4. Edit the new GRUB/Lilo so that the system will boot correctly. Remember, GRUB identifies its drives and partitions starting from 0, not 1. So if sda was the first drive in the system, it would be identified in GRUB as hd0. But if you are moving everything to sdb, the second drive in the system, then GRUB sees it as hd1. The partitions are also numbered from 0, not 1. So the above sdb4 would be labled in GRUB (hd1,3) if sdb is the second drive in the system.
5. Now shut down and arrange your hardware as you planned. When you boot back up, all should be well.

Help
MultiQuote











