mk90.commands

Command mkfs

Initialize one supported-size writable cartridge as MKS2.

Synopsis

mkfs device capacity

Ordinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.

Parameters

ParameterMeaning
deviceRegistered writable block device; the boot device is protected.
capacityCapacity in KiB: exactly 8, 10, 16, 32 or 64.

Description

This is destructive formatting. The volume must be unmounted and not busy. After the prompt, enter YES and press BK; confirmation is case-insensitive. Any other answer cancels without formatting.

Checks for address aliasing between 2 KiB regions, creates the single-partition MKS2 layout, verifies writes, and writes the valid header last. A successful format also marks the volume mounted.

Use the actual hardware capacity. The parameter is not a partition size to apply arbitrarily to a smaller cartridge.

Examples

cd /
umount /mnt/smp1
mkfs /dev/smp1 10

Limits and side effects

  • The example is for a mounted 10 KiB cartridge whose existing content may be erased; skip UMOUNT if it is already unmounted. Formatting is unnecessary when upgrading an existing compatible MKS2 data cartridge. No EEPROM programming algorithm or BASIC-format conversion is supplied.

Status and diagnostics

Success is status 0. Relevant status codes: 1, 2, 5, 8, 14, 15, 17. See the diagnostic reference.

See also

mount · umount · devices · Shell syntax