LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-05-2011, 12:50 PM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,372

Rep: Reputation: Disabled
how do I set /home on another partition?


I recently started keeping /home on a different hard drive partition. But on my latest reinstallation of one of the distros I use (heavily modified antiX), I forgot to specify where /home would be located, so it was of course installed on the same partition. Now that installation is complete and I am running the installed distro, how can I change the location of /home to the partition where I wanted it? I tried "adduser" with --home /sda1, but that didn't work (I didn't think it would)...
 
Old 10-05-2011, 01:00 PM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
If I understand you correctly, you would need to create a partition on sda (if that's your new drive), copy all the files from /home into that partition, then edit your /etc/fstab file to mount /dev/<new partition> as /home. For example, my fstab:

Code:
# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/sda12 /boot ext4 defaults 0 1
/dev/sda5 swap swap defaults 0 0
LABEL=ARCH / ext4 defaults 0 1
/dev/sda6 /home ext4 defaults 0 1
Here, I'm mounting /dev/sda6 onto /home with the ext4 file system - you'd replace sda6 with whatever the name of your new home partition is.

Hope this helps,
 
1 members found this post helpful.
Old 10-05-2011, 01:18 PM   #3
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,372

Original Poster
Rep: Reputation: Disabled
The partition is already prepared. So I just add "/home" to the relevant line in fstab? I see, thanks.

Last edited by newbiesforever; 10-05-2011 at 01:19 PM.
 
Old 10-05-2011, 01:30 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You also should move over (not copy) the files in your actual /home to the partition you want to use for /home, so that your users configuration files will be there.
 
1 members found this post helpful.
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to set up an auto-mounted keyfile based luks partition for your home direct LXer Syndicated Linux News 0 02-13-2009 06:50 AM
cannot write $(HOME).dmrc file home is on a seperate partition Person_1873 Linux - Newbie 5 12-07-2008 01:41 PM
,dmrc problem after moving /home partition to NTFS partition yeehung Linux - Newbie 1 11-14-2007 06:17 AM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:35 AM.

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