LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Relocate /home to seperate partiton. (http://www.linuxquestions.org/questions/linux-newbie-8/relocate-home-to-seperate-partiton-803657/)

damgar 04-22-2010 10:07 PM

Relocate /home to seperate partiton.
 
I recently did a single partition installation of Slackware on a multiboot system. It was probably a silly choice because I already run Slackware on 2 other machines. Anyway, I have chosen to delete the other distros and I'm wanting to move /home to a new partition, but I've never done it before so I was wonering if it would be enough to:

Make a new partition
edit fstab
backup /home
mount -a
restore /home's contents.

kbp 04-22-2010 10:14 PM

I'd probably do it more like:

-Configure new storage
-boot to single user
-mount new storage on a temporary mount point - /tmp/new_home ?
- 'cp -a /home/* /tmp/new_home/'
-edit /etc/fstab and change target for '/home' to new storage
-reboot

cheers

mazinoz 04-22-2010 10:17 PM

I think it should work, but to be on the safe side backup any /etc/*.conf files and home files on the new setup, at the very least. Gparted is very easy to use to repartition hard drive. You do need to reboot though for the new settings to be read by fstab. I can't remember but think gparted already edits fstab for you. The only problem I can see is you may need to decide which /home/.mozilla/ bookmarks and history, Desktop and so on you want to keep before you restore.

Sorry, need to add that you could use Ubuntu live CD (with gnome desktop) to do the gparted (commandline: gparted)

damgar 04-22-2010 10:31 PM

Everything seemed to work, but some part of Gnome had mounted my new partiton as /media/disk-1 so I had simultaneous mounts of the same partition.
Code:

umount /media/disk-1
cleared up the dual mounts but I went ahead and rebooted just to clear up any confusion that might have persisted. Luckily I didn't bother creating any user accounts (other than root) prior to deciding to go full time with the install so really there were only a few dummy directories to copy.

Thanks. :)


All times are GMT -5. The time now is 11:37 PM.