I’ve been using an old Lenovo laptop ever since I accidentally submerged my Macbook Pro in several acidic liquids. (Yeah, don’t ask.)
It’s about six or five years old by now. It’s no beast but it’s definitely more than enough for trivial tasks like watching YouTube, web browsing, and some programming.
Just don’t try to compile Chrome on it:
- Intel Core i3 4030U @ 1.90 GHz (2 cores, 4 threads)
- Intel HD Graphics
- 8 GB DDR3 (Ramaxel)
It came with 4 GB of RAM, but I upgraded to 8 GB in early February 2017.
The computer would consistently take a few painful minutes to wake from hibernation or even just boot. Linux boot times were better but I was missing 3 to 4 second boot times from my Mac. Or really, boot times from anything with an SSD.
Apps and programs were pretty sluggish to launch, especially web browsers such as Chrome, Firefox, and anything that used Electron. Disk operations were incredibly slow. They also had a tendency to slow down the entire machine if I was moving around large amounts of data. I’m not really sure if that’s normal.
A glance at some system information tools told me that the machine came equipped with a ST1000LM024, also known as a “Seagate Momentus 1 TB 2.5-Inch SATA III 5400 RPM 8MB Cache Hard Drive”. Uhh, only 8 MB of cache? (I don’t know if that’s too little.)
I don’t mess with hardware all that often, so this entire experience was pretty exciting.
I got my hands on a Q500 Solid State Drive from Kingston, with 240 GB of capacity. This would be enough to host Windows along with some other data that I wanted to keep close by. Most of my documents live on an external 1 TB SSD that I keep connected at all times, so having the main drive be a bit small wasn’t too much of a problem.
Before I could install it, I had to clone the entire disk so that I could restore it to the SSD later. This proved to be difficult, because the disks had different capacities. Luckily, I was only using about 110 GB or so on the HDD, so in theory I shouldn’t have any problems moving the data. In theory.
Modern Windows has a partition table that looks like this:
- Boot (ESP)
- Microsoft reserved partition (MSR)
- The operating system and all of your important data
- Windows recovery
This was a clean install, so there was no OEM partition, which would normally be between ESP and MSR. (By the way, this is all documented by Microsoft here).
Recovery being at the tail end of the table looks a bit weird, but apparently this is so that it can be recreated and resized at any time without having to mess with the main partition. Fair enough, I guess?
Before I cloned the disk I resized the Windows partition to around 120 GB. (Luckily Windows lets you do this live while booted.) This left several hundreds of gigabytes of empty space between Windows and the recovery partition.
This was concerning, but I figured that any well-engineered backup software would skip over this empty space and somehow allow me to restore it to a smaller disk by letting me adjust the size of the resulting partitions after the fact in order to match the new capacity.
I first tried Clonezilla, which has a “clone disk to image” feature. I used this to duplicate the entire disk to the external SSD that I have. Luckily, empty sectors are excluded from the imaging process, so the huge section of empty space that was created from the shrinking process wasn’t problematic at all.
The entire cloning process took about 30 to 40 minutes, which wasn’t too bad. Clonezilla’s interface was a little confusing, but it wasn’t impossible to figure out. Reading the dialog prompts is imperative here.
Now it was time to restore. But there were problems.
First of all, Clonezilla straight up doesn’t like when the target disk is
smaller than the source image. I’ll admit that I was almost expecting this to
happen, but I was hoping that it was possible somehow. The first time around I
-k1 option to resize the partition table proportionally, and
-icds in order to make Clonezilla ignore the discrepancy in disk sizes.
The partition table resized weirdly–there wasn’t enough space on the main data partition, and the recovery partition was way too big. This caused the restoration process to fail after another 30 minutes of waiting or so.
The second time around I only specified
-icds in hopes that I could resize the
partitions after restoration in order to get the layout I wanted. This also
failed late into the restoration process because the partition tables were not
the same size: since I didn’t specify
-k1, it was trying to write a partition
table 1 TB big into a 240 GB drive. No dice.
After the second failed attempt I realized that Clonezilla lets you manually
create a partition table, and it’ll restore the partitions into that layout,
mapping each one into its corresponding destination. This seemed perfect, so I
-k2 option to manually partition the disk myself.
This took a bit of sector math and looking up partition GUIDs, but that wasn’t too bad. Now to let it restore for the third time.
…Aaaand it failed.
I had left Windows “hibernated”, so
ntfsresize was not happy. Windows
hibernation is a feature where Windows will save the contents of RAM upon
shutdown (or when explicitly told to hibernate) so future “boots” will be much
quicker. This feature is enabled by default.
So yeah, lesson learned. If you’re gonna touch a Windows disk with imaging software, turn off hibernation (or as it’s called in the Control Panel, “fast startup”) beforehand.
This can be done like so: Press WIN + S, type “Power & sleep settings”, mash ENTER, scroll down and open “Additional power settings”, click “Choose what the power buttons do”, press “Change settings that are currently unavailable”, then untick fast startup.
You’ll probably want to turn this back on later, as it does make boots fast.
There were also some write errors when restoring the recovery partition, but I figured that those could be fixed later.
Despite all the errors I tried to boot anyways, which, surprise, didn’t work. Windows is missing a critical boot file! Attempting a repair from an installation drive didn’t work, either. Damn.
During my research I stumbled upon another program, which seemed to be the holy grail of proprietary Windows imaging software: Macrium Reflect.
The first thing to do was to create a “rescue media” so I could restore the image. This took a while but was easy enough. Interestingly it seems to bootstrap a minimal Windows environment onto the drive you choose.
Interestingly it took a long time copying over the Wi-Fi driver, which I didn’t need at all. Network support’s neat, though.
Alright. Next task–clone. Again. This was also easy and straightforward with the tool. The good part is that I didn’t have to reboot into the media I just made, as Macrium can clone a Windows installation as it’s running. Magical.
Then came time to boot into the rescue media, which took awfully long to load the network driver. Hmm… I am sensing a pattern. Okay, restoration time.
Luckily, Macrium is perfectly capable of restoring to a smaller disk, and I get a nice, intuitive interface to specify the resulting partition sizes with draggable boxes. Ahh.
With everything squared away I was able to restore and finally get up and running.
Predictably, everything is much faster with a solid-state drive. Boot took mere seconds and programs didn’t have to warm up anymore.
A “Time from power button being pressed to Discord’s friends list being loaded” comparison:
- HDD: About 3 minutes
- SSD: About 44 seconds
Discord automatically launches itself when I log in, so it was a nice metric to measure when everything was relatively ready to go, more or less.
The SSD only takes about 15 seconds to just get to the desktop, and I’d say that boot takes about 7 seconds when hibernated. I haven’t measured cold boot times and I don’t think I’ll bother to.
I think this experience has gotten me to appreciate repairable and upgradable devices a whole lot more.
- SSDs are necessary for a good computing experience.
- Turn off “fast startup” before cloning, or use something that can clone a running installation.
- Proprietary tools are sometimes just less painful to use.