How do I mount a folder from another partition?
Yes but before I go that far, couldn't you just symlink?
ln -s /media/tc1/folder ~/home
This link is just a file that is interpreted. It is automatically permanent (until you delete the file).
Failing that you can use mount
as you described but the syntax is slightly different:
mount --bind /media/tc1/folder /home/dvad/home
This is not permanent at all, and will be nuked by a restart. If you want it to persist, you'll need something in your /etc/fstab
like this:
/media/tc1/folder /home/dvad/home none bind
If you're trying a mount and it's not working, you should make sure that the block-level device is mounted. You can't directly mount a subdirectory of a partition without first mounting the partition.
An alternative to mount
:
bindfs -n /media/tc1/folder /home/dvad/home
Requires sudo apt-install bindfs
.
Like with mount
, this will be a (non-permanent) actual mount point, i.e. for instance not tracked as only a reference but version-control systems. But like ln -s
, it does not require superuser permissions like mount
does.
Unmount with fusermount -u /home/dvad/home
(or by restarting).