Migrating Linux OS from 256GB to 512GB SSD

Thought I’d document how to migrate a Linux OS to a larger disk using 100% FOSS tools. 256GB is a bit pokey these days especially when dual booting, virtual or otherwise. Let’s get to it:

The first step is optional & can be disregarded if you are familiar with partitioning but is handy if your a newb like me. In this example we will clone sda to sdb, both disks can be identified by there volumes.

  1. We will start Clonezilla in disk to disk mode & proceed to clone the smaller volume to the larger. The advantage of this is an exact copy of your smaller disk will be created to use as a template.
  2. Using GParted, whilst keeping boot & swap untouched, we will delete the home partition. Now grow the root partition, for arguments sake, to double the size. Apply, You may see an error state if root partition is BTRFS, this can be safely ignored. Recreate home partition with remaining space. Apply & execute all changes.
  3. Now we will reboot into Clonzilla, this time being careful to start in partition to partition mode. Now we will need to select our root source partition (smaller volume) and our root target partition (larger disk.) Clone being sure to recreate the partition table proportionately. We will want to repeat this for our home partition.
  4. Now to increase the size of your VM;

cd /var/lib/libvirt/images

sudo qemu-img resize generic.qcow2 +20G

This worked perfectly with BTRFS / & XFS /home, any less exotic file systems should be a sinch. Happy computing!

Advertisements
This entry was posted in Computers, Linux, Open Source, openSUSE, PC. Bookmark the permalink.

Holler!!!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s