change home partition
Rashkae
ubuntu at tigershaunt.com
Wed Jul 4 19:29:22 UTC 2007
ari sarkar wrote:
> I've feisty(/) installed in my pc. My HDD has one more free partition,
> on which I want to install a different distro for evaluation.(so that
> partiotion will be formatted at regular interval)
>
> here's current hdd structure:
> sda1: ubuntu root(8 GB)
> sda2: swap (1 GB)
> sda3: ubuntu /home (125 GB)
> sda5(logical): reserved partition for distro testing (22 GB)
>
> but during evaluation i may download/create files in the second OS.
> So I want to store those files in one common partition. for that reason
> I want to convert that partition from "/home" to a common data partition.
> And home should be moved to "sda1" itself.
>
> My qustion: can i safely do this without loosing my settings for ubuntu?
> I don't want to share "sda3" as common home. I already tried that before.
> different distros overwrite software settings which is troublesome.
>
>
Very easy.
First step is to wait a few hours after reading this for any helpful
comments people might make in case I've made an error in this message.
The safest, most direct way to do this if you are ok using the linux
command line, is to boot in Rescue mode from your grub menu.
create a new directory,
mkdir /home-new
Copy your old home to the new home, preservrving all file ownership and
permissions.
cp -a /home/. /home-new/
Unmount the home dir (you can't be in that directory for the umount to work)
cd /
umount /home
(note: the command is umount, not unmount)
Rename home-new to home
rmdir /home
mv /home-new /home
(Note: rmdir will not work unless home is empty, which it should be if
you've successfully unmounted it.)
Edit your /etc/fstab file and comment out the /home entry
nano -w /etc/fstab
Put an # in front of the line that that has the /home as the second
field. Save with Ctr-O then Ctr-X to quit.
Reboot the computer, the command is simply reboot
More information about the ubuntu-users
mailing list