Enter your email address:

Delivered by FeedBurner

Move your home directory to its own partition

There are some reasons why you may need to move your home directory to its own partition, it could be because you run out of space, or because you may want to share it with another distro in a dual Linux boot installation, well lets start.

Preparing the new partition

This may be different in your environment, in my case I will do in the same disk, just in another partition, but you can use a complete new and different disk for you /home directory.

Gparted

If you do not have gparted, install it with

sudo apt-get install gparted

the call it with:

gksudo gparted

then use gparted to create and format your new partition

Once created and formated, it is time to move your /home

You may need to resize your / "root" partition to make enough room for your /home partition, or use another disk for it.

Moving your home directory

First logout from GNome or KDE, press Alt+F1 and login as root.

Follow this steps

mv /home /home.bak
mkdir /home
mount -t ext3 /dev/sda3 /home
cp -a /home.bak/* /home

Remember to change /dev/sda3 and ext3with your own data

We need one final step,

Open your /etc/fstab file, and add this line, in my case it is /dev/sda3 but could be different for you.

/dev/sda3       /home           ext3    defaults,errors=remount-ro 0    1

It there were a line for /home in you /etc/fstab file replace it with the new data.

with this finished, just reboot your system and enter as usually.

Important note

Remember to back up before using gparted if you are resizing your disk to make room for the new partition

Updated: Thanks to my Friend for some advices about how to improve this article.

Share/Save
NAS by Anonymous
I haven't tried this yet, by pvdg (not verified)
Thanks, I just moved home to by chazpaw (not verified)
Thanks for this! It worked by keishia (not verified)
Hi, Thanks. Your guide is by anurag (not verified)
The advice workes, I use by Merhart (not verified)
I thought the point of by Anonymous (not verified)
regarding to "login as root" by makl (not verified)

If this was useful for you, please consider making a donation, any amount is welcome, please proceed by clicking on the yellow donate button, thank you in advance.

Navigation

Recent comments