Any way to change what partitions /home is on without reinstalling?
Hey slackers.
I am just curious if there is any way to change which partition my /home directory is on without reinstalling. I put my /home directory on a partition with very little space and want to put it onto the same partition as my root directory. Is this possible without a reinstall? Thanks in advance. draAx |
Sure,
As root, unmount /home and mount it somewhere else like /mnt/oldhome. Using the cp command cp -dpR /mnt/oldhome/* /home/ |
Quote:
Will this command make sure that my /home remains on the other partition even after a reboot? Thanks a billion draAx |
No, you'll need to edit /etc/fstab to give the correct location of the new partition to be mounted as /home.
|
Oops... btmiller is correct I forget a step. But all you need to do is delete the entry in the /etc/fstab file for the /home partition. Since your copying the files to the / partition you do not need another entry.
If you remove the /etc/fstab for /home the original data will remain intact. You can always mount it to another directory. |
You can also move it and then link it. FreeBSD did this (does this?) by default (back when I used it).
So you could mount your other drive/directories anywhere you wanted and then make links in /home to the whole thing or particular users directories. I did something like this once for ftp on a separate drive. |
Thanks for the replies!!
So if I understand this correctly I should copy my whole /home folder to say /mnt/homeold by using the command Code:
cp -dpR /mnt/homeold/* /home/ Code:
/dev/hda8 swap swap defaults 0 0 |
remove or comment out the line for /dev/hda6 so that the data you see is what is in /home and not that in /hda6
|
type:
man fstab |
All times are GMT -5. The time now is 08:00 AM. |