When specifying an offset for the partition, can it be used safely
without specifying its limits (size) ? What if I have another
partition at the end of the one I need - isn't there a chance it will
be overwritten?

What I meant by /dev/loop0p1 (look at a file in fdisk), is whether
there's a way to access the partition directly, through the kernel
facilities, instead of figuring out the byte offset of the partition
manually.

- Itay.

On 8/22/05, Muli Ben-Yehuda <[EMAIL PROTECTED]> wrote:
> On Sun, Aug 21, 2005 at 11:33:14PM +0300, Itay Duvdevani wrote:
> 
> > 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.
> 
> mount -o loop,offset=xxx myfile /dev/whatever
> 
> > 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).
> 
> Look for 'offset' in the mount man page.
> 
> > 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...).
> 
> Not sure what you mean here?
> 
> Cheers,
> Muli
> --
> Muli Ben-Yehuda
> http://www.mulix.org | http://mulix.livejournal.com/
> 
>

================================================================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