LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-02-2005, 03:28 PM   #1
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Rep: Reputation: 15
Create a partition for /home


I want to create a partition solely for the /home directory (and any other partion that you all insist would be a better way than my current configuration)

How do I go about this?

Here is my current configuration:
Code:
# /sbin/fdisk /dev/hda -l

Disk /dev/hda: 20.4 GB, 20491075584 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14        2394    19125382+  83  Linux
/dev/hda3            2395        2491      779152+  82  Linux swap
Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2              18G  8.5G  8.6G  50% /
/dev/hda1              99M  6.8M   87M   8% /boot
none                  189M     0  189M   0% /dev/shm
 
Old 05-02-2005, 04:06 PM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
You dont seem to have free space left on your hard drive. You either have to resize your partition and make new partitions and then map these new partitions to whichever base directories you want to be on seperate partitions.

Else backup your data and do a clean install.

My configuration is for 80 GB hard drive...yours could be different depending upon size of your drive

partition 1 to 6 are for slack...
hdb1 - /boot 100 MB
hdb2 - / about 10 GB
hdb3 - swap about 1 GB
hdb4 - extended
hdb5 - /home about 40 GB - for all my data
hdb6 - /var about 20 GB - i run a server so to keep it seperate

hdb7 - / for fedora about 8 GB
 
Old 05-02-2005, 04:57 PM   #3
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
Okay - then what about this possibility:
I add another physical drive and make that my new /home directory?

If my /home is part of the / (root) partition can I still simply edit the /etc/fstab file to mount /dev/hdb1 /home without any trouble? I found plenty of tutorials on how to move the /home partition - but my secenario is that my /home directory is in my / partition.
 
Old 05-02-2005, 05:06 PM   #4
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
sure you can add another drive and partition with fdisk. I am sure there are how-to's to move /home parititon to another partition.
 
Old 05-02-2005, 05:13 PM   #5
FiveFlat
Member
 
Registered: May 2003
Location: N. California
Distribution: FC3 2.6.9
Posts: 110

Original Poster
Rep: Reputation: 15
That's the thing - I have found plenty of how to's but they reference moving /home as a partition to a new one - not as a directory in the root partition.
 
Old 05-02-2005, 05:40 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you currently are using a /home directory in the / (root) partition, and you want to mount (/home) on another disk, you will need to move everything over from the old /home directory to the new partition, because mounting a partition as /home will cover up the contents of the old directory.

To make things easier, perhaps
A) Log in as root.
B) umount /home
C) mv /home /home-old # This will rename the directory, not move the files.
D) mkdir /home # This is where you will mount the new partition.
# Now both your users' home directories and the new /home partition
# can be accessed at the same time.
D) edit your old fstab file to mount the new drive as /home
E) either copy everything from /home-old to /home or edit the /etc/passwd file and change the home directory entries to 'home-old'.

The location of each user's $HOME directory is listed in the /etc/passwd file. This allows you to distribute users' home directories to different drives. That way you can simply add another drive to make room for new users. It's also possible to use a networked drive as your $HOME. So if you have both a laptop and a desktop, you could create a user on the laptop (with the same user name and user id as the desktop) and use your networked desktop home partition as your $HOME on the laptop.
 
  


Reply



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
Using partition magic to create Linux partition then install EviLBoX Linux - General 5 09-12-2008 05:01 AM
Create a /home partition. Michael Johnson Linux - General 3 07-06-2005 10:09 AM
create a music score for a home movie jackstoage Linux - General 6 06-12-2005 11:31 PM
How to resize a partition and create/mount a new partition? Maarten_Holland Linux - Newbie 1 04-20-2005 08:56 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 - Newbie

All times are GMT -5. The time now is 09:31 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