Thursday, April 16, 2009
1:54 AM

Mount a Partition from inside a Disk Image

You need sfdisk and losetup.


sfdisk -l -uS disk_image.raw
# look for the start sector of the partition, e.g. 2

mount -o loop,offset=$((2 * 512)) disk_image.raw /mnt
#mount the partition to /mnt (replace 2 with the output from sfdisk)


You could of course also use kpartx to create special device files for the partitions.

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.