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 01-29-2006, 01:28 PM   #1
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 39
Moving my home folder.


I've currently got my home folder mounted on the same (small) drive as Linux is installed on.
I've added a 200G drive, which is mounted at /FAT32 because that seemed like a good idea at the time.

I want to amalgamate the two, so my home folder is 200G.

If i copy the contents of my home folder onto what is now called /FAT32, and edit fstab to mount the big drive as my home folder, would creating a symlink called /FAT32 to replace the old mount work to stop me breaking file paths?

Would i be likely break anything in doing this?
 
Old 01-29-2006, 01:51 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
This is what you can do.

edit:
New thought from your question, If the new partition is created as ext2 or ext3 then mount it as /home_new. Then you can rename /home to /home_backup and then make a softlink to the new /home_new directory.

At the root of the drive
mount the new partition to /home_new
copy contents to mounted /home_new
mv /home /home_backup
mkdir home
ln -s /home_new /home
add the needed line to /etc/fstab to automount the new partition to /home_new

Only issue might be a permissions block but not sure, the best way is below.
edit:


First gather the needed info the /dev to each partition you will be working with.
You can get this from the command ' /sbin/fdisk -l '. Requires root to run it.

Know which partition contains the following directories /home /etc, and new but temporary /home_new.

* First make the partition formatted as ext2,ext3,rieresfs, or what ever linux type format you perfer. Fat32 will not get it. Reason Fat32 does not handle links.
* Next once the partition is created mount it temporary as /home_new
* Then copy the contents from /home to /home_new.

This is the way I would do the following.
* Shutdown and reboot with a Live CD or Rescue CD
* From there mount the partition that contains /etc directory
* Also mount the partition to /home if it is not he same.
* Now rename the orginal /home to /home_backup. command to use if not using a gui based Live CD. ' mv home home_backup '
* Now edit /etc/fstab and add a line like this. Note the /dev/hda8 is my location, yours may very. Also I use ext3 for the type of format on the partition.
Line will look like this.
Code:
/dev/hde8               /home                   ext3    defaults        1 2
Unmount all partitions and reboot without Live CD.

Hope this helps.
Brian1

Last edited by Brian1; 01-29-2006 at 01:59 PM.
 
Old 01-29-2006, 02:08 PM   #3
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
There is a nice step-by-step guide on how to do this here: http://www-128.ibm.com/developerwork...-partplan.html

You want to make sure that when you copy you /home directory, you use the command "cp -ax" as stated in the above mentioned guide. Otherwise, you will likely have problems with file permissions and ownership.
 
  


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
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 02:09 PM
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM
Moving home folder under Knoppix Lemop Linux - Newbie 1 01-22-2005 02:29 PM
moving a file to a folder gets error jackstoage Linux - Newbie 3 04-02-2004 10:18 AM
gnome home folder and trash folder ambelos Linux - Software 2 02-24-2004 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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