Partition Management

Note that some of this section is concerned with creating and managing partitions on IDEDOS drives, so if you are using FAT drives (with the optional FATfs package), then much of it does not apply. However, it is still possible to list partitions on FAT drives with the %PARTITIONS command. You should also read the section on mapping partitions to drives, at the end of this page.

Partition management

The IDEDOS system used by ResiDOS allows you to divide your hard disk up into many separate partitions, which can each be assigned to a drive letter and used for storing files. You can have as many partitions as you like on your disk, but due to memory constraints it may not be possible to map them all at one time.

Partitions can be one of two types: "data", for holding files; and "swap", for use as temporary workspace by programs or the operating system. Other types may be added in the future. Note that no programs currently require swap partitions, but there is no harm in creating one for future use.

Commands exist to allow you to create and delete partitions and assign them to drive letters. Unlike some inferior operating systems, this can all be done from BASIC, and there is no need to reset your Speccy at any point!

Creating, deleting and listing partitions

You can create a partition using one of the following commands, which create data and swap partitions respectively:

To identify which unit a partition is to be created on, the number can be included at the start of the name, followed by the unit number (eg "0>Documents" or "1>Games"). If you don't specify the unit, then unit 0 is assumed. Names can be up to 16 characters long (this doesn't include the unit identifier) and are not case-sensitive.

The size for a partition can be given in kilobytes (K) or megabytes (MB), with a maximum size of 16 megabytes allowed. A number smaller than 256 is assumed to be a size in megabytes; a number larger or equal to 256 is assumed to be a size in kilobytes.

You can delete a partition, together with any files that are stored on it, using the command:

In this command, you must specify the unit number, as otherwise it will be assumed you are trying to erase a file. You can use ERA or DEL instead of ERASE if you prefer. Note that a partition can only be deleted if there are currently no drives mapped to it.

You may also rename a partition, using the following command:

Again, you must include the unit identifier for this command, otherwise it will assume you want to rename a file, not a partition.

Finally, you may display a list of partitions, in a normal or expanded form, using the following commands:

This will show all partitions on all units. Note that if you have other filesystem packages installed (such as FATfs) then some cards/disks will show up more than once, with different unit numbers.

Automatic drive mappings

Normally, when the Spectrum starts up, ResiDOS automatically maps all the data partitions it finds to all the available drive letters. If you don't like this behaviour, you can manually specify your own drive mappings. You can also turn off the automatic mapping feature with the command:

The feature can be re-enabled at a later time with the command:

Mapping drives to partitions

It is also possible to manually map drives to partitions, so that you can choose which drive letters a particular partition uses.

When mapping a drive to a partition, you can make the assignment permanent, which means that ResiDOS will automatically make the same assignment every time the Spectrum starts up. This is done by adding the + character to the end of the mapping command. Such permanent mappings happen before the automatic mapping takes place, so you can permanently map your favourite drives and let automatic mapping take care of the remainder.

The commands to map drives to partitions are:

Similar commands are available to remove mappings from drives. Using the + character here means that any permanent assignment associated with the drive will also be removed:

Finally, you can obtain a listing of the current drive mappings with the following command, in which you can optionally specify a stream number for the output (ie stream 3 is often used for the printer):

Back to the ResiDOS home page