Author Topic: How do I move /home to a new blank partition?  (Read 1515 times)

Offline AdamR

  • Jr. Member
  • **
  • Posts: 34
How do I move /home to a new blank partition?
« on: July 13, 2011, 03:27:12 AM »
Hello!
I just installed PCLinuxOS from hard disk and I would like to move my "new" /home to a new partition (formatted, I used its as installation source). Does anyone can help me how can I do it?
Quote
Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x13731372

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    61432559    30716248+   7  HPFS/NTFS
/dev/sda2   *    61435899   195368959    66966530+   f  W95 Ext'd (LBA)
/dev/sda5        61435904   124350463    31457280    7  HPFS/NTFS
/dev/sda6       124359228   126961694     1301233+  82  Linux swap / Solaris
/dev/sda7       126976000   152141823    12582912   83  Linux <- my root with /home folder
/dev/sda8       152143872   195368959    21612544   83  Linux <- formatted, ready to move configs and files from sda7
and
Quote
# Entry for /dev/sda7 :
UUID=78995d6b-b725-4e79-8f39-623e19d01c8d / ext4 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=999e5bce-4a2b-4bf8-81f8-4ffd49b4e86d swap swap defaults 0 0
none /dev/pts devpts defaults 0 0
Thank you!
« Last Edit: July 13, 2011, 03:41:52 AM by AdamR »

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2413
Re: How do I move /home to a new blank partition?
« Reply #1 on: July 13, 2011, 03:39:36 AM »
Don't know about moving.

I chose my /home on a separate partition during the installation. Since it was long time ago I don't remember exactly the details so I won't instruct you.
May be this is the better way to have Home on separate partition so have in mind re-installation since you are "fresh".

But wait for the real masters, they could tell you better. :D

Offline AdamR

  • Jr. Member
  • **
  • Posts: 34
Re: How do I move /home to a new blank partition?
« Reply #2 on: July 13, 2011, 03:46:40 AM »
Yes, I would like to have a separate /home partition, but I was unable to use sda8 as /home partition during installlation :)
Now, when sda8 is ready for use, I must move /home from sda7 to sda8 :)

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2413
Re: How do I move /home to a new blank partition?
« Reply #3 on: July 13, 2011, 03:55:23 AM »
Yes, I would like to have a separate /home partition, but I was unable to use sda8 as /home partition during installlation :)
There is a simple way for sure. You have to choose manual installation though.
Please wait, I am sure many guys here can tell you exactly how to :)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10664
  • MLUs Forever!
Re: How do I move /home to a new blank partition?
« Reply #4 on: July 13, 2011, 04:26:51 AM »
Using a LiveCD ..... first back up the contents of the present /home somewhere ...  then ...

Copy the contents of the present /home to the spare partition, using rsync to ensure it completed correctly.

Next edit the fstab file on the installation to mount the spare partition as the new /home


I would expect everything to be OK on the next boot .... but I have been wrong before  ;) . . .


Yes, I would like to have a separate /home partition, but I was unable to use sda8 as /home partition during installlation :)
Now, when sda8 is ready for use, I must move /home from sda7 to sda8 :)

Why?
Is there something wrong with the partition?

That statement does not give confidence that the new /home will work  ...   

:(
« Last Edit: July 13, 2011, 04:32:47 AM by Just19 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AdamR

  • Jr. Member
  • **
  • Posts: 34
Re: How do I move /home to a new blank partition?
« Reply #5 on: July 13, 2011, 04:34:59 AM »
I have installed PCLOS from hard disk and sda8 was my store for installation files ("poor man's installation") :)

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2413
Re: How do I move /home to a new blank partition?
« Reply #6 on: July 13, 2011, 04:38:51 AM »
I have installed PCLOS from hard disk and sda8 was my store for installation files ("poor man's installation") :)
Use LiveCD as suggested by the lad Just19 or use a different partition for PoorMan's installation. It won't permit you to touch the partition that it is working from, that's why you couldn't choose sda8 I think.

Here's my fstab with the /home partition:

Quote
# Entry for /dev/sda1 :
UUID=7792ce6b-32ef-4862-abe4-2c9e291bf64f / ext4 defaults 1 1
none /dev/pts devpts defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
# Entry for /dev/sda5 :
UUID=e8a41b02-d011-4886-83a7-0ee994ca2db4 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=ba1db460-3502-449b-8188-ee9c18a02007 swap swap defaults 0 0

Offline AdamR

  • Jr. Member
  • **
  • Posts: 34
Re: How do I move /home to a new blank partition?
« Reply #7 on: July 13, 2011, 04:54:58 AM »
All right, I went to PCC-> Local discs -> Manage partitions, and mount sda8 as /home. Old /hom has been automatically moved to a new location.
Reboot and everything works well :)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda7 on / type ext4 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
/dev/sda8 on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Awesome distro :)

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2413
Re: How do I move /home to a new blank partition?
« Reply #8 on: July 13, 2011, 05:14:06 AM »
It was that simple :o

Bravo! :)