init

When a FreeBSD system is properly shut down, it runs a program called sync on each disk to ensure that all data is written out, dismounts the filesystems, and then sets the clean flag on the filesystems. This is similar to the process that Windows goes through when it shuts down. If a FreeBSD system is not properly shut down, the clean flag will not be set.

Filesystem Consistency Check

One of the first things that init does is check whether or not the clean flag is set. If it is, init mounts the filesystem for use. If it isn't, init first runs the fsck program on the filesystem to make sure it isn't damaged and to repair any damage it finds that it knows how to repair. fsck is similar to the Scandisk program in Windows, and this process ...

Get FreeBSD® Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.