How to mount a file created using dd command

I created an exact copy of a bootable USB drive using the dd command (which is an extremely cool tool by the way) using the following command:

dd if=/dev/sdb of=myFile.img

After that, to mount it, you can simply use the kpartx command, as follows:


mkdir hobba

sudo kpartx -a myFile.img
sudo mount /dev/mapper/loop0p1 hobba -o loop,ro


where loop0p1 is the first partition, loop0p2 will be the second partition, and so on.


Source: GrGr on


About SoCRaT

Research Support and Infrastructure Engineer, OSS & Linux Geek
This entry was posted in Linux, Ubuntu and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s