Mount /tmp and /home to separate hard drive
To have /tmp
and /home
on the same partition as each other but a different partition from /
, you'll need to do this:
-
Make
tmp
andhome
the two top-level directories on the partition you want to contain them. So if right now that partition is itself/tmp
, you'll need to move its entire contents to atmp
directory in its root. -
Give the partition that contains
tmp
andhome
its own mount point. A reasonable name for this istmp+home
(unless you plan to use that partition for other stuff too) and reasonable locations for it are/
,/mnt
, and/media
. I recommend putting it directly in/
and the rest of this answer assumes that's where it is. -
Give
/tmp+home
its own entry in/etc/fstab
. (You will see/tmp
has its own entry.) -
Make
/tmp
and/home
symbolic links to/tmp+home/tmp
and/tmp+home/home
.
Please note that this will not involve using these instructions for creating a separate /home
partition, because in this configuration, /home
will be a symbolic link into a separate partition, rather than a mount point for a separate partition.
Furthermore, you'll have to unconfigure your separate /tmp
directory (including removing or, better, commenting out its entry in /etc/fstab
), since /tmp
will no longer be a mount point for a separate partition, but will instead be a symbolic link into a separate partition.
This answer doesn't provide extremely specific instructions (though it should be sufficient, combined with the available documentation). If someone who has experience moving /tmp
can weigh in on whether or not it's possible/safe to move /tmp
while in the installed system, that would be helpful. I can give detailed instructions for doing this from the installed system or from a live CD, but I don't want to give directions that are ineffective or unsafe (nor directions that are unnecessarily difficult and time-consuming).
The easy way would be to make another /
partition with an install disk then reboot, and mount that partition temporarily in /media
or whatever then copy the /home
and /tmp
folders in the new /
root partition you mounted under media. Unmount it and reboot.