In Unix you can create links to other filesystem's at any point within the directory tree hierarchy.
So for example, if your SD card were mounted as /mnt
, you could simply go into another directory where there's a top level directory, and simply do this:
$ ln -s existing_dir /mnt
This would be in a directory such as this:
$ pwd
/usr
$ ls -l
total 120
dr-xr-xr-x. 2 root root 24576 Jul 5 05:11 bin
drwxr-xr-x. 2 root root 4096 Nov 5 2016 etc
drwxr-xr-x. 2 root root 4096 Nov 5 2016 games
drwxr-xr-x. 34 root root 4096 Jul 5 03:00 include
dr-xr-xr-x. 30 root root 4096 Jul 5 03:00 lib
dr-xr-xr-x. 45 root root 36864 Jul 5 03:13 lib64
drwxr-xr-x. 26 root root 4096 Jul 5 03:13 libexec
drwxr-xr-x. 12 root root 4096 May 2 10:39 local
dr-xr-xr-x. 2 root root 20480 Jul 5 03:13 sbin
drwxr-xr-x. 96 root root 4096 Jul 5 03:13 share
drwxr-xr-x. 5 root root 4096 Jul 5 03:00 src
lrwxrwxrwx. 1 root root 10 May 2 10:39 tmp -> ../var/tmp
And existing_dir
would be one of the above directories. Incidentally, notice that a similar approach is being taken with the /usr/tmp directory, where it's a link to another location.
Is this a good idea?
Probably not, unless you really know what you're doing. By doing this, you introduce the potential for some of your data to be on 1 HDD's partition while the rest of it being on the SD storage. If either of these fail, you'll lead to catastrophic failure of your system.
If you put the SD storage into the system, prior to installation/setup, you'd be a little better off, since, in theory, all the OS' filesystem would be contained on the single SD card.
I'd still probably not approach things this way, but that's just my $0.02.
/usr
. It puts things in/lib
and `/etc too. – slm Jul 05 '18 at 19:44