Laptop SSD migration strategy -- comments please

I have an HP DV7 laptop, two 2.5" drive bays.
The current configuration is:

/sda 320 GB
/sda1    ntfs C:\ Drive         Win7
/sda2    ntfs D:\ drive

/sdb 320GB
/sdb1   swap
/sdb2   ext4  /       SuSE 12.1/KDE4.8
/sdb3   ext4  /home

Dual boot, boot from MBR on /sda.
Works OK, but windows is of course a disc pig, takes forever to load and do anything.
I now use a Win7VM (Vbox) for my most critical Windows applications (Quicken, TurboTax, etc) but need to maintain the native Win7 for another year while I wean myself off of some much larger Windows packages that I use infrequently that I would rather not put in the VM.

Migration strategy:

  1. Two new hard drives, a 128GB SDD and a 500BG HDD
  2. Partition the new drives (see below)
  3. Clone my Linux partitions to the new new partitions using Dolphin or MC or a clone application, file at a time since new partitions will be different sizes. I’ll either use a liveCD on the laptop or do the copies on another machine with USB to SATA converters. (Suggestions Welcome)
  4. Since there will be no MBR on the SSD (the new /sda), boot the laptop from 12.1 install disc, which will presummably find the Linux install, and “Boot from Hard Drive” and use YAST to install GRUB in MBR. Since my current fstab is mount by diskID, I realize I may have to edit it with the live CD.
  5. At this point, I believe SuSE 12.1 will be complete and will boot from MBR on /sda.
  6. Win7 migration to the new C:\ and D:\ is still up in the air. I have not had good luck resizing Windows partitions in the past, so may need to do a reinstall (from CDs) and then reinstall Grub on the /sda MBR since Win7 will break it, I assume.

Current thinking for new partition strategy:

Guesstimated sizes at this point for partitions
/sda     128GB SSD
/sda1    60GB  ntfs  C:\     Win7 OS and frequent applications
/sda2    64GB  ext3      /   for SuSE root and a /VMs directory for my Vbox *.vdi files
/sda3     4GB   swap

/sdb     500GB
/sdb1    100GB    ntfs  D:\   Win7 data and infrequent applications
/sdb2    396GB    ext4     /home
/sdb3       4GB    swap   I want to see how much, if any, swap really gets used. If infrequent, may use HDD for swap

Other thoughts, suggestions, pointers are welcome!

You will need to change the /boot/grub/menu.lst and /ect/fstab files to point to the new hardware.

I would backup everything to an external hard disk before I did anything. For Linux I would use dar as it does a file by file backup and restore and can restore to larger or smaller partitions. The partition must be preformatted so it is reasonably format independent.

I don’t now about windows 7 restore. I think that the old ntbackup would restore to partitions of different sizes. You had to install a basic system on the partition and then using ntbackup, I think from the running system to overwrite everthing. I believe that it used shadow copy. Ntbackup does not work with windows 7 but I believe that the windows 7 backup uses shadow copy and it is possible that you will be able to restore to a partition of a different size. The built in windows 7 backup is not very nice. Google for what is possible.

If swap is on the HDD I would put it at the start of the disk. If it is used it is going to be faster at the start of the HDD. If it is not used much it is small and has little effect on the other partitions

On my system swap does not seem to do much if anything. I do have a separate /tmp which can get quite busy. I am not an SSD expert and am not sure if /tmp on the SSD is good (fast) or bad (lots of write and erases may reduce the life of the SSD)

Let me say that even a 128 GB hard drive is hard to live in and your best speed up with openSUSE is to have all of it on the SSD. So, if openSUSE was my main squeeze, I would put Windows on the larger 500 GB hard drive and all of openSUSE on the SSD. Install Windows first with the SSD missing. Then install openSUSE on the SSD (SWAP, /, /home & grub) as a grub in MBR & a 4/50/66 GB split. for the rest. It is just a thought you should consider.

Thank You,

I have my OS on the SSD and personal files on the 500 GB.
For quicken you may use Kmymoney instead!

Thanks for the comments.

In the long run, I’ll take James’ suggestion, dedicate SSD to SuSE, and run Win7 only in VM.
For now, I am just trying to get Windows to work faster - SuSE 12.1 on HDD already quite acceptable!
I’ll see how well SSD for / improves it.

Kmymoney - I have been playing with it. Problem at the moment is that I have a Credit Card account that does not play nice with .OFX import.

I’ll update with results in a week or so.

OK, I am done with my transition.
It was an adventure and learning experience, but well worth it I believe.
I did not realize just how much the hdd performance was limiting the user experience on this moderate cpu (dual 2GHz AMD Turion) laptop

What I achieved:

  1. Windows7 boots much faster, runs more responsively. Subjective: was-slow, now is - very good (for Windows)
  2. SuSE 12.1 boots faster, runs “snappier” : Subjective: was good, now is - very good (still more responsive than Windows)
  3. Windows7 vbox VM on SuSE , after moving the VM .vdi disks to ssd, run very well, almost as good as direct boot. I’ll try to benchmark quantitatively, as I am now curious.

While #1 was my primary objective, I’ll get the most use and enjoyment out of #2 and #3.
#3 will in fact accelerate my transition to only using VMs for my future Windows needs.

Here is a summary of my new disk setup (after transition):

/dev/sda is the 128GB ssd
/dev/sdb is the 500GB hdd

>df -h
Filesystem                                               Size  Used Avail Use% Mounted on
rootfs                                                    68G   22G   44G  33% /
devtmpfs                                                 1.9G  8.0K  1.9G   1% /dev
tmpfs                                                    1.9G   76K  1.9G   1% /dev/shm
tmpfs                                                    1.9G  748K  1.9G   1% /run
/dev/sda2                                                 68G   22G   44G  33% /
tmpfs                                                    1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs                                                    1.9G     0  1.9G   0% /media
tmpfs                                                    1.9G  748K  1.9G   1% /var/run
tmpfs                                                    1.9G  748K  1.9G   1% /var/lock
tmpfs                                                    1.9G   24K  1.9G   1% /tmp
/dev/sda1                                                 47G   33G   14G  71% /windows/C
/dev/sdb2                                                 98G  353M   98G   1% /windows/D
/dev/sdb3                                                359G  174G  167G  52% /home

>cat /etc/fstab
/dev/disk/by-id/ata-M4-CT128M4SSD2_0000000011520900C51B-part3 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-Hitachi_HTS545050A7E380_TA9511GZH54RUP-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-M4-CT128M4SSD2_0000000011520900C51B-part2 /      ext4       acl,user_xattr              1 1
/dev/disk/by-id/ata-Hitachi_HTS545050A7E380_TA9511GZH54RUP-part3 /home                ext4       defaults              1 2
# /dev/disk/by-id/ata-M4-CT128M4SSD2_0000000011520900C51B-part1 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-M4-CT128M4SSD2_0000000011520900C51B-part1 /windows/C           ntfs-3g    defaults 0 0
# /dev/disk/by-id/ata-Hitachi_HTS545050A7E380_TA9511GZH54RUP-part2 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=POSIX 0 0
/dev/disk/by-id/ata-Hitachi_HTS545050A7E380_TA9511GZH54RUP-part2 /windows/D           ntfs-3g    defaults 0 0
proc    /proc    proc    defaults 0 0 
sysfs    /sys    sysfs    noauto 0 0 
debugfs    /sys/kernel/debug    debugfs    noauto 0 0 
usbfs    /proc/bus/usb    usbfs    noauto 0 0 
devpts    /dev/pts    devpts    mode=0620,gid=5 0 0 
# for ssd, move /tmp to a ramdisk
tmpfs   /tmp    tmpfs   defaults,noatime,mode=1777 0 0

Linux Migration:
My original configuration had / and /home in separate partitions, so the migration was straightforward.
The only challenge initially was that some of the tools I thought I would need for Windows migration would only work with a bare, unpartitioned drive (the ssd), so I had to deal with that first. In the end(see Windows Migration below), I found a better way.

Essential tools for Linux Migration:

  1. Parted Magic ver 2-19-2012 live disk for basic partitioning and Clonezilla. I believe this version installs Grub2, so don’t use it to build MBRs for SUSE(use Expert mode in Clonezilla, de-select install Grub). Parted Magic is probably optional if you are just migrating Linux, since there are very good file system tools in SuSE that could partition and build your new disks. I found Partion Magic to be very useful for the Windows transition, used it for both.
  2. My Suse 12.1 install DVD, to get a Rescue Console when things went bad
  3. Swerdna’s Tutorialto easily get a usable Grub1 during transitions
  4. YAST-Partitioner to mount new partitions and make easily editable entries in /etc/fstab
  5. A USB to SATA disk dongle, allowing me to work on disks while booting the installed system.

→ I wish I could say I did it this way, instead I made many misteps and complicated my life while learning the nuiances of the tools. Now that I am done, I believe this is a path to success, not the only one, for sure.

  1. Connect ssd to the USB port(with dongle).
  2. Use Parted Magic to partion the ssd connectd to the USB port(dongle).
  3. Use Clonezilla to clone the / partition from old /dev/sdb hdd to the ssd. Clonezilla will expand the file system to fill the larger partition.
  4. Unmount (Important! which means that the first time I just unplugged the USB dongle and ruined my partitioning and had to do it again…) the /dev/sdc ssd, Connect 500Ghdd to the USB port(with dongle).
  5. Use Parted Magic to partition the new 500Ghdd with the Windows D: , new /home and new swap partitions
  6. Use Clonezilla to clone old /home from /sdb to the new /home partition. Clonezilla will expand the file system to fill the larger partition. Unmount the USB dongle (See step 4.)
  7. Replace old /sda hdd with the ssd, the old /sdb hdd with the new 500Ghdd
  8. Boot with SuSE DVD, get restore console, use Swerdna Tutorialto install a bootable Grub(1) on the ssd to boot the new root on the ssd.
  9. Boot the sdd 12.1 via grub menu, step 8. Because the cloned /etc/fstab has the old disk IDs in it, boot will fail and dump you to a restore console.
  10. INTERESTING FINDING: The default boot for 12.1, systemd, will fail and hang, but selecting (F5) to boot with System V will get you to a restore console. Systemd seems to not like the mount failures caused by the old entries in /dev/fstab.
  11. Login as root to the restore console. Start YAST-Partitioner. Use the Partitioner to mount the ssd root partition to /newroot and 500Ghdd /home partition to /newhome. Now edit /etc/fstab (I use vi) and use the info added by YAST-Partitioner to set /newroot to / and /newhome to /home. This way you won’t have to manually enter the extensive disk ID info, just cut and paste. Note that some of the settings for a / partition are different than what is approptiate for a /newroot generic partition. Use the old information a a template (I recommend study the /etc/fstab before you start this). I just comment out (with # in front ) old rows to keep them for comparison purposes until the new /dev/fstab is working well.
  12. Exit the restore console, reboot and if your edits to /dev/fstab were correct, systemd should boot, or use System V. Once you get to a full GUI, use Yast-Boot to install a cleaned up MBR on sda.

If you are Linux only, enjoy you hot “new” laptop.

If, like me, you are still a dual booter (with Windows), read on.

Windows7 Migration:
I have not spent a lot of time with Win7, I use it when I have to. I learned a lot in this process, the big finding was that the disk management tools are now much improved(over XP and Vista) and are a big help in resizing file systems. Although there are tools that will supposedly migrate a live (running) Win7, such as Paragon , I was unable to get the resulting migrated partition to boot. YRMV.

Essential Tools for Windows7 Migration( there are many equivalents to these, Google is your friend here)

  1. Parted Magic
  2. Defraggler is a free defragmentation application that seems to work much better than the Windows native application. It does a much bettwer job consolidating files and has a GUI that makes you feel like you are making progress
  3. CCleaner is a free cleanup utility that seems to do a better job than the Win7 native program and might be helpful. It might be too aggressive, as a one point I seem to have lost some license files and the like, so use with caution.
  4. You will likely need you Win7 install CD to get into their system restore equivalent.
  5. Google search (on another working computer) to research error messages as they pop-up.
  6. The USB to SATA dongle

Note:–> What follows is a general map to the treasure, not precise since your environment might be very different. I was lucky enough to have a laptop with 2 SATA bays and the USB dongle, so could work 3 drives at a time.

A second note - I realized at the end of this process that my SuSE VM running Win7 could do a lot of the work for me, again because I had SuSE on one HDD (/dev/sdb at the time) and Windows on /dev/sda. I could have used the VM to defrag and shrink /dev/sda on the original hdd, then just copy the partition to the ssd. Maybe next time.
The more I use VBOX, the more impressed I am with what it does and how well it works.

Overall, I have about 10 clock hours spent on the Windows transition, due to a couple of missteps. A 30GB Partition clone takes about 3-4 hours, wasted if it screws up. It might take Windows 1.5 to 2 hours to shrink a 50GB partition.

  1. Backup your data files to an external hard drive or other network drive.
  2. Shrink the C: partition to fit your desired ssd footprint. This was a struggle, but I finally reduced 60+GB down to the low30GB, then expanded back to my final size.
  3. The first step is to reduce the used space on the C: drive. To succeed, you must first be able to see everything in Windows Explorer (a.k.a. file manager). Turn on view hidden files, turn off hide system files.
  4. Next essential step is to stop Windows from trying to save you from yourself. Turn off System Restore (which will create restore points hidden on your hard drive for everything you try to get rid of). Turn off automatic defragmentation, which might kick in during the inevitable reboots (uninstalling some SW packages requires reboot). Also, try turning off (suspending) your anti-virus, its keeps making and changing its own file slowing the process. Turn off paging (Computer setup - Performance) since the pagefile.sys file won’t relocate.
  5. First step is to run the Windows cleanup tool. Open Explorer, right click on C: drive and choose the Properties-Disk Cleanup option.
  6. The CCcleaner untility is a much more aggressive version of the native Disk Cleanup.
  7. In my case, I still had several gigabytes to reduce, a “cleaner” by itself won’t get it done. I uninstalled big software packages that I knew were easily reinstalled after transition and deleted big data files that could later be brought back from my backup… Keep going until your “used space” on C: is at least a few GB below your desired ssd partition size. I reduced to about 34GB, reinstalled on a 46GB partition.
  8. Once your used space is near the target, run defraggler to defrag the partition. From the GUI, you will likely sense that there are files that will not relocate, that is as far as you will get with the partition mounted and active(running).
  9. Start the Windows Disk Management utility(Control Panel-System-Administrative Tools-Create and Format hard drives). Right click on the C: partition and select Shrink Volume. This will run a long time analyzing the partition, then will come back with a shrink size and new capacity. On first try, it will likely not meee your size objective, but go ahead and let it run since the new, smaller size will be easier to work with.
  10. If you need to further shrink, you need to move the partition off line. Use Partition Magic-Clonezilla to clone the C: partition to a USB disk, then reboot to windows again and defrag the USB clone. Once the partition is off line, one or two passes of defraggler should be adequate, watch the defrag GUI… Then start Disk Management again, right click on the USB cloned partition and try Shrink Volume again. This should be able to shrink all they way down to your used disk size, I chose to re-size to about 2GB less than my desired ssd partition size.
  11. Now use Clonezilla again to move the new, small desired C:partition to your ssd. If you pre-partition the ssd with Partition Magic, Clonezilla will expand the copy to the new partition size.
  12. Install the ssd in the /dev/sda drive bay. Try to bot the Win7 partition, you may need to reinstall a Grub on the ssd using the Swerdna Tutorial above to get started. Now follow the error messages - you will likely need your Win7 DVD to attempt some repairs.
  13. When I was finally close, Windows started but with a blank lite blue screen (not BSOD), I was in Windows console mode, had never been there before. ALT-CTL-Del opened Task Manager, I could start some commands from there and determined that the registry thought Win7 was on the F: drive (which was the USB mounted copy location). The fix HERE post #12 worked for me.
  14. Keep Googling error messages if things don’t work. I was almost ready to give up and reinstall to the new partition from scratch(from DVD) when found the solution above.
  15. If/when I reinstall some of my uninstalled Windows applications, I’ll put them on the 500GB D: drive partition. I could not find a way to migrate them before hand.