Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
topics:disk-image-mount-partition [2017/03/26 05:51]
orzfly
topics:disk-image-mount-partition [2017/03/26 05:56]
orzfly [Mounting]
Line 84: Line 84:
 ==== Mounting ==== ==== Mounting ====
  
-  - Mount image as loop device<code> +  - Get partition details<code> 
-losetup /dev/loop0 rpool.img +fdisk -l rpool.img 
-</code>+Disk rpool.img: 21 GiB, 22548578304 bytes, 44040192 sectors 
 +Units: sectors of 1 * 512 = 512 bytes 
 +Sector size (logical/physical): 512 bytes / 512 bytes 
 +I/O size (minimum/optimal): 512 bytes / 512 bytes 
 +Disklabel type: gpt 
 +Disk identifier: B37248EB-F1D7-DA47-A42D-4C42AF20D328
  
 +Device        Start      End  Sectors Size Type
 +rpool.img1     2048 44021759 44019712  21G Solaris /usr & Apple ZFS
 +rpool.img9 44021760 44038143    16384   8M Solaris reserved 1
 +</code>
 +  - Mount partition<code bash>
 +# losetup /dev/loop0 rpool.img --offset $((512 * 2048)) --sizelimit $((512 * 44019712))
 +</code>
 ==== Unmounting ==== ==== Unmounting ====