Loopback mounts are cool as heck. You can take a file containing an image of a partition and mount on top of your regular filesystem. But what if you have a file containing an entire disk image rather than just an image of a single partition? It's common to deal with such files when dealing with User Mode Linux (UML) root filesystems.
Well, you can still do it. It turns out that losetup and hence mount which uses losetup to do loopback mounting, allow you to specify an offset option to specify the starting offset into the file from which to read. Now the only trick is to use fdisk to figure out where the partitions are:



