by Alex » Mon Aug 06, 2007 1:36 pm
This is a bit tricky, but it can work.
Since you copied the entire disk into one partition (you can think of it like making an image of a disk and saving it into a file), the easiest way to get the partitions out of the containing partition is to copy the containing partition to the disk (as indicated by your Restore-line).
This done, fdisk or any other program should show you the new disk with the intact partition layout as it was on the primary source disk.
So you don't have to find /swap, /root and /home on the USB partition (though there's a way:
If e.g. you have copied your disc with HDClone into Partition 3 of the USB disc (say /dev/usb), then you want the contents of usb3 (which is Partition 3 of usb) to be treated as a disc. You can already start fdisk, but you must pass it the cylinder number from the original disc (e.g. 592).
then the call:
# fdisk -l -u -C 592 /dev/usb
will print out the partitioning of the stored image, e.g.:
Disk /dev/usb3: 0 MB, 0 bytes
255 heads, 63 sectors/track, 592 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/usb31 * 63 7438094 3719016 7 HPFS/NTFS
/dev/usb32 7438095 9510479 1036192+ 5 Extended
/dev/usb35 7438158 7695134 128488+ 82 Linux swap
/dev/usb36 7695198 9510479 907641 83 Linux
Then you can mount your Partition with the following command:
mount -o loop,offset=32256 /dev/usb1 /mnt
where 32256=63 (starting sector of the Partition) * 512 (size in bytes of a sector).
Still I don't think you have to go through all of this, simply restoring it to the new disk (3) should do the job.