Re: loopback mount individual partitions from a whole hd image file

From: Jon Evans (jon.evans@pobox.com)
Date: Sun Jun 25 2000 - 15:18:39 EST


> > [me]
> > Another way to do it would be to split the image file into seperate files
> > for each partition - how would I locate the offsets into the file for each
> > partition?
>

On Sun, 25 Jun 2000, Steve Dodd wrote:

> sfdisk can give you the offset in sectors, and the sector size:
>
> # sfdisk -l -uS /dev/hda
>
> Disk /dev/hda: 525 cylinders, 255 heads, 63 sectors/track
> Units = sectors of 512 bytes, counting from 0
>
> Device Boot Start End #sectors Id System
> /dev/hda1 63 2104514 2104452 7 HPFS/NTFS
> /dev/hda2 * 2104515 6313544 4209030 83 Linux
> [..]

Superb. losetup -o (sector_offset * bytes_per_sector) worked fine, even
without splitting the file. Just had to losetup once per partition at the
different offsets, mount the directory and tar up the contents.

Thanks for the clue,

Jon.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:07 EST