AMD Confidential
User Manual November 21
st
, 2008
Chapter 13: DiskTool 161
13 DiskTool
Use the DiskTool utility to create hard-disk images. DiskTool copies, byte-for-byte, the
contents of a secondary hard disk into an .hdd file. This .hdd file can be loaded as a disk
image in the simulator.
DiskTool runs in two modes, GUI mode, and command-line mode. Double-clicking on
the DiskTool icon, or running DiskTool from the command line with no command line
options, starts DiskTool in GUI mode. If you run DiskTool from the command line and
include any command-line parameters, DiskTool runs in command line mode. To get a
list of the command-line options, run "DiskTool -help".
13.1 Command-Line Mode
The functions recognized by the DiskTool command line include:
Option:
G = Copy a physical device to the given image file.
Syntax:
{/G|-G} <DeviceName> <ImageName> [ImageSize]
[ImageSize] = # of sectors of data to copy from the device to the image file
0 = All sectors (this is the default value)
1 = All data to the end of physical partition 1
2 = All data to the end of physical partition 2
3 = All data to the end of physical partition 3
4 = All data to the end of physical partition 4
<Any Other Valid Number> = The number of sectors specified
Example:
disktool –g /dev/hd0 image.hdd 102400
This command reads the first 102400 sectors from device /dev/hd0 and places
them in the image file, image.hdd.
Option:
P = Put the image file <ImageName> to physical device <DeviceName>.
Syntax:
{/P|-P} <DeviceName> <ImageName>
Example:
disktool –p /dev/hd0 image.hdd
This command reads image file image.hdd and writes data to physical device
/dev/hd0.