Re: change home partition



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


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Determining process preventing umount of busy partition
    ... have a file open in the /usr partition. ... Users' home directories are on /home which is separated ... and assuming I want to umount /usr ... umount: unmount of /usr failed: Device busy ...
    (freebsd-questions)
  • Re: umount -f implementation
    ... operation and unmounting of the partition) it is totally impossible to ... so it can happen that also umount -f ... the thread doing "umount" can also get stuck in an msleep() ... unmount, it should just happen in a normal unmount case. ...
    (freebsd-current)
  • Determining process preventing umount of busy partition
    ... I'd like to ask how to determine which process keeps a partition ... in state "busy" so that umount will refuse to unmount this partition. ...
    (freebsd-questions)
  • Re: Determining process preventing umount of busy partition
    ... in state "busy" so that umount will refuse to unmount this partition. ...
    (freebsd-questions)
  • Re: fc9 and rhel5 shared /boot and lvm coexistence
    ... physical volume on the only other partition on the disk - this is shared between both distros ... So far no issues whatsoever with sharing /boot, though its worth mentioning FC9 doesnt appear to account for an grub already existing. ... Suprisingly I've never come across this in all my years with lvm -- 'sudo vgchange -a y VolGroup_$NAME' brought it back to active, ... but I did notice my 2nd distro install did use BOTH swaps and put an entry in fstab. ...
    (Fedora)