ts-7000
[Top] [All Lists]

[ts-7000] Re: Reading filesystem data from SD image

To:
Subject: [ts-7000] Re: Reading filesystem data from SD image
From: "charliem_1216" <>
Date: Wed, 03 Jun 2009 19:45:16 -0000
--- In  "Rod Nussbaumer" <> wrote:
>
> --- In  Jason Stahls <jason@> wrote:
> > > Is there a way to do what I want, without having some kind of map of the 
> > > image file?
> > 
> > If you image just a partition and the computer you have the image on has 
> > support for that partitions filesystem you can mount it with
> > 
> > mount /path/to/image.img /mountpoint -o loop
> 
> That works great iff there is only one partition. The image from TS is a 
> whole device image.
>   ---   rod.
>

You *do* need to map where the partitions are in the image, but that's easy:

sfdisk -l -uS image.img

That will tell you the start and length of each partition (-l is 'list' and -uS 
means report in sectors).  Then extract what you want (ie part2):

dd if=image.img of=part2.img bs=512 skip=[p2_start] length=[p2_len]

Finally you can loop mount part2.img, as above.  (p2_start and p2_len come from 
sfdisk output; bs is 512 bytes to match sector size.)  You may have to skip 
(p2_start -1) sectors, I'd have to think about that.

If you need to dump it back into the image, use a similar dd command but use 
*seek* instead of *skip*; and be sure to check your math!  

regards, ......... Charlie




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU