FileCore discs are generally resilient and secure. However, if the machine crashes, or is rebooted without safely being shut down, it is possible that data may not be written to the disc. This this happens, the disc may exhibit faults (for example 'Broken directory'). This is one reason why it is very important to ensure that the machine is shut down correctly.
FileCore disc check is performed through the utility
Boot:Utils.FileCoreCk. This uses the system choices to
determine the operations to perform when the machine has booted after an
unclean shut down.
The actual operation of FileCoreCk is configurable, but defaults to
running checkmap on each FileCore disc.
When the machine is booted, a flag is set in the non-volatile memory (CMOS) to indicate that the system is in an indeterminate state. When shut down correctly, Task Manager will clear this flag.
During the boot sequence, this flag is read (by
Boot:Utils.BootVars) and used to set the system
variable Boot$ShutdownState. After the Choices environment
has been set up, this is checked and if it indicates that an unclean
shutdown had been performed, the Boot:Utils.FileCoreCk
is run.
FileCoreCk may be configured to function in a number
of ways. The configuration file Choices:FileCoreCk is
read if it exists. If this file does not exist, then the check is skipped.
This file takes the form of a colon separated list of tag/value pairs which determines how FileCoreCk should function.
| Tag | Meaning | ||||||
|---|---|---|---|---|---|---|---|
| Enabled | true indicates that the checks should be performed. Any other value will prevent the checks being run. | ||||||
| Command |
Declares a command to be executed for the drives being checked. The command
should take the form of a substituted string, similar to that used for
aliases (see OS_SubstituteArgs). Parameters passed to the command are :
| ||||||
| <filesystem> | ignore declares that the filing system specified should not be automatically checked. This allows specific filesystems to be excluded from the checks, for example, if it is a slow access system, or protected such that it may never be written to. | ||||||
| <filesystem>-<drive> | ignore declares that the drive and filing system specified should not be automatically checked. This is a more specific version of the above. This might be useful if the drive specific is not likely to have been written to. |
FileCoreCk looks first at FileCore filesystems. Filesystems are examined in the order they appear in the instantiation list, which means that ADFS will come first, followed by podule filesystems from the
lowest numbered podule upwards.
For each filesystem, it processes each drive starting at 4 and counting up.
The default configuration is as follows :
Enabled:true Command:%0:CheckMap %1
This causes every drive present to have the *CheckMap
issued for it.
During execution of commands Escape is enabled. When the command completes, Escape is returned to its previous state. This means that during the boot sequence - where escape is normally disabled - the user may still terminate a check of a particular drive with Escape if they wish.
It follows from this that disc check commands should explicitly disable Escape around any critical sections whose interruption would cause a serious loss of data. Commands may also disable break actions for this period, and restored once the criticial section has been left. OS_Byte 229 can be used to disable Escape, and OS_Byte 246 can be used to disable the break key.
*Boot:Utils.FileCoreCkThis command is used to start an automated check of FileCore drives. It is not expected that this command be used by anything other than the Boot system.
*/Boot:Utils.FileCoreCk
| Maintainer(s): | RISCOS Ltd <developer@riscos.com> | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| History: |
| ||||||||
| Disclaimer: |
Copyright © Pace Micro Technolgy plc, 2002. |