DISKMARK(8) FreeBSD System Manager's Manual DISKMARK(8) NAME diskmark -- a program to mark PC disks using empty partition table entries SYNOPSIS diskmark -w [-m magic] [-p partition] [-t type] major minor [disk] diskmark [-m magic] [-p partition] [-t type] [major minor] [disk] DESCRIPTION The program diskmark uses an unused entry in the Master Boot Record on PC disks to record version information. The author uses this information to determine if scratch disks should be partitioned at boot on a network booting compute cluster. The information is stored in the LBA area of the partition table and consists of a 4 byte magic number, a 16-bit signed major version number and a 16-bit unsigned minor version number. This information is stored by creating an invalid partition table entry of type 0xAD or the type given by the -t option. This entry is placed in entry 4 or the entry given by the -p option. diskmark has three modes of operation. When called with the -w option, it writes an appropriate partition entry to the mbr of the specified disk. The entry will only be written in the existing entry is either of type zero or of the type specified. Otherwise, when called with major and minor, diskmark returns 0 if the magic, major, minor values in the partition entry match those given and 1 along with a brief error message if they do not. Finally, when invoked without major and minor, the val- ues of magic, major, and minor stored on the disk are printed. Options are: -m magic Change the magic number from the default "AERO" to the given value. The entry may be in ASCII or hexadecimal and must be four bytes long. -p partition Change the partition to use from the default 4 to the given value. Valid values are 1-4. -t type Change the partition type from the default 0xAD to the given value. The value is one byte which may be entered in unsigned decimal or hexadecimal. -w Write the given values of major and minor along with the appropriate partition type and magic number to the selected partition table entry. NOTES The extent to which certain operating systems or BIOSes will be compati- ble with this hack is unknown. Things appear to work, but wide spread testing has not been done and there are no written standards to MBR par- tition tables. SEE ALSO fdisk(8) AUTHORS This manual page and the diskmark program were written by Brooks Davis for The Aerospace Corporation. FreeBSD 5.2 December 20, 2001 FreeBSD 5.2