Absolutely Tech

Icon

Yes!! Its absolutely tech…

[How-To] Move your Ubuntu Installation to new hard-drive

I had some hard-drive free space constraints and bought a new 500GB one. Now I wanted to transfer/migrate my current installation to the new hard-drive. Here’s how to do it.

First we need to copy the complete filesystem to the new drive. Connect both the drives to your computer and boot using ubuntu live cd. We need to boot using live cd because we can’t copy the filesystem while booted into it.

Mount both the partitions, that is – your older root partition and the newer root partition (I assume you have already partitioned your drive).

sudo mkdir /media/old
sudo mkdir /media/new
sudo mount /dev/sda7 /media/old
sudo mount /dev/sdb7 /media/new

Now copy using rsync.

rsync -ax /media/old /media/new

This will take much time as it will copy all the data to your new drive/partition.

After this, you’ll still have to setup your MBR (master boot record). For that you’ll need to install Grub on your new drive. Click here to find about how to setup grub.

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Reddit Post to StumbleUpon

Related posts:

  1. Recovering GRUB2 after hard-drive upgrade
  2. Auto mounting partitions at start-up in Ubuntu
  3. Recovering from corrupt upgrade from Jaunty to Karmic
  4. [HOW-TO] Restore recovery partition on Asus 1005HA
  5. My first day on Ubuntu – Installing Ubuntu

Category: Ubuntu (Linux)

Tagged: , , ,

Leave a Reply