Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| parted [2022/03/17 13:17] – norman | parted [2025/10/02 12:05] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Mount single partition from image of entire disk (device) ====== | ||
| + | |||
| + | Get the partition layout of the image | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | < | ||
| + | Units = sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | ... | ||
| + | Device Boot Start | ||
| + | sda.img1 | ||
| + | |||
| + | |||
| + | Calculate the offset from the start of the image to the partition start | ||
| + | |||
| + | Sector size * Start = (in the case) 512 * 56 = 28672 | ||
| + | |||
| + | Mount it on /dev/loop0 using the offset | ||
| + | |||
| + | < | ||
| + | |||
| + | Now the partition resides on /dev/loop0. You can fsck it, mount it etc | ||
| + | |||
| + | < | ||
| + | mount /dev/loop0 / | ||
| + | |||
| + | |||
| + | Unmount | ||
| + | |||
| + | < | ||
| + | losetup -d / | ||
| + | |||
| + | |||
| + | Source: [[https:// | ||
| + | |||
| + | ====== Attach IMG file ====== | ||
| + | |||
| + | < | ||
| + | losetup --find --show --partscan fred.image.dd | ||
| + | </ | ||
| + | there should be partitions ( / | ||
| + | Find one, You need: | ||
| + | < | ||
| + | cat / | ||
| + | ls -l /dev/loop* | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | mdadm -A -R /dev/md9 / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | mount /dev/md9 /mnt/loop | ||
| + | </ | ||
| ====== Parted Use ====== | ====== Parted Use ====== | ||