1

I have a raw disk .img file (running file indicates that it is a "DOS/MBR boot sector" file).

Running mmls produces the following output:

DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors

     Slot    Start        End          Length       Description
00:  Meta    0000000000   0000000000   0000000001   Primary Table (#0)
01:  -----   0000000000   0000002047   0000002048   Unallocated
02:  00:00   0000002048   0000411647   0000409600   Linux (0x83)
03:  00:01   0000411648   0020971519   0020559872   Linux Logical Volume Manager (0x8e)
04:  -----   0020971520   0067108863   0046137344   Unallocated

When I try to mount partition "03", I get the error: mount: unknown filesystem type 'LVM2_member'

I can mount "02", but that just brings up a small MBR GRUB Parition.

Is there any way I can mount the LVM partition from the image file, or extract the data from it?

1 Answer 1

3

Figured out out (thanks to this thread):

On an Ubuntu box with a GUI:

sudo apt-get install kpartx
sudo losetup /dev/loop0 disk.img
sudo kpartx -a /dev/loop0

Then, disk drives appear in the Nautilus file manager (GUI) under Devices. Click on them to see the contents.

1
  • This answer really helped with recovering files from my daughter's laptop after a disk failure - thanks! Dec 18, 2016 at 19:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .