Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Thanks to this thread I know now that I should've done this during the installation part. But I didn't.

So I'm left with my system partition and a old home partition that acts as an extra drive. I would like to know or it still possible to mount the old home partition back. I rather keep my data on that partition but if that is not option I still want to move my home folder. My system partition is just too small to host the home directory.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I cannot test this, but I think it's worth a try. Without logging into X, switch to a console [CTRL][ALT]+[F1]. Login, become root, make a directory to store your current home directory, and then modify the account to move the current home directory.

sudo su -
mkdir /mnt/tmp
usermod -d /mnt/tmp/$username -m $username
logout

Login again without X. Define your home partition in /etc/fstab.

sudo su -
vim /etc/fstab

It might look like this: /dev/sdb1 /home ext4 defaults 0 2. When correctly defined, mount it, make sure permissions are ok, modify the home directory again, and then move the files from the old home to the new home.

mount /home
chown -R $username.$username /home/$username
usermod -d /home/$username $username
logout

Login again with X.

sudo mv /mnt/tmp ~
sudo chown -R $username.$username /home/$username/tmp

Does this work as intended?

OR

You can create a new directory, like /users. Mount the disk inside users. Change permissions on /users/$username to match your username, and then change your home directory path with usermod.

share|improve this answer

You can do 2 things:

  • boot live CD, find what drive is current home and your old home (you can use nautilus) then open fstab on disk (not live CD) that is on /media/<your-roots-UUID>/etc/fstab (you can find UUIDs with df -h ) and switch the mount points

  • you can copy old home to the new location and vice versa (in that case make sure you copy also the hidden files so you get configs too and encrypted folder if you have one)

good luck!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.