Upgrading the main disk on a Thinkpad T450s

I recently swapped the SATA disk on a Thinkpad T450s, replacing the existing disk with a 2TB SSD. I was expecting some caveats, but it was pretty much as simple as "use dd and swap the disk out":

1. Clone the current disk

  1. Attach the new disk using a USB-SATA converter.
  2. Find a solution that lets you unmount all filesystems on the device to clone. dd copies blocks of bytes on the disk, so there is a risk of corruption if a file changes while dd is reading it. One way to do this is booting into a live Linux image (eg. via USB).
  3. Run dd if=/dev/sda of=/dev/sdb bs=4M status=progress to clone the device, where sda is the device you want clone, and sdb is the new disk. You can destroy your existing data if you get this command wrong, so if you don't understand dd and the arguments, consider using a dedicated disk cloning tool.
  4. Use fsck to check the new filesystem on the new device.

2. Swap the disk out

Physically replace the disk with the new one, which is quite simple on the T450s. To access the disk, you need to remove a few screws and pry open the case - there are many tutorials online.

3. Boot the new disk

  1. Boot the new machine.
  2. Resize any desired partition(s) on the new disk to make use of the additional disk capacity. This can quickly be accomplished with gparted.
  3. You'll also have to resize the filesystem on a resized partition. This can be executed on a live filesystem using size2fs $my_device.

That's it. The new device will have identical labels and UUIDs to the old one, so you may want to regenerate those if you're planning to re-use the old disk.