29

I've got a ubuntu 14.04x64 VM running on Virtualbox on a Windows 7 x64 host machine.

I'm trying to mount an image for forensic uses, and am trying to run this command in particular:

mount -o ro,loop,offset=1048576 -t xfs /media/mountdevicesource/ewf1 /media/mountdest

All documentation that I've found seems to indicate that a command like this should work, however I get an error stating:

Mount: cannot mount block device /dev/loop0 read-only

Any idea what I may be doing wrong? I was getting this same error on a different VM, so I re-build Ubuntu thinking it was some type of corruption problem or something, but I'm getting the same error on the new VM.

Thanks.

Maumee River
  • 415
  • 1
  • 4
  • 5

1 Answers1

51

Probably, your XFS filesystem has a dirty log that needs to be replayed to give you a consistent filesystem. However, the ro mount option prevents that.

Try mounting adding norecovery, for example:

mount -o ro,norecovery,loop,offset=1048576 -t xfs /media/mountdevicesource/ewf1 /media/mountdest

Does it change anything?

shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • Yep, I actually found the norecovery flag before I saw your comment...adding that fixed my issue. That one little flag... – Maumee River Mar 22 '17 at 14:04
  • 2
    Same thing applies to `ext3` and `ext4`, though the error message is different for those. – kasperd Mar 22 '17 at 21:32