DISK PARTITIONS ST-DOS uses its own disk partitioning scheme. Currently ST-DOS also supports MS-DOS partitions, but with large disks it is recommended to use ST-DOS's own partitioning system, because it allows an unlimited number of partitions. The SETUP.COM program can automatically fill the disk with 2 GB partitions. Partitioning the disk manually The RFSDRV.EXE filesystem driver must be loaded first. If the disk is already partitioned and you want to modify the existing partitions, RFSDRV needs the disk number as a command line argument. The "partition table" of that drive is then mounted as a filesystem. If the disk is not partitioned yet, RFSDRV must be loaded without arguments. If the computer does not have floppy disks, the first hard disk drive is 0. If the computer has 1 or 2 floppy disks, the first hard disk drive is 2. If the computer has 3 or 4 hard disks, the first hard disk drive is 4. After loading the RFSDRV driver you can run MKPARTS.COM to create partitions. MKPARTS needs the disk number of the target drive as a command line argument. First MKPARTS wants to know how large partition system you want to create. Usually you want to fill the entire disk with the partition table, so the default option is good. Then it's time to create the partitions. If you press [A], MKPARTS fills the disk automatically with 2 GB partitions and makes the first partition bootable. By pressing [I] you can manually define the size of each partition and select which partition becomes bootable. Note that the boot code doesn't currently support booting from partitions that begin from beyond the 8,4 GB threshold. MKPARTS calls FORMAT.COM automatically with correct arguments based on the disk geometry and partition size, and a FAT16 filesystem is created. You can later overwrite the FAT filesystem with something else, if you want to do so. Modifying existing partitions When RFSDRV is ran with the disk number as a command line argument, it mounts the partition system to the first free mountpoint as a filesystem. In that filesystem you can browse, add, edit and delete the existing partitions and other files in the partition system. Two special file attributes control whether the file is a partition and bootable. The P attribute makes the file a partition and the B attribute makes it bootable. The bootloader searches the partition system for the first file that has the B attribute set and then boots it. The attributes can be set using the ATTRIB command - for example, the following command makes MYPART.IMG a partition: ATTRIB +P MYPART.IMG Note that the first bootable entry does not need to be an actual filesystem. It can be anything, for example a boot sector demo - the P attribute does not need to be set for the bootable entry. The bootloader only looks for the B attribute and the partition mounter looks for the P attribute. Because the system has only a limited number of mountpoints, you may sometimes have to disable the partition status for some entries to make room in the mountpoints for another. Using the partition system to store large files The "partition table" is in fact a simple filesystem where each file is stored on the disk contiguously so that the kernel can mount them as a partition. This means that the partition table can also be used for storing large files. Currently the maximum size of actual files is 4 GB, so that is also the size limit of the files stored in the partition table. Currently the allocator of the RFSDRV driver is very stupid and it always starts the new file from the first free block from the beginning, so it very easily gets into a situation where it can only create a small file and an attempt to grow the file larger ends up in a "disk full" error. A defrag program must be made to fix this.