Will Reinstalling the OS Erase Data in a Bind-Mounted Folder on Another Drive?
Asked by
molecular_model_
My operating system is installed on drive A, while a folder containing data is stored on drive B. Drive A has a bind mount that makes the folder on drive B accessible through a directory on the OS drive. If I boot from a USB installer and install a new distribution over drive A, will the contents of the folder on drive B remain safe?
Answers
The bind mount itself wonโt survive the reinstall because it has to be recreated at boot, usually through the new systemโs mount configuration. That affects how the folder is accessed, not the folderโs contents on drive B. Still, verify the target drive and partitions carefully because choosing the wrong one in the installer would erase it.
Reply to this answer
If youโre reinstalling from a USB and only formatting or repartitioning drive A, the data on drive B should not be affected. A bind mount is just a kernel-level mapping; it doesnโt copy the files or make them part of drive A. The mount configuration will disappear when you replace the OS, so youโll need to recreate it afterward.
Reply to this answer
The main risk is different from formatting a partition: a recursive file deletion such as deleting everything under a mounted directory can remove files inside the mounted filesystem. However, an installer formatting only the OS partition does not normally recurse through bind mounts onto another drive. If you want extra protection, disconnect or temporarily disable drive B during the installation, then reconnect it afterward.
Reply to this answer
Add your answer
Answers are reviewed before publication.
another tab open: Before installing, double-check the installerโs partition and formatting selections. Make sure drive B and its data partition are not selected for formatting or deletion.