VBoxManage convertdd /dev/sdb test.vdi --format VDI sigfind -o 510 55AA /dev/sdb mmls -o 1024 /dev/sdg fls -o 2048 /dev/sdi fls -r -o 2048 /dev/sdi | grep fstab icat -o 2048 /dev/sdi 130830 modprobe nbd qemu-nbd -c /dev/nbd0 mkfs.ext4 /dev/nbd0p1 mkswap /dev/nbd0p2 dd if=/dev/nbd0 count=1 | xxd mount /dev/nbd0p1 /tmp/d xmount --in ewf --out dd image_source1.E* /ewf xmount --in ewf --out dd image_source2.E* /ewf2 losetup -o $((2048*512)) /dev/loop0 /ewf/image_source1.dd losetup -o $((2048*512)) /dev/loop1 /ewf2/image_source2.dd mount /dev/loop0 /tmp/s1 mount /dev/loop1 /tmp/s2 cd /tmp/d rsync -av /tmp/s1/* . cd /tmp/d/var rsync -av /tmp/s2/* . cat /etc/fstab cat /boot/grub/grub.cfg search --no-floppy --fs-uuid --set=root search --no-floppy --fs-uuid --set=root 25c5c61a-84cf-443a-a042-d9bb80162143 mount -o bind /dev /tmp/d/dev mount -o bind /sys /tmp/d/sys mount -t proc /proc /tmp/d/proc cp /proc/mounts /tmp/d/etc/mtab chroot /tmp/d /bin/bash grub-install --root-directory=/tmp/d /dev/nbd0 umount /tmp/d/proc umount /tmp/d/sys umount /tmp/d/dev umount /tmp/d/ qemu-nbd -d /dev/nbd0 losetup -o $(((1024+2048)*512)) /dev/loop0 image.dd