scripts:files:mount_dd_image

How to mount a .dd file

A favourite backup tool of mine is to dd/ddrescue a drive before I reinstall stuff so I can go back to exactly how it was before.

dd however is not always friendliest to work with when you are done and need to grap say just 4 or 5 files off that old setup.

With tar or squashfs, it's easy, thankfully, easy enough here as well.

1) Mount the file as a loop

sudo losetup –partscan –find –show tonyssd.dd

This creates /dev/loop* items.

2) Mount /dev/loop* as you would the partition if it were on an actual disk.

Since your whole dd file is preallocated, you should be safe, but put an -o=ro if unsure.

  • scripts/files/mount_dd_image.txt
  • Last modified: 2025-01-03 05:41
  • by Tony