simple,

>
> $ cat MBR.img partition-table.img sda1.img sda2.img sda3.img sda4.img > 
> sda.img
>
> And in theory, one should be able to do the reverse: given a disk
> image, pull out the MBR, partition table, and all partitions.
>
simple, (except the partition table) fdisk can investigate partition
tables of disk images also.
referenced from this article
http://www.ioncannon.net/system-administration/80/how-to-transfer-linux-from-virtualbox-to-xen/

fdisk -lu myosimage.img

To figure out where the root partition starts he just multiplied the
start sector by the number of bytes per sector: 208845 * 512 =
106928640

I then did a quick test to make sure he had the correct partition:
mount -o loop,offset=106928640 myosimage.img /mnt/

This looked good so he extracted the partition from the disk and did a
filesystem check on it:
dd if=myosimage.img of=mypartimage.img bs=512 skip=208845
count=3453974
e2fsck mypartimage.img


QED

-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug

Reply via email to