Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 03-12-2008, 03:22 AM   #1
Steve W
Registered: Mar 2007
Distribution: Ubuntu 12.04, XUbuntu 12.04
Posts: 504

Rep: Reputation: 44
Home directory on separate partition

I'm looking for the best way to set up my /home directory on a separate partition to my root directory. This setup is widely recommended for any Linux distro and I understand the reasons why. I've been researching how to do this, in Linux magazines and on the internet, but I'm getting more and more confused as to the way it should be done.

Part of the problem is that some methods go into detail about creating and formatting the partition itself, as well as copying the /home directory over. This does not apply in my case as I already have a spare 17Gb partition formatted as ext3. I just need to get my stuff over and tell the system this is where my new /home is located.

Could someone please go into detail as to the exact terminal commands I will need to do this? From the different methods outlined on the internet, it seems to be done using a variety of weird and wonderful commands such as rsync and other; some just use "mv".

There is also the question of whether I need to amend fstab to take account of the new location. One method detailed in a Linux magazine makes no mention of fstab at all; is it necessary to amend it or will Ubuntu just locate and pick up the /home directory automatically?

For instance, here is one method detailed in a magazine. It assumes all your stuff is currently on hda1, and you want your new home partition to be hda2:

mkdir -p /mnt/{root,home}
mount /dev/hda1 /mnt/root
mount /dev/hda2 /mnt/home
mv /mnt/root/home/* /mnt/home/
rm -fr /mnt/root/home/*

And that's it. No mention of fstab at all. Would this work in those five lines?

Obviously, I could just try it and see, but without knowing exactly what is going to happen, I don't want to risk messing up my system as it is now...

Could someone please advise whether I should go ahead using the above method, or do they have a better way?

Steve Wylie
Old 03-12-2008, 04:06 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
Old 03-12-2008, 12:36 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910

Closed Thread

home, move, partition

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Home directory on separate partition Steve W Linux - Newbie 23 03-19-2008 01:51 PM
Moving /home dir to separate partition before 7.10 install Thane Ubuntu 2 10-11-2007 06:18 PM
Put /home/username/.* files in separate partition? General Linux - Hardware 10 02-12-2007 02:02 AM
How - Kubuntu Dapper with separate /home partition Optiker Linux - Newbie 20 01-21-2007 05:20 PM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 05:52 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration