Main index | Section 5 | Options |
The root mount logic is recursive, and step 8 will be repeated as long as each new root file system which is mounted has a /.mount.conf file.
# | A line beginning with a # is a comment and is ignored. |
{FS}:{MOUNTPOINT} {OPTIONS} | |
The kernel will try to mount this in an
operation equivalent to:
mount -t {FS} -o {OPTIONS} {MOUNTPOINT} / If this is successfully mounted, further lines in .mount.conf are ignored. If all lines in .mount.conf have been processed and no root file system has been successfully mounted, then the action specified by .onfail is performed. | |
.ask | When the kernel processes this line, a mountroot> command-line prompt is displayed. At this prompt, the operator can enter the root mount. |
.md file | Create a memory backed md(4) virtual disk, using file as the backing store. |
.onfail [panic|reboot|retry|continue] | |
If after parsing all the lines in .mount.conf the kernel is unable to mount a root file system, the .onfail directive tells the kernel what action to perform. | |
.timeout N | Before trying to mount a root file system, if the root mount device does not exist, wait at most N seconds for the device to appear before trying to mount it. If .timeout is not specified, the default timeout is 3 seconds. |
.onfail panic .timeout 3 cd9660:/dev/cd0 ro .timeout 0 cd9660:/dev/cd1 ro .timeout 3 ufs:/dev/ada0s1a .ask
The following example .mount.conf will direct the kernel to create a md(4) memory disk attached to the file /data/OS-1.0.iso and then mount the ISO CD9660 file system on the md device which was just created. The last line is a comment which is ignored.
.timeout 3 .md /data/OS-1.0.iso cd9600:/dev/md# ro # Can also use cd9660:/dev/md0 ro
The following example .mount.conf will direct the kernel to create a md(4) memory disk attached to the file /data/base.ufs.uzip and then mount the UFS file system on the md uzip device which was just created by the geom_uzip(4) driver.
.md /data/base.ufs.uzip ufs:/dev/md#.uzip ro # Can also use ufs:/dev/md0.uzip ro
The following example .mount.conf will direct the kernel to do a unionfs mount on a directory /jail/freebsd-8-stable which has a chroot(2) environment.
.timeout 3 unionfs:/jail/freebsd-8-stable
MOUNT.CONF (5) | October 17, 2013 |
Main index | Section 5 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | One of the advantages of using UNIX to teach an operating systems course is the sources and documentation will easily fit into a student's briefcase. | ” |
— John Lions |