Skip to content

Instantly share code, notes, and snippets.

@dieechtenilente
Created January 27, 2026 10:17
Show Gist options
  • Select an option

  • Save dieechtenilente/3fcfa9ea9abbc3993903c25618723393 to your computer and use it in GitHub Desktop.

Select an option

Save dieechtenilente/3fcfa9ea9abbc3993903c25618723393 to your computer and use it in GitHub Desktop.
How to mount raw ext4 disk images (e.g. Proxmox LXC container files)

Find the disk

cd /path/to/vhd/.zfs/snapshot/autosnap/images/100/

Mount disk with losetup

losetup -f -P vm-100-disk-1.raw

Disk is now a loop device which can be mounted

losetup -l
mount -o ro,noload /dev/loop4 /mnt

Do stuff

cd /mnt

Clean up

umount /mnt
 losetup -d /dev/loop4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment