User Tools

Site Tools


Sidebar

quickreference:disk_images

Disk Image Quick Reference

https://askubuntu.com/questions/69363/mount-single-partition-from-image-of-entire-disk-device#69447

  1. get partition offset
    fdisk -lu image.file
  2. Calculate offset to partition as sector_size*Start
losetup -o size_from_above /dev/loop0 image.file
e2fsck -f /dev/loop0
mount /dev/loop0 /mnt
dd if=/dev/zero of=/mnt/deleteme
rm /mnt/deleteme
umount /mnt
losetup -d /dev/loop0
xz -v image.file
quickreference/disk_images.txt · Last modified: 2020/10/05 20:19 by rodolico