5

I'm running a linux server and have an encrypted partition. After a reboot, I manually log into the server, enter the passphrase and mount it at /home.

Is there a way to access the content of /home before the mount without unmounting the encrypted partition?

1 Answer 1

2

You can use the --bind option of mount.

mkdir /mnt/tmproot
mount --bind / /mnt/tmproot
ls /home # Still shows contents of mounted /home partition
ls /mnt/tmproot/home # pre-mount contents of mountpoint /home dir

Additionally mounting root partition this way will give you access to mountpoint directory contents in your root partition without their mounts, whilst also leaving existing mounts in place.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .