Manual / mount
mount(1)
| MOUNT(1) | General Commands Manual | MOUNT(1) |
NAME
mount - list the mounted volumes, mount a floppy, or mount a disk image
SYNOPSIS
mount
mount /dev/sNdM
mount [-r] image
DESCRIPTION
With no operand mount prints one line per volume shown under /mnt, for example
/dev/s7d1 on /mnt/MAUX
A fast unit (SmartPort, hard disk) is always mounted. A 5.25-inch Disk ][ appears only after it has been mounted here, so listing never touches an empty drive. The boot volume is listed first; the rest follow in slot, then drive, order.
With one operand, /dev/sNdM (slot N, drive M), mount reads that one unit once and, if it holds a ProDOS volume, marks it mounted: it then appears in /mnt, df(1) and this listing, and its files are under /mnt/NAME. The call is the one deliberate poll of a Disk ][ in the system. A drive with no readable volume fails with the MLI's own reason and nothing is mounted. Mounting a fast unit succeeds and does nothing.
With one operand that is not a unit, mount treats it as a disk IMAGE: a ProDOS tree file (a .po or .hdv over 128K) on any mounted volume. The kernel attaches it as unit /dev/s3d2 (slot 3, drive 2: the slot ProDOS reserves for /RAM, which maux never uses), and the volume inside appears under /mnt like any other, so dd(1) and nulib2(1) work on /dev/s3d2 with nothing new. What is written through the unit lands in the image file, block for block, straight on the host volume's disk, so the image is current outside maux as soon as the write returns. The image file stays open for as long as it is mounted: it cannot be removed, renamed or overwritten, and umount(1) closes it.
There is NO losetup: the unit is fixed, there is one image at a time, and mount is the only verb. A second image is refused as "busy", and so is one that lives inside the first. An image is refused, with the reason, when it is a seedling or a sapling (under 128K) or a directory, when it is a 2IMG container the loop cannot serve (see below), and when it is not a ProDOS volume at all. While an image is mounted the volume that holds it cannot be unmounted.
A SPARSE image (a file with blocks ProDOS never allocated) is made dense first: unless -r is given, mount rewrites every all-zero block of the file so that ProDOS allocates it (the loop driver cannot allocate), and says "densified N blocks" on the way. This writes to the image file, and takes about 90000 cycles per block of the image; a dense image costs nothing.
With -r the image is mounted read-only, and is never written, densified included: the unit answers "write protected" to a write, holes read as zeros. An image whose access byte is not write-enabled is mounted read-only without -r. A 2IMG container (a .2mg file: ProDOS order, a header of 1 to 64 bytes, whole blocks) is always mounted read-only; convert it to a .po for read-write. A write that fails (to a read-only image, or one the host refuses) is reported by umount(1).
Bye(1) works with an image mounted: it is detached for the trip and attached again afterwards.
FILES
/dev/sNdM the units
/dev/s3d2 the mounted image, while there is one
/mnt/NAME a mounted volume
SEE ALSO
DIAGNOSTICS
Exit status is 0 on success, 1 if the unit or image could not be mounted ("no device connected", "not a ProDOS volume", "not a mountable unit", "busy", "no such file", "disk full" while densifying, "2IMG layout not supported", "not a tree file", "needs ProDOS 2.4"), 2 for a usage error.
BUGS
One image at a time. The write-failure bookkeeping reads ProDOS 2.4's own cells: on another ProDOS the mount is refused.
| October 10, 2026 | maux |