I'm planning on replacing my laptop's HDD with a 256GB SSD, but I have a dual-boot (12.04 and Windows 7) setup and I'd like to be able to directly migrate Ubuntu over without having to reinstall and lose all of my settings. GParted reports the following partition setup on my HDD. I am, of course, able to modify it if necessary.
/dev/sda1 (NTFS) 66.92 out of 200.00 MB used
I'm honestly not sure what this partition is for. Maybe for Windows 7 system files? I'm hesitant to mess with it. (edit; it turns out it is a partition for Windows recovery files in the event of OS corruption, so I don't want to remove it. Plus it also appears to be a major pain to remove anyways)
/dev/sda2 (NTFS) 116.35 out of 339.06 GB used (boot)
This partition is the C:/ drive on my Windows installation. I don't use it on my Ubuntu installation, except it is the boot partition and thus has grub on it.
/dev/sda4 (extended)
> /dev/sda5 (ext4) 14.49 out of 91.34 GB used
> /dev/sda6 (linux-swap) 5.92 GB
These are my Ubuntu partitions. /sda5 contains my documents and all of the files I use on Ubuntu, and (as far as I know) the system files for Ubuntu itself (it's the partition I created when prompted by the Live-DVD installer). /sda6 is, of course, the swap partition which I only need for hibernation (6GB of RAM).
/dev/sda3 (NTFS) 9.89 out of 14.75 GB used
This is an annoying partition that Lenovo created to store some drivers and files that I might need later on. For example, it allows me to use OneKeyRecovery for a quick factory recovery if absolutely necessary, not sure if that'll work on an SSD. It also contains not-so-important files for bloatware installation.
In total, my HDD only has about 150GB of files on it so it should fit comfortably on the SSD. The problem is, I want to exactly migrate my files, partitions, OSes, MBR, etc. from my HDD to my SSD and I'm not quite sure how to do this. I've seen CloneZilla referenced before, but I'm not all too experienced and the documentation for it quite frankly seems a bit like a foreign language to me. So, put simply, is there any way I can exactly clone this HDD to an SSD without a massive headache? Also, if it matters, I'll probably be using an external hard drive case (as recommended in online tutorials) to externally attach the SSD to my laptop during the cloning process due to the lack of two hard drive slots in the machine.
Since you are moving from a large HD to a smaller SSD, you will need to copy partitions rather than "clone" the original hard drive.
Regarding the use of Clonezilla and "the documentation for it quite frankly seems a bit like a foreign language", have you seen the following two references? Both indicate how to resize the HD partitions, and copy the reduced-size partitions to the smaller SSD.
How to Clone Hard Drive to Smaller Drive http://geekyprojects.com/storage/how-to-clone-hard-drive-to-smaller-drive/
Replacing A Disk With A Smaller One Using Clonezilla Live http://preview.tinyurl.com/cnjm6yg
For me, the "foreign language" came in the form of Clonezilla's interface. I have never seen so many error/warning messages and had to fight my way through multiple text-based menu screens. However, the good news is that, once you have prevailed with the setup procedures, Clonezilla actually works flawlessly.
Finally, be prepared to use a Windows Recovery Disk to reset the MBR (since Windows seems to object to partitions being moved around) and perhaps also Rescatux (http://www.supergrubdisk.org/rescatux/) to re-establish the GRUB menu after Windows "thinks" it is back in control.
You should use Clonezilla Live. It's sort of like the Linux equivalent of Norton Ghost. Just boot off the CD and make an image of the entire disk onto an external hard drive. It does not matter what O/S you are trying to backup or restore. It will take a "snapshot" of the entire disk and lay it back down onto the new disk. It is very useful for whole-disk recoveries when disks sizes may have changed.
Clonezilla allows you to fit the drive data to a smaller drive if there is enough space.
Read the following Question and Answer taken from the "FAQ/Q&A for DRBL and Clonezilla" web page:
You might have to re-install GRUB2 once the cloning process is finished.
Recently I faced the same problem. I managed to solve the problem using below method.
Warning: please create a backup if you aren't aware of what you are doing. Since, we are manipulating grub. If there is some error grub, you won't be able to boot into the system.
Since, our main focus is to shift Windows + linux from one disk to other. So, firstly make a clone of all the necessary partition on SSD.
This is my SSD partitions. Window + linux partition. So try to clone all the partition except the other unnecessary partition like D:// or E:// or other.
NOTE: for Cloning you can use Macrinum software. Free version will work for this case.
Now, we have ssd with all the necessary partition(Window + linux + other). So, we just need to add entries in grub for new OS in other drives. Boot to linux and try updating grub using command
update-grub
in terminal. And, try to reboot the system. Usually this fix the problem.But, there exist a problem. In my case, when I was trying to enter the SSD partition from the Grub entry during boot. I was facing a problem that it was booting with HDD instead of SSD. The main reason behind this
UUID
. Since, we are cloning HDD so the new SSD partition have same UUID. It creates a problem as grub confuses which partition to use as two partition have same UUID.So, we will change the UUID of linux partition in SSD using
tune2fs
.[https://unix.stackexchange.com/questions/12858/how-to-change-filesystem-uuid-2-same-uuid][1]Now, we have unique identification of partition. Again, try to upgrade grub using
update-grub
.You can use
grub-customizer
tool in linux for manual modifying the entries of grub. This solved my problems.