LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to add /home partition after installing linux (https://www.linuxquestions.org/questions/linux-general-1/how-to-add-home-partition-after-installing-linux-348288/)

asifqaiyum 07-30-2005 05:24 AM

How to add /home partition after installing linux
 
Hi All,

I just want to ask simple question: Is there any way to add /home paritition after installing linux?

Basically, right now, i have just one "/" root partition, but now i want to add another partition for user files.....I am using Fedora Core3.

What I think is I will free one of my windows partition and then format it with /home in linux...but I am curious about the after all effects on /home folder on the root partition.....????

Can anyone help me to take out of this problem???

Thanks,
Asif Qaiyum, Islamabad.

musicman_ace 07-30-2005 05:37 AM

I'm going to assume you either have extra space on your current hard drive, or that you are adding a new hard drive. I'll be referring to the new partition as /dev/hdb1, but you'll need to use the drive and partition number that corresponds to the partition you create.

There are multiple ways to do this, but here is what I've done before.
1. create a new partition on the empty space of your hard drive.
2. mount your new partition.
Code:

mount /dev/hdb1 /mnt/new
3. backup the /home directory  
Code:

tar cvjfp home.tar.bz2  /home/*
3. move the tarball to /mnt/new  
Code:

mv ./home.tar.bz2 /mnt/new
4. umount /mnt/new and remount as /home.
Code:

umount /mnt/new && mount /dev/hdb1 /home
5. unpack your tarball.
Code:

cd /home && tar xvjpf ./home.tar.bz2 /home
6. Edit your /etc/fstab to reflect to new mount point.


This should take care of it.


All times are GMT -5. The time now is 12:51 PM.