I have 1 TB SSD and a 120 GB SSD. I'd like to use the 120 drive for
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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
(!) 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
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.
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.