Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
sanboot:transfer [2008/07/06 19:40] stoked |
sanboot:transfer [2009/10/29 16:39] (current) mcb30 |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * Take a look at the disk's partition table; on Linux this can be achieved by running //fdisk -l// (lower-case 'L') on the SAN target machine: | * Take a look at the disk's partition table; on Linux this can be achieved by running //fdisk -l// (lower-case 'L') on the SAN target machine: | ||
| - | root@chipmunk# fdisk -l /dev/sdX | + | fdisk -l /dev/sdX |
| where ///dev/sdX// is the disk that you just plugged in, containing the operating system image to be transferred. You should see something like: | where ///dev/sdX// is the disk that you just plugged in, containing the operating system image to be transferred. You should see something like: | ||
| Line 23: | Line 23: | ||
| dd if=/dev/sdX of=/path/to/image/file.img bs=8225280 count=1825 | dd if=/dev/sdX of=/path/to/image/file.img bs=8225280 count=1825 | ||
| + | |||
| + | {{ :disk.jpeg?240x186|A disk}} | ||
| where the numbers **8225280** and **1825** should be replaced with the numbers extracted from your own //fdisk// output. | where the numbers **8225280** and **1825** should be replaced with the numbers extracted from your own //fdisk// output. | ||
| - | This command will extract the relevant portion of the disk to a file (///path/to/image/file.img//) on your SAN target. Note that //dd// is reading from ///dev/sdX// (i.e. the raw disk device) rather than ///dev/sdX1// (the partition device); we cannot extract the partition alone because we also need the Master Boot Record located at the start of the disk. Also, after creating the disk image run a " file file.img" and make sure the image file doesn't contain part of a second partition. | + | This command will extract the relevant portion of the disk to a file (///path/to/image/file.img//) on your SAN target. Note that //dd// is reading from ///dev/sdX// (i.e. the raw disk device) rather than ///dev/sdX1// (the partition device); we cannot extract the partition alone because we also need the Master Boot Record located at the start of the disk. |
| + | |||
| + | ==== Verifying the transferred image ==== | ||
| + | |||
| + | Check that your extracted file is a valid hard disk image, by running //fdisk -l// on the extracted file: | ||
| + | |||
| + | fdisk -l /path/to/image/file.img | ||
| + | |||
| + | You should see something like: | ||
| + | |||
| + | Disk /path/to/image/file.img: 0 MB, 0 bytes | ||
| + | 255 heads, 63 sectors/track, 0 cylinders | ||
| + | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
| + | |||
| + | Device Boot Start End Blocks Id System | ||
| + | /path/to/image/file.img1 * 1 1825 14659281 7 HPFS/NTFS | ||
| Now that the disk image is available on the SAN target machine, you need to make the disk image available via the appropriate SAN protocol: | Now that the disk image is available on the SAN target machine, you need to make the disk image available via the appropriate SAN protocol: | ||
| Line 32: | Line 49: | ||
| * [[sanboot:iscsi|Make the disk image available via iSCSI]] | * [[sanboot:iscsi|Make the disk image available via iSCSI]] | ||
| * [[sanboot:aoe|Make the disk image available via AoE]] | * [[sanboot:aoe|Make the disk image available via AoE]] | ||
| + | * [[sanboot:srp|Make the disk image available via SRP]] | ||