Hello all,
Today I encountered a situation where I had to mount a single
partition off a whole hard-disk image, and I was wondering if there's
a better way than that I chose.

Starting from the beginning, I had an image of an entire disk (MBR,
partition table, everything) that had several partition on it - a
complete dd backup.

In order to get a single file off a certain partition, I did the following:
1. losetup the image file to /dev/loop0
2. fdisk /dev/loop0, and displaying partition information in
byte-units, thus gaining byte offsets in the image of my desired
partition (start + end).
3. dd-ing that partition off the image to a separate file.
4. mounting that file directly, taking away my file.

Mission successful - although I'd like to ask if there's a better way.

Problems with this method are:
1. You can losetup a file with an offset, but I couldn't find any size
parameter available. That could save me the time (and disk space) of
extracting the partition off the image (I could losetup it directly
from the image file).
2. Is there a direct way to access the partition on that kind of an
image? (fdisk uses the /dev/loop0p1 notation, but no traces of that
sort of thing in my /dev...).

Thanks.

================================================================To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to