Menu ▾ ▴

Orphaned - mount

Daniel Azevedo

This page is copied from orphaned-docs on GitHub, where it is written and corrected; it is also on the documentation site. Changes made here are overwritten.

Package: util-linux · Writes to disks: not with the options below

sudo blockdev --setro /dev/sdX /dev/sdX1        # first: make the devices read-only
sudo mount -o ro,noload /dev/sdX1 /mnt           # ext3/ext4: no journal replay
sudo mount -o ro,norecovery /dev/sdX1 /mnt       # XFS: no log recovery
sudo mount -o ro /dev/sdX1 /mnt                  # other file systems
findmnt /mnt                                     # check: options must include "ro"
sudo umount /mnt

Without noload (ext4) or norecovery (XFS), the kernel replays an
unfinished journal even with -o ro, which writes to the disk.

For NTFS, see NTFS; for encrypted volumes, open them first with
cryptsetup.


Related

Wiki: Orphaned - File systems and volumes
Wiki: Orphaned - NTFS
Wiki: Orphaned - XFS
Wiki: Orphaned - cryptsetup
Wiki: Orphaned Docs