mountall
Mount all filesystems described in fstab
SYNOPSIS
mountall [-l] [-r] [-v] [-u | -a]
PARAMETERS
-a
Mount all filesystems in /etc/fstab except those with the "noauto" option.
-l
Perform local mounts, skipping any network filesystems.
-r
Mount the root filesystem read-only. Useful during early boot stages.
-u
Attempt to mount all filesystems as if they were unmounted. Used when transitioning to a later boot stage from initramfs.
-v
Enable verbose output.
DESCRIPTION
The mountall command is used in Debian-based Linux distributions (such as Ubuntu) to mount all filesystems described in the /etc/fstab file. It's typically used during system startup to ensure all configured filesystems (partitions, network shares, etc.) are mounted according to the system's configuration. This is vital for proper system operation, as it makes the necessary storage locations accessible to the operating system and applications.
The command automatically reads through the /etc/fstab file, identifies each filesystem specified and attempts to mount it. It handles different filesystem types and options defined in fstab. mountall is commonly invoked as part of the boot sequence and may be replaced by other systemd or upstart related system.
Note that using mountall outside of system boot can be problematic. Because the command is used within the initramfs, unexpected environment issues may occur.
CAVEATS
mountall is typically designed for use during the boot process and within the initramfs environment. Running it outside this context might lead to unexpected behavior or conflicts with existing mount points. Its use has been largely superseded by systemd.
EXIT CODES
Exit code 0 indicates success. Non-zero exit codes indicate failures during mounting.
CONFIGURATION FILE
The primary configuration file for mountall is /etc/fstab. It reads filesystem definitions from this file.
HISTORY
mountall was heavily used in older Ubuntu systems, particularly those relying on Upstart as the init system. With the transition to systemd, its usage has diminished as systemd provides its own mechanisms for mounting filesystems declared in /etc/fstab. It played a key role in early Ubuntu boot processes by automating the mounting of all necessary filesystems.