Mounting Partitions *inside* a dd Image

ted leslie tleslie-RBVUpeUoHUc at public.gmane.org
Wed Jan 27 00:17:22 UTC 2010


for a laugh i just dd my current flash drive
i.e. sda on my system to a file,
then fdisk the file, and it worked!!!!
it warned i couldnt modify it, but i got my part. details, 
so run 

fdisk <blob name>

to get your partition details,

then the next step would be to cut those parts out, and -o loop them.

tl

On Tue, 26 Jan 2010 19:13:02 -0500
ted leslie <tleslie-RBVUpeUoHUc at public.gmane.org> wrote:

> interesting!
> 
> you are looking for loop back full drive device "thingy" as apposed to mounting
> as a look back file system.
> 
> apart from finding a loop back full disk thingy ...
> 
> the partions within the blob have to be identifiable.
> now i dont know what fs type you used (and partition type and labels), but perhaps you do.
> Aside from digging into the specifics of how a particular 
> partition looks, and the partion table,
> you could experiment on a small unused hard drive, and 
> partition it, say with very small partitions,
> and then dd it to a file.
> then go in an change the partion label, (and reformat it)
> and save, then dd it,
> then binary diff it, to identify where it segments.
> if you know the partion label and type info you used on the old one
> (your blob), you can then do a search for it, and then hopefully you can 
> extract your partition out to a file, that you can then mount with a  loop back.
> also , you can attempt to read the partion table in what you saved away, then 
> use hopefully a byte offset to identify your cut points for the individual partion.
> 
> This is all doable, hopefully there is an easier way,
> 
> i wonder if you can just run fdisk on the file somehow to get it to report?
> having said that, fdisk does print the exact byte offsets for the partitions,
> so if you can just get a fdisk or equivalent run on your blob.
> 
> 
> 
> 
> tl
> 
> On Tue, 26 Jan 2010 18:48:44 -0500
> Mike Kallies <mike.kallies-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> 
> > Hello Everyone,
> > 
> > I have a disk image which was taken several years ago using "dd".  I
> > want to try to recover the data from the image, but I don't want to have
> > to copy it back out to a disk.
> > 
> > If I were smart, I could have done
> > 
> >   dd if=/dev/sda1 of=sda1.img
> >   dd if=/dev/sda2 of=sda2.img
> >   dd if=/dev/sda bs=512 count=1 of=sda-bootsector.img
> > 
> > But instead, I did
> > 
> >   dd if=/dev/sda of=sda.img
> > 
> > So now, years later, I've got this blob which I can't quite mount.
> > 
> > Does anyone know a trick to mount the partitions inside the image?
> > 
> > Thanks,
> > 
> > -Mike
> > --
> > The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> > TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> > How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
> > 
> 
> 
> -- 
> ted leslie <tleslie-RBVUpeUoHUc at public.gmane.org>
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
> 


-- 
ted leslie <tleslie-RBVUpeUoHUc at public.gmane.org>
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list