Creating A seperate Home Partition In Ubuntu

gnome-dev-harddiskRunning your Ubuntu installation with a separate home partition has many benefits, mainly being easier distribution upgrade (which is every six months) which enables you to upgrade the operating system in isolation, leaving your home folder along with all your documents untouched. The process of creating a separate home partition is slightly tricky but not at all impossible

Creating A Separate Home Partition

Note: you will need your Ubuntu live CD, as a security measure Ubuntu does not allow editing of the partition where the operating system resides on.

1. Boot into your live CD session

2. Using Gparted, resize your operating system partition (usually sda1 or hda1) to approximately 6GB, you can choose any size for your operating system partition however it musnt’nt be less that 4GB.

3. create a new partition to fill the free space you have just created in step 2

4. Now boot into your installed Ubuntu system and open the terminal, Mount the partition you created in step 3 (replace sda3 with your new home partition designation, quick way to check is to use your system monitor >>f ile systems)

$sudo mount /dev/sda3

alternatively you may also mount this partition using the places menu in the top panel, if you feel more comfortable using the graphical user interface

5. Copy your home folder over to the new partition (again replace sda3 with your new home partition designation, quick way to check is to use your system monitor >>f ile systems)

$sudo cp /home /media/sda3

6. Change the permission of your new home partition so that your account has access to it’s files

$sudo chown username:username /media/sda3/ -R

7. We need to back up your current home partition, just in case anything goes wrong. Type in the following command

$sudo mv /home /old_home

8. Now we have finished preparing the new partition, we will now set the new partition as the home folder.

$sudo mkdir /home

9. Lastly we need to set the new partition to mount as the home folder everytime the system boots

sudo gedit /etc/fstab

This will open a text file in Gedit, enter the following lines to the end of that file

/dev/sda3 /home ext4 nodev,nosuid 0 2

Take note of the partition designation,replace sda3 with the designation of your new home partition and also replace ext4 with the filesystem type that you created your new partition with.

Save the file and reboot your computer. Your pc should now be using your separate home partition as its home folder. If anything went wrong and it doesnt work, boot into your live CD session to rescue your old home from the /old_home folder

Restoring your seperate home folder partition after upgrade/new installation

The process of restoring your separate partition to the home folder is similar to the process above.

1. Boot into your newly installed Ubuntu operating system

2. Back up your home folder

$sudo mv /home /old_home

3 create a mount point for your separate home partition

$sudo mkdir /home

4, Mount your home partition and change its file permission (note change sda3 to the name of your home partition)

$sudo mount /dev/sda3

$sudo chown username:username /media/sda3/ -R

5. Edit your fstab file

sudo gedit /etc/fstab

This will open a text file in Gedit, enter the following lines to the end of that file

/dev/sda3 /home ext4 nodev,nosuid 0 2

Reboot your computer and presto, your separate home partition is restored

Thats it all done, I hope this was a useful and informative guide to getting your home folder onto a separate partition

Related posts:

  1. A look at the upcoming Ubuntu 10.04 aka Lucid Lynx Merely 2 months after Ubuntu’s recent Karmic release, developers have...
  2. PiTiVi To Be Included In Ubuntu 10.04 Speculations were recently confirmed that the open source video editing...
  3. Ubuntu 9.10 beta – First Look Ubuntu 9.10, scheduled to be released later this month will...
  4. How To Install Global Menu on Ubuntu Global Menu is an application for linux that emulates the...
  5. Ubuntu Identity Overhaul A new logo, a new identity. The upcoming release of...

Tags: , , , , , , , ,

blog comments powered by Disqus
`