I recently installed an SSD into my machine. The machine itself is a Lenovo thinkpad W520, and it previously had an internal HDD. I moved the internal HDD into an expansion bay (replacing the CD-ROM), and put the new SSD into the internal bay.
The problem I'm having is that I have my Ubuntu configuration EXACTLY the way I want it - I originally spent many hours configuring it to get it to the way it is now. I'd rather not do this again. But, I'd also like the boot-up gains I would get from the OS being on the SSD.
So, what I'd like to do is clone my Ubuntu partition onto the SSD. The catch is that the standard HDD is significantly bigger than the SSD. And it has a windows partition that I don't need on the SSD (I never use Windows, so if it boots off of the other hard drive, that's fine). The layout of my hard drives are as follows:
/dev/sda (SSD):
Model: ATA M4-CT256M4SSD2 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 147GB 147GB primary ext4 boot
/dev/sdb (HDD):
Model: ATA ST9500420AS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 1259MB 1258MB primary ntfs boot
2 1259MB 269GB 268GB primary ntfs
4 269GB 483GB 214GB extended
5 269GB 416GB 147GB logical ext4
7 416GB 475GB 58.9GB logical linux-swap(v1)
6 475GB 483GB 8470MB logical
3 483GB 500GB 16.8GB primary ntfs
What I've tried so far:
1) Resizing the partitions /dev/sdb5 and /dev/sda1 to be the same size.
2) Booting into Ubuntu 11.04 (from /dev/sdb5) and running dd if=/dev/sdb5 of=/dev/sda1 (of course this causes problems with booting, so I had to reinstall grub.. I can get it to boot, but then I have problems with initrd not finding some files ... presumably it can't load some partitions I think).
Now, I think those two steps are the wrong approach, because it will clone /dev/sdb5 EXACTLY - including references in fstab which point to the wrong hard drive. I'm not sure exactly how to rectify this. I could install Ubuntu 11.04 onto the SSD, then try and copy over all of my configurations, but I'm concerned that I'm going to lose something, or that I'm going to overwrite something like fstab that points back to the original hard drive.
Note that currently, I can still boot from the HDD, so it's not imperative that I get this figured out right away, but I do want it to be exactly how it is right now, so that I can maintain my current level of productivity (it's a work laptop).
Suggestions on how I might be able to overcome this difficulty?
Thanks in advance!