Mount dd dump of disk in linux or other remote storage represented as a file.



So you have a remote storage or a file based dd backup and you want to 
mount a part of it in the middle.   


# parted /dev/mapper/hitachi_asdf1 unit b print
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/hitachi_asdf1: 42949672960B
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start         End           Size          File system  Name     Flags
 1      1048576B      26214399B     25165824B                  primary  bios_grub
 2      26214400B     235929599B    209715200B                 primary  msftdata
 3      235929600B    445644799B    209715200B    ext2         primary  msftdata
 4      445644800B    20913848319B  20468203520B               primary  msftdata
 5      20913848320B  42871029759B  21957181440B               primary  msftdata
 6      42871029760B  42892001279B  20971520B                  primary  msftdata



#
# mount -o ro,loop,offset=235929600 /dev/mapper/hitachi_asdf1 /mnt
#



# losetup --offset 235929600 /dev/loop2 /dev/mapper/hitachi_asdf1
# fsck /dev/loop2



Thanks

No comments: