I have Ubuntu 14.04 with a lot of packages and work related stuff that I am very happy with it. It's installed on my main ssd drive which is a 120gb one i had chosen when i installed ubuntu so i believe everything should be on this drive It shows up as /dev/sda

Now i'm adding another ssd to my computer which is 240gb I do not have any other storage media at hand at the moment (e.g. external hard drive).

Since the new 240 gb drive has obviously more capacity and is faster a newer generation than my 120 gb drive i want to move my linux system to this new drive This new drive shows up as /dev/sdb and at the moment it is not formatted or anything (I have literally unpackaged and inserted in my PC right now :P)

Tell me the best way to mount linux installed on the new drive?

I can change the sata cable so that the new drive appears as devsda if necessary

This is the output of "fdisk -l" if that helps.

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00076d7a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   226064383   113031168   83  Linux
/dev/sda2       226066430   234440703     4187137    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5       226066432   234440703     4187136   82  Linux swap / Solaris

Disk /dev/sdb: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
Best Answer


It can be done in some ways The easiest one is just copying all files from the old drive to the new one

  1. Create ext4 and swap partitions on the new drive

  2. Boot from liveusb.

  3. Mount the old ubuntu partition to some directory mount the new one to some other directory

  4. Copy all files from the old one to the new one using cp -a command.

  5. Install grub on your new drive

  6. Update /etc/fstab with new UUIDs.

If something is unclear i can add explanations