After a while, I finally came to understand how bind mounts are indistinguishable from "regular" mounts in Linux (other than by being mounted with --bind
). If /dev/sda1
is mounted on /mnt
and /mnt/variable_data
is then bind mounted on /var
, the only difference between the two is that the root of the filesystem on /dev/sda1
is mounted at /mnt
while the path /variable_data
on that same filesystem is mounted at /var
(in the virtual/root filesystem).
My question is two fold:
- Assuming that I have not run
mount /dev/sda1 /mnt
(meaning that there is no/mnt/variable_data
), how can I mount the/variable_data
insidesda1
at/var
? - How can the above be accomplished with
fstab
?