AEFDISK is a disk partitioning program. It supports all partition types. The original FDISK program doesn't allow you to create more than one primary partition. AEFDISK does, therefore it's a powerful tool for creating any combinations of partitions. This can be extremely useful for system administrators, schools and computer store employees.
Put it in the autoexec.bat of a system floppy, and you're ready to partition hundreds of harddisks quickly!
AEFDISK can handle as many harddisks as your hardware and BIOS can, and also tested with SCSI controllers which support standard BIOS calls.
Features
Creating all types of partitions, with absolute or relative size
Deleting partitions based on their type or place in the partition table
Hiding and unhiding primary FAT and NTFS/HPFS partitions
Formatting primary FAT16 and FAT32 partitions immediately and quickly
Activating a partition
Installing loader code in the Master Boot Record
Displaying partition information
Displaying harddisk information
Completely command line driven for speed and flexibility
Automatic calculation of free space and available partition entry
Handling as many harddisks as your hardware and BIOS support
Handling harddisks up to 2 terabytes with EBIOS support
ANSI C library version is also available
Usage
The syntax is: aefdisk [harddisk number] <command1> [command2] ...
Valid commands are:
/pri:<size>:<type>[:n] - create primary partition
/ext:<size>[:n] - create extended partition
/log:<size> - create logical drive
/delete:<n> - delete an entry
/deltype:<type>[:n] - delete partition(s) of specified type (registered version only)
/formatfat[:n][:label] - format FAT partitions, it can be a switch
/putsize - put the HD size in HDSIZE environment variable
/mbr - install the standard DOS MBR loader
/show - show partition table
/info - show logical characteristics
/? - this help message
Valid switches are:
/rel - use percentages at size definition
/reboot - reboot when ready
/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 if defined, except the formatfat command
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 command is effective for the commands after it
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. On error, the modified partition table will not be written. This means that you can safely use the program in a batch file.
Creating partitions
You can create partitions with the /pri, /ext or /log commands.
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 /ext command can be used to create an extended partition, which can contain many logical drives. Only one extended partition is allowed per harddisk. 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.
Deleting partitions
You can delete partitions with the /delete, /deltype, 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 /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.
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.
Hiding FAT and NTFS/HPFS partitions
The /hidefat command hides primary FAT partitions on a harddisk. If the partition entry is specified, then this command tries to hide only that partition. The /unhidefat command is similar.
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. 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.
You have to reboot to use the formatted drive(s)!
Other commands and switches:
The /mbr command installs the standard loader code on the specified harddisk. It's like the original 'fdisk /mbr' command.
The /show command prints some information about the partition table of the specified harddisk.
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 /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 /putsize command puts the HD size in megabytes to an environment variable named HDSIZE. This can be useful for making size dependant decisions in batch files.
Examples
aefdisk 2 /delall /pri:200:6 /pri:300:7:4
The above command deletes all partitions on the second harddisk and then creates two primary partitions. The first is a 200 MB BIGDOS partition,and it is be created in the first available entry. The second is a 300MB HPFS partition, and it is created in the fourth entry if it is empty.
aefdisk /formatfat /pri:300:7 /ext:1000 /log:1000
The above command creates a 300MB primary HPFS and a 1000MB extended partition with one 1000MB logical drive, then formats the logical drive.
aefdisk /rel /pri:30:6 /ext:70 /log:40 /log:60
The above command calculates the available unpartitioned space first. Then it creates a primary BIGDOS partition, which occupies 30% of the free space. The remaining 70% space is assigned to an extended partition. In the extended partition, there are two logical drives. The first occupies 40% of the extended partition, the second occupies 60%.
aefdisk 2 /mbr /hidefat
The above command installs the loader code in the MBR of the second harddisk, then hides all FAT partitions on it.
aefdisk * /reboot /hident
The above command hides all primary NTFS partitions on all installed harddisks and reboots the computer.