Usage


 

The syntax is: aefdisk [harddisk number] <command1> [command2] ...

Valid commands are:

/pri:<size>:<type>[:n] - create primary partition
/ext:<size>[:5][:n] - create extended partition
/log:<size>[:type] - create logical drive
/delete:<n> - delete an entry
/deltype:<type>[:n] - delete partition(s) of specified type *
/delactive - delete active partition
/delall - delete all partitions on a disk
/notdel:<type>[,types] - delete all except specified type(s)
/activate:<n> - activate a partition
/deactivate - delete active flag
/changetype:<type>:<n> - change type of partition
/hidefat[:n] - hide primary FAT partition(s)
/hident[:n] - hide primary NTFS/HPFS partition(s)
/unhidefat[:n] - unhide primary FAT partition(s)
/unhident[:n] - unhide primary NTFS/HPFS partition(s)
/formatfat[:n][:label] - format FAT partitions, can be a switch
/allsize - put the HD size in ALLSIZE environment var.
/freesize - puts size of unpartitioned space in FREESIZE
/psize - puts n-th partition's size in PSIZEn
/ptype - puts n-th partition's type in PTYPEn
/putactive - puts active partition nr. in ACTIVE variable
/numhds - puts number of available HDs in NUMHDS
/mbr - install the standard DOS MBR loader
/sort - sorts the partition table in physical order
/save:<filename> - save the MBR to a file
/restore:<filename> - restore the MBR from a file
/cvtarea:<n> - create a contiguous file for NTFS conversion
/label:<n>:<label> - create/change label on formatted FAT partition
/show - show partition table
/dump - hexadecimal dump of partition table
/info - show logical characteristics
/? - this help message

  Valid switches are:

/rel - use percentages at size definition *
/y - assume Yes on queries
/wipe - wipe partitions to be deleted
/reboot - reboot when ready
/dynamic - leave space for Win2000/XP dynamic volume
/noebios - disables EBIOS access
/nolimit - disables FAT limit check

  • Options between <> are compulsory, between [] are not
  • n is a valid partition number. From 1 to 4 it means a primary
    partition. From 5 it means a logical drive
  • Harddisk number is a number starting from 1. The default is 1. If you specify '*' here, then all commands will be executed on all installed harddisks
  • The /rel and /formatfat switches are effective for the commands
    that follow them
  • The type is hexadecimal. Don't append the 'h' at the end

If there was an error, then the return value is 1, else 0. This means that you can safely use the program in a batch file. On error, the modified partition table will not be written.


* - available in registered version only.


Creating partitions

You can create partitions with the /pri, /ext or /log commands.
Aefdisk automatically finds the largest unpartitioned space and creates new partitions there. If there is an existing partition in the middle of the harddisk and the new partition should be created in the smaller unpartitioned chunk, create a dummy partition in the larger first.

The /pri command can be used to create primary partitions. The size and type must be specified, the partition number is optional. If the specified size is 0, then all available space will be allocated. The created partition will be
automatically set as active, this can be changed later with the /activate command if needed.

The /ext command can be used to create an extended partition, which can contain many logical drives. Only one extended partition is allowed per harddisk. You can force AEFDISK to create type '5' extended partition, even if it'd end beyond 8 gigs (WindowsNT 4.0 cannot handle type 'f' extended partitions). If the specified size is 0 then all available space will be allocated.

The /log command can be used to create logical drives in an extended partition. The extended partition must exist before using this command. The 0 as size cannot be used here, so creating the largest possible logical drive needs the /rel switch.
 

Deleting partitions

You can delete partitions with the /delete, /deltype, /delactive, /delall and /notdel commands.

Don't put deleting commands after the /rel switch!

The /delete command deletes the specified partition entry.

The /deltype command deletes a partition or partitions of the specified type. If the entry number is not specified, then all partitions of the specified type will be deleted. If the entry number is also specified, then the partition will be deleted only if the specified type matches with the partition type.

The /delactive deletes the active partition.

The /delall command deletes all partitions on a harddisk.

The /notdel command deletes all partitions except the specified types separated with commas. You can specify up to 20 types to be excluded.

Using the /wipe switch will zero fill the deleted partitions.
 


 

Relative sizes (registered version only)

The /rel command can be used to avoid specifying absolute MB sizes. If the /rel command is used then all size definitions will be treated as percent values from 1 to 100.
This command can be used with the /pri, /ext and /log commands. This command calculates the unpartitioned space and divides it as specified, see the examples below.
If a specified type doesn't allow the size that is calculated, then that partition will be automatically sized to the maximum size the type allows, and the remaining space will be added to the next partition which follows it on the command line. For example, you have a 5Gig harddisk, and do the following:
aefdisk /rel /pri:50:6 /ext:50 /log:100
Then aefdisk will create a 2Gig BIGDOS partition (not 2.5, because BIGDOS allows only 2Gig), gives a warning message, and append the remaining 0.5Gig to the extended partition.


(Un)Hiding FAT and NTFS/HPFS partitions

The /hidefat command hides FAT partitions on a harddisk. If the partition entry is specified, then this command tries to hide only that partition. If no partition is specified, this command will hide all primary FAT partitions.
The /unhidefat command has similar behavior for unhiding.
The /hident and /unhident commands are the same but for NTFS/HPFS partitions.
 

Formatting FAT partitions:

The /formatfat command allows formatting FAT16 and FAT32 partitions. The data clusters aligned to 4k clusters (in case of an unformatted partition), so data access is faster than using normal format, and the volume can be converted effectively to NTFS later (see also the /cvtarea command).

It can be a command or a switch:

1) If the partition number is not specified, then this command acts as a switch, and must appear before any partition creation command on the command line. In this case all partitions which are created will be immediately formatted.

2) If the partition number is specified, only that partition will be formatted, if it already exists. In this case, an optional volume label can be specified. If the specified partition number is 5 or higher, then it'll mean a logical drive. 5 means the first logical drive and so on.

 


 

Other commands and switches:

The /activate command activates the specified primary partition
The /deactivate command clears the active flag if any
The /changetype command changes the specified partition's type ID to the specified value. It doesn't touch the file system, only the ID in the partition table. This can be useful to make diagnostic partitions visible or hidden
The /save command saves the MBR to a specified file
The /restore command restores the MBR from a specified file. Combining this command with others is NOT recommended!
The /mbr command installs the standard loader code on the specified harddisk. It's like the original 'fdisk /mbr' command.
The /sort option sorts the partition table. Sorting is based on the partitions' physical location. The first partition on the disk will occupy the first partition entry and so on. Empty entries will be placed to the end of the partition table. This command is useful to maintain partition numbering compatibility with other partitioning utilities, which number partitions based on physical location on disk.
The /show command prints some information about the partition table of the specified harddisk.
The /dump command shows the hexadecimal dump of the partition table.
The /info command shows the logical characteristics of the harddisk and checks if extended BIOS is availabe.
The /reboot command causes a reboot after all modifications are written back to the disk. If there is an error, then this command does nothing.
The /dynamic command leaves 10Mb unpartitioned space at the end of the harddisk if you specify 0 as partition size. This is useful if you want to convert the drive later to a Win2000/XP dynamic volume.
The /cvtarea command creates a contiguous file called cvtarea.tmp on the specified FAT32 partition. The partition must be formatted and empty. The file placement and size is calculated automatically. This is useful for converting the partition to NTFS using the 'convert' deployment tool from Microsoft. The system must be rebooted after using this command.
The /label command creates or changes the label of the specified primary or logical FAT partition. The label can be max 11 characters.
The /noebios switch disables EBIOS access. This can be useful on machines which have buggy EBIOS support.
The /nolimit switch disables FAT size checking. This may be useful when creating FAT partitions larger than 2 gigs.
The /allsize command puts the HD size in megabytes to an environment variable named ALLSIZE. This can be useful for making size dependant decisions in batch files.
The /freesize command puts the largest unpartitioned size in megabytes to an environment variable named FREESIZE. This can be useful for making size dependant decisions in batch files
The /psize command puts the specified partition's size in megabytes in an environment variable called PSIZEn, where n is the number of the specified partition
The /ptype command puts the specified partition's type in an environment variable called PTYPEn, where n is the number of the specified partition
The /putactive command puts the active partition's number in environment variable called ACTIVE. If no active partition is found, this value will be 0
The /numhds command puts the number of available harddisks in an environment variable called NUMHDS.