2

I need some help over here. I want to split my Ubuntu partition (which contains the root and the home folder) to two separate partitions, so I could only move my root partition to my SSD afterwards. Is this even possible?

3
  • It is possible, but it may be easier to do a fresh install as you are going to have to copy large amounts of data and likely manually modify fstab and grub. If you want to do this, you will need to do it from a live CD, make new partitions, copy the data to the new partitions, and then edit fstab and re-install grub.
    – Panther
    May 30, 2015 at 16:18
  • Do you have any freespace/partition in this computer?
    – Ron
    May 30, 2015 at 16:28
  • I have only 108GB left on my HDD while 166GB is already used (the partition has a size of 276GB).
    – Taw wab
    May 30, 2015 at 16:52

1 Answer 1

2

It is possible without a fresh installation but takes a bit of time and effort. Below are the steps:

1. Create a New Partition

If you have enough free space, you can directly use that as a partition by formatting it into an ext4 using gparted. If you do not have free space you should resize your partition (see Shrink a partition without losing data )

2. Copy /home to newly created partition

Mount the new partition if it is not already mounted. Copy /home to new partition by:

sudo cp -Rp /home/* /mount/location/of/new-partition

3. Modify the fstab File

First ge the uuid of the new partition by running:

sudo blkid

and backup the existing fstab file by:

sudo cp /etc/fstab /etc/fstab_backup

Now, open /etc/fstab by:

sudo gedit /etc/fstab

Add the following on a newline. Add the uuid of your newly created partition

UUID=<your-uuid-here> /home ext4 nodev,nosuid 0 2

Save and exit.

4. Move your home

cd / && sudo mv /home /home_old && sudo mkdir /home

Restart your computer and remove home_old by:

sudo rm -rf /home_old

Reference: http://www.howtogeek.com/116742/how-to-create-a-separate-home-partition-after-installing-ubuntu/

2
  • 1
    That is part 1, making a new home. Now you need part 2, moving the root partition to another drive, updating fsatab again, and updating grub.
    – Panther
    May 30, 2015 at 16:53
  • oops I missed it! Moving root requires to boot from live CD/USB. The following post detail the procedures: askubuntu.com/questions/40372/how-to-move-ubuntu-to-an-ssd
    – Ron
    May 30, 2015 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.