root@dumbledore:/etc/init.d# grep -H mount *
alsa:# Required-Start: mountall
alsa:# Required-Stop: mountall
alsa-utils: # /usr is mounted on a system that has which in /usr/bin/.
bootclean:# Clean /tmp. Clean /var/run and /var/lock if not mounted as tmpfs
bootlogd:# Required-Start: mountdevsubfs
checkroot.sh:# Required-Start: mountdevsubfs
checkroot.sh:. /lib/init/mount-functions.sh
checkroot.sh: # 3) The mount parameters for a devfs filesystem.
checkroot.sh: if [ "$FSTYPE" = "devfs" ] && [ "$MTPT" = "/dev" ] && mountpoint -q /dev
checkroot.sh: ddev="$(mountpoint -qx $rootdev)"
checkroot.sh: rdev="$(mountpoint -d /)"
checkroot.sh: if [ "$(mountpoint -qx /dev/root)" = "4:0" ]
checkroot.sh: # mount -n -o remount,ro / would be the correct syntax but
checkroot.sh: # mount can get confused when there is a "bind" mount defined
checkroot.sh: # in fstab that bind-mounts "/" somewhere else.
checkroot.sh: # So we use mount -n -o remount,ro $rootdev / but that can
checkroot.sh: # to a bug in sys_mount().
checkroot.sh: ! mount -n -o remount,ro $rootdev / \
checkroot.sh: && ! mount -n -o remount,ro -t dummytype $rootdev / 2>/dev/null \
checkroot.sh: && ! mount -n -o remount,ro / 2>/dev/null
checkroot.sh: log_failure_msg "Cannot check root file system because it is not mounted read-only."
checkroot.sh:root filesystem mounted in read-only mode."
checkroot.sh: log_warning_msg "The root filesystem is currently mounted in read-only mode.
checkroot.sh: # Remount root to final mode (rw or ro).
checkroot.sh: # See the comments above at the previous "mount -o remount"
checkroot.sh: if ! mount -n -o remount,$rootopts,$rootmode $fstabroot / 2>/dev/null
checkroot.sh: mount -n -o remount,$rootopts,$rootmode /
checkroot.sh: mount -f -o $rootopts -t $roottype $fstabroot /
checkroot.sh: [ "$devfs" ] && mount -f $devfs
discover:# Required-Start: mountdevsubfs checkroot $local_fs
discover: # Assume module isn't loaded if /proc/ isn't mounted
hdparm:# Required-Start: mountdevsubfs
initrd-tools.sh:# initrd-tools.sh Unmount and free the initrd.
initrd-tools.sh:[ -f /proc/mounts ] || {
initrd-tools.sh: mount -n /proc || exit
initrd-tools.sh: trap 'umount -n /proc' EXIT
initrd-tools.sh:grep -q '^[^ ]* /initrd ' /proc/mounts || exit 0
initrd-tools.sh: umount /initrd/dev || exit
initrd-tools.sh:umount /initrd || exit
keymap.sh:# Required-Start: mountdevsubfs
keymap.sh: # We need to mount /proc to do that; not optimal, as its going to
keymap.sh: # be mounted in S10checkroot, but we need it set up before sulogin
keymap.sh: # First mount /proc if necessary.
keymap.sh: unmount_proc="no"
keymap.sh: unmount_proc="yes"
keymap.sh: mount -n /proc
keymap.sh: # unmount /proc if we mounted it
keymap.sh: [ "$unmount_proc" = "no" ] || umount -n /proc
mountall-bootclean.sh:# Provides: mountall-bootclean
mountall-bootclean.sh:# Required-Start: mountall
mountall-bootclean.sh:# Short-Description: bootclean after mountall.
mountall-bootclean.sh:# all local filesystems have been mounted.
mountall-bootclean.sh: echo "Usage: mountall-bootclean.sh [start|stop]" >&2
mountall.sh:# Provides: mountall
mountall.sh:. /lib/init/mount-functions.sh
mountall.sh: mount_all_local() {
mountall.sh: mount -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs \
mountall.sh: pre_mountall
mountall.sh: mount_all_local
mountall.sh: log_daemon_msg "Will now mount local filesystems"
mountall.sh: mount_all_local
mountall.sh: post_mountall
mountall.sh: # We might have mounted something over /dev, see if
mountall.sh: # a file on a now mounted filesystem.
mountall.sh: echo "Usage: mountall.sh [start|stop]" >&2
mountdevsubfs.sh:# Provides: mountdevsubfs mountvirtfs
mountdevsubfs.sh:# Required-Start: mountkernfs
mountdevsubfs.sh:. /lib/init/mount-functions.sh
mountdevsubfs.sh: domount tmpfs shmfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT
mountdevsubfs.sh: # As of 2.5.68, devpts is not automounted when using devfs. So we
mountdevsubfs.sh: # mount devpts if it is compiled in (older devfs didn't require it
mountdevsubfs.sh: # is mounted on /dev we need to create that directory
mountdevsubfs.sh: if grep -qs '/dev devfs' /proc/mounts
mountdevsubfs.sh: domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
mountdevsubfs.sh: echo "Warning: mountdevsubfs should be called with the 'start' argument." >&2
mountdevsubfs.sh: echo "Usage: mountdevsubfs [start|stop]" >&2
mountkernfs.sh:# Provides: mountkernfs
mountkernfs.sh:. /lib/init/mount-functions.sh
mountkernfs.sh: # and remounted.
mountkernfs.sh: domount tmpfs "" /lib/init/rw tmpfs -omode=0755,nosuid$RW_OPT
mountkernfs.sh: domount proc "" /proc proc -onodev,noexec,nosuid
mountkernfs.sh: # Only mount sysfs if it is supported (kernel >= 2.6)
mountkernfs.sh: domount sysfs "" /sys sysfs -onodev,noexec,nosuid
mountkernfs.sh: domount tmpfs "" /var/run varrun -omode=0755,nosuid$RUN_OPT
mountkernfs.sh: domount tmpfs "" /var/lock varlock -omode=1777,nodev,noexec,nosuid$LOCK_OPT
mountkernfs.sh: # it becomes obsolete the mount action below should be removed.
mountkernfs.sh: domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid
mountkernfs.sh: echo "Warning: mountkernfs should be called with the 'start' argument." >&2
mountkernfs.sh: echo "Usage: mountkernfs [start|stop]" >&2
mountnfs-bootclean.sh:# Provides: mountnfs-bootclean
mountnfs-bootclean.sh:# Required-Start: mountnfs
mountnfs-bootclean.sh:# Short-Description: bootclean after mountnfs.
mountnfs-bootclean.sh:# network filesystems have been mounted.
mountnfs-bootclean.sh: echo "Usage: mountnfs-bootclean.sh [start|stop]" >&2
mountnfs.sh:# Provides: mountnfs
mountnfs.sh:# Short-Description: Wait for network file systems to be mounted
mountnfs.sh:# Description: Network file systems are mounted by
mountnfs.sh:# /etc/network/if-up.d/mountnfs in the background
mountnfs.sh:# for them to be mounted before carrying on.
mountnfs.sh:do_wait_async_mount() {
mountnfs.sh: # for mounting NFS file systems. If any NFS partition is found
mountnfs.sh: for mountpt in $waitnfs; do
mountnfs.sh: log_action_begin_msg "Waiting for $mountpt"
mountnfs.sh: while ! mountpoint -q $mountpt; do
mountnfs.sh: # mounting is the default even without a value in
mountnfs.sh: do_wait_async_mount
mountnfs.sh: FROMINITD=yes /etc/network/if-up.d/mountnfs
mtab.sh:# Description: Update the mount program's mtab file after
mtab.sh:# all local filesystems have been mounted.
mtab.sh:# the fact that virtual filesystems were mounted early on, before mtab
mtab.sh:. /lib/init/mount-functions.sh
mtab.sh:# $2 - mount point
mtab.sh:# $3 - mount name/device
mtab.sh:# $4 - mount options
mtab.sh: # Not mounted?
mtab.sh: if ! mountpoint -q $2 < /dev/null
mtab.sh: mount -f -t $1 $OPTS $4 $NAME $2 < /dev/null
mtab.sh: # S02mountkernfs.sh
mtab.sh: # S04mountdevsubfs
mtab.sh: # Add everything else in /proc/mounts into /etc/mtab, with
mtab.sh: exec 9<&0 0</proc/mounts
mtab.sh: echo "Usage: mountall-mtab.sh [start|stop]" >&2
networking:# Required-Start: mountkernfs ifupdown $local_fs
networking: if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
networking: log_warning_msg "not deconfiguring network interfaces: network shares still mounted."
procps.sh:# Required-Start: mountkernfs
sendsigs:# Required-Stop: umountnfs
skeleton:# PATH should only include /usr/* if it runs after the mountnfs.sh script
udev:# Required-Start: mountkernfs
udev:# we need to unmount /dev/pts/ and remount it later over the tmpfs
udev:unmount_devpts() {
udev: if mountpoint -q /dev/pts/; then
udev: umount -n -l /dev/pts/
udev: if mountpoint -q /dev/shm/; then
udev: umount -n -l /dev/shm/
udev:# mount a tmpfs over /dev, if somebody did not already do it
udev:mount_tmpfs() {
udev: if grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then
udev: # /lib/udev/devices/ is recycled as a temporary mount point.
udev: mount -n --bind /dev /lib/udev/devices
udev: if ! mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs /dev; then
udev: umount -n /lib/udev/devices
udev: mount -n --move /lib/udev/devices /dev/.static/dev
udev: log_failure_msg "udev requires a mounted procfs, not started."
udev: log_failure_msg "udev requires a mounted sysfs, not started."
udev: if mountpoint -q $udev_root/; then
udev: mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs $udev_root
udev: log_action_begin_msg "Unmounting $udev_root"
udev: # unmounting with -l should never fail
udev: if umount -n -l $udev_root; then
udev:# the new /dev has been mounted and udevtrigger has been run there will be
udev: if mountpoint -q $udev_root/; then
udev: unmount_devpts
udev: mount_tmpfs
udev: [ -d /proc/1 ] || mount -n /proc
udev-mtab:# copy the rules generated before / was mounted read-write
udev-mtab:# if it's not, it's probably a symlink to /proc/mounts
udev-mtab:if mountpoint -q $udev_root; then
udev-mtab: mount -f -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs $udev_root
udev-mtab:# mountpoint(1) does not report bind mounts
udev-mtab: mount -f --bind /dev /dev/.static/dev
umountfs:# Provides: umountfs
umountfs:# Required-Stop: umountroot
umountfs:# Short-Description: Turn off swap and unmount all local file systems.
umountfs: exec 9<&0 </proc/mounts
umountfs: # Make sure tmpfs file systems are umounted before turning off
umountfs: log_action_begin_msg "Unmounting temporary filesystems"
umountfs: umount $TMPFS_MTPTS
umountfs: log_daemon_msg "Will now unmount temporary filesystems"
umountfs: umount -v $TMPFS_MTPTS
umountfs: # Unmount local filesystems
umountfs: log_action_begin_msg "Unmounting local filesystems"
umountfs: umount -f -r -d $REG_MTPTS
umountfs: log_daemon_msg "Will now unmount local filesystems"
umountfs: umount -f -v -r -d $REG_MTPTS
umountnfs.sh:# Provides: umountnfs
umountnfs.sh:# Required-Stop: umountfs
umountnfs.sh:# Short-Description: Unmount all network filesystems except the root fs.
umountnfs.sh:# Description: Also unmounts all virtual filesystems (proc, devfs,
umountnfs.sh:# devpts, usbfs, sysfs) that are not mounted at the
umountnfs.sh: # Write a reboot record to /var/log/wtmp before unmounting
umountnfs.sh: # Make list of points to unmount in reverse order of their creation
umountnfs.sh: [ "$VERBOSE" = no ] || log_action_begin_msg "Unmounting remote and non-toplevel virtual filesystems"
umountnfs.sh: umount $FLAGS $DIRS
umountnfs.sh: echo "Usage: umountnfs.sh [start|stop]" >&2
umountroot:# Provides: umountroot
umountroot: # mount -n -o remount,ro /
umountroot: # will act on a bind mount of / if there is one.
umountroot: mount $MOUNT_FORCE_OPT -n -o remount,ro -t dummytype dummydev / 2>/dev/null \
umountroot: || mount $MOUNT_FORCE_OPT -n -o remount,ro dummydev / 2>/dev/null \
umountroot: || mount $MOUNT_FORCE_OPT -n -o remount,ro /
vmware: # need to do VM auto stop before unmounting vmfs disks, in case