I cannot test this, but I think it's worth a try. Without logging into X, switch to a console CTRLALTF1. Log in, make a directory to store your current home directory, and then modify the account to move the current home directory.
sudo mkdir /mnt/tmp
sudo usermod -d /mnt/tmp/$USER -m $USER
logout
Login again without X. Define your home partition in /etc/fstab
.
sudo 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.
sudo mount /home
sudo chown -R $USER: /home/$USER
usermod -d /home/$USER $USER
logout
Log in again with X.
sudo mv /mnt/tmp ~
sudo chown -R $USER: /home/$USER/tmp
Does this work as intended?
OR
You can create a new directory, like /users
. Mount the disk inside users. Change permissions on /users/$USER
to match your username, and then change your home directory path with usermod.
I've done this quite often now - almost every time I did upgrade my system or (especially) if I switched to another distro.
I normally log out, go to a console and log in as root directly (or depending on system configuration, as another user and switch to root), cd to /home folder and simply change my user's home folder name e.g. to "myUserName.bak".
e.g.:
sudo mv /home/myUserName /home/myUserName.bak
After installation I can safely move all data needed to the newly created home folder for my user. (That's also a good point for thinking whether you e.g. really need that folder of big files you never touched the last 2 years ;) )
edit as suggested by comments:
before you can access the files and folders from your renamed home folder you have to
sudo chown -R newUser.newUsersGroup /home/myUserName.bak
Best Answer
Ubuntu has always supported this, but it's hard to kill the myth that you need a separate partition in order to preserve your data. Stick the CD in and just reinstall over it:
References: