Moving Ubuntu Linux from PATA drive to SATA drive

 Sata drivePata drive

I had running on a very old laptop on a small ide 2.5″ drive. It was slow, but it was working. It got very tedious to work on though when anything went wrong and the webserver was really starting to get slow so I finally bit decided to move to newer hardware. But, the problem was that the drives on anything modern are serial ATA.

Here is what I did

1. Installed the same flavor and version of linux  on the new server and hard drive mimicing the partitions numbering on the old server. You could just get away with partitioning the drive in step 3 using one of the many RIPLinux bundled utils or fdisk, gparted, etc.

2. Took the drive out of the old laptop and put it in a usb external case and connected to the new server.

3. Booted on a RIPLinux CD – but any live CD would do really.

4. Blew away all files on the various partitions on the new server/drive

5. copied the files and directories over from the old drive with cp -prv

6. Changed the grub config in /boot to point to /dev/sda1 as opposed to /dev/hda1

7. Checked /etc/fstab to make sure mount points are OK

8. Edited the boot grub menu to make sure that point to the root directory

And it worked!

Recovery is Possible linux —>