How to re-mount a different partition as /home?
When I installed Ubuntu 10.04, I installed it on a single 16GB partition which includes /, /boot, /home etc.
I have another partition on the system (ext3). It is easily accessible from the GNOME desktop Places menu: I just click that Filesystem HDD icon on the Places menu and it is automatically mount as '/media/1326f40a-45df-4ec'.
How do I make that partition re-mount as /home instead? (permanently, that is)
First you want the UUID of the drive so it can be reliably mounted.
sudo blkid
That will return a list of all your partitions and their UUIDs. Just note the UUID of the partition you want mounted as home.
Then you just need to edit /etc/fstab
to auto-mount that partition as /home
.
sudoedit /etc/fstab
And add a line like this:
UUID=0c89eb5d-ac58-46c0-b309-597b35a542e8 /home ext3 defaults,errors=remount-ro 0 1
Although obviously with your UUID, not mine. Save and reboot.
Here is the official Ubuntu documentation for moving to a separate /home partition:
https://help.ubuntu.com/community/Partitioning/Home/Moving
Just skip the step for creating a new partition as you already have it.
In looking up a similar issue I found this thread. I wanted to touch base on a couple things.
First, IMHO, the UUID is desperate and unworkable. There is a better solution than using the UUID that works on 10.04 of Ubuntu. That is to use the LABEL='label'
.
In the /etc/fstab file swap the UUID with the LABEL='<label>'
(and be sure to use the single quotes). Before doing this please ensure that you have used gparted to add a label to the drive. This label is just like the label you might have created to identify your floppies, your zip drives (not files), or even your old HDDs under Windows.
The next thing I wanted to touch on is that above someone gave the following command.
sudoedit /etc/fstab
That command I have never seen before. Either it is something that I didn't know exists or it is wrong. In the case that it might be wrong I'll correct the syntax.
sudo gedit /etc/fstab
Finally I appreciate the person that appears to have given the proper answer where you want to have a folder under the root of the partition as your home. The procedure described in this thread does not touch on that even though it is the most APPROPRIATE implementation. You should always put your home folder in a folder under the partition instead of pushing your home folder into the root folder of the partition.