[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Easiest Way to Mount an Image File



> 1) While losetup 'cooks' you a block device from the file, it does not
> expose underlying partitions. What you need is:
> 
> sudo kpartx -a /home/pgmaudio/2016-11-25-raspbian-jessie-lite.img

> Look for devices created in /dev/mapper, don't forget to run afterward:
> 
> sudo kpartx -d /home/pgmaudio/2016-11-25-raspbian-jessie-lite.img

Thank you! I tried both commands and they just worked.

	They worked on the raspbian image and also on the image I
generated of a whole disk image from an installed raspberry pi
which I made from dd if=thememory_card of=afile and I could see
everything you should see which is good because I had re-imaged
the pi with a newer version of OS and wanted to recover my home
directory from the old image to put back on the newly-imaged disk.

	Out of curiosity, I wondered what would happen if I ran
the delete command without unmounting the partition. It simply
refuses to run until you do something like

sudo umount /mnt

or whatever your mount point is and then it deleted as expected.

	Again, many thanks to both replies I received from the
list.

Martin


Reply to: