Home | Catalogue | Robert's Blog
Last Updated: [2023-12-25 Mon 06:34]
Sometimes you'll find yourself in a situation where you need to access the root partition of a Linux system without mounted disks being in the way. Examples include:
du
to hunt down large files or
directoriesIt is certinaly possible to do this, and quite simple too. It is
achieved by creating a mountpoint, then using the bind function on the
mount
command to mount and already mounted
filesystem at a new location:
sudo mkdir -p /mnt/tmproot
sudo mount --bind / /mnt/tmproot
In this example, the root directory is mounted at /mnt/tmproot
When you're done, you can unmount the directory in the usual way:
sudo umount /mnt/tmproot
DISCLAIMER: The information provided on this website is generated from my own notes and is provided "as is" and without warranties. Robert Ian Hawdon can not be held responsible for damages caused by following a guide published on this site. This website contains links to other third-party websites. Such links are provided as convienice of the reader. I do not endorce the contents of these third party sites.