I have 1 TB SSD and a 120 GB SSD. I'd like to use the 120 drive for

  • /
  • /var
  • /etc

and so on and make a very minimal home folder on that drive. I would then like to mount another drive (which I would name home) over my home folder.

Is this possible?

  • See this. Skip the parts that don't apply to you. – Ashhar Hasan Mar 13 '16 at 3:58
  • I like to keep all system folders inside / (root) partition on SSD, so system is fast including hidden user settings in /home. But I have large data partition on HDD for all data which I mount at /mnt/data and link all folders like Documents, Music, etc back into /home. askubuntu.com/questions/524943/… Why separate /var & /etc if all on SSD. Often better then as one partition as part of root. Server installs may want separate folder to isolate users & functions. – oldfred Mar 16 '16 at 13:29

(!) Be carefully following these tipps (!) because targeting the wrong device may destroy the data on your 120 GB disk (!)

Guessing you 1TB drive is /dev/sdb:

Setup a the new disk with the desired partition:

sudo fdisk /dev/sdb

create a new partition table - command: o
create a new partition - command: n   (accept all proposed values)
specify the type of the new partition - command: t / Type 83
write the data to the disk an leave fdisk - command: w

format the new disk / partition:

sudo mkfs.ext4 -L Home /dev/sdb1

mount the new partition temporally, change owner and copy your home-directory:

mount /dev/sdb1 /mnt
chown -R $USER.$USER /mnt
cp -a $HOME/* /mnt/

unmount the partition

umount /mnt

look for the uuid assigned to your new partition:

sudo tune2fs -l /dev/sdb1 | grep UUID

edit /etc/fstab and add a line:

sudo vi /etc/fstab

the new line (take the uuid from the tune2fs command) and replace USERNAME with your username / name of your home directory:

UUID=15cc846c-36e4-42dd-8bfe-30acc8965d51 /home/USERNAME          ext4    defaults        0       2

After rebooting the system you see the 1TB partition mounted as your homedirectory. If the mount fails you see your old homedirectory as a kind of fallback.

| improve this answer | |

If I understand correctly a simple solution is just to use the mount command if the driver doesnt automatically mount and then using the ln command create a link of your driver to your home folder

basicly your systems should automatically detect the additional driver and you should be able to see it in your devices in your Files. You can then make a link using ln (kind of like a shortcut in windows) from the driver that would be in your /media/"username" to your home folder.

you can't however override your home folder with the new driver, but if thats what you want to do I recommend just create your home folder in your other driver.

| improve this answer | |
  • It would be great if you could edit your answer and add some more information. – Vishnu N K Mar 13 '16 at 3:16

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