Jump To: Support > KB > NetManager > Boot > FSCK
Filesystem check
At boot-time the storage on the NetManager is checked. If the machine was shutdown properly, then the filesystems will be recognised as clean and so will not be checked. If, however, the computer was just switched off, all local storage will be checked in detail (a 5-stage process). If you have large amounts of storage, this may take a considerable time during which the computer will appear to be doing nothing (though its hard drive light will be on pretty much solidly). If you type Ctrl-T you will get a status report and percentage complete if you want to reassure yourself that it has not locked up!
Occasionally, the filesystem check will reveal problems that the automated mechanism will not fix. If this happens, you will see a message Automatic file system check failed
and the NetManager will enter Single-User Mode (characterised by the message Enter pathname of shell or RETURN for /bin/sh:
).
Hit RETURN to get to a # single-user command prompt. If you are asked for a terminal type, just hit RETURN again. If the suggested terminal type is displayed as [unknown]
, enter vt100
and hit RETURN. At the single-user command prompt, type:
fsck -y
If no filesystems are in use, this will scan all filesystems in order and attempt to fix any problems.
A successful run will look something like this:
Enter pathname of shell or RETURN for /bin/sh: Terminal type is vt100. We recommend that you create a non-root account and use su(1) for root access. # fsck -y ** /dev/rxbd0a ** Last Mounted on / ** Root file system ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 48883 files, 1511868 used, 7790609 free (10809 frags, 972475 blocks, 0.1% fragmentation) MARK FILE SYSTEM CLEAN? yes ***** FILE SYSTEM MARKED CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** ** /dev/rxbd1a ** Last Mounted on /usr ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 41302 files, 643838 used, 4517049 free (2177 frags, 564359 blocks, 0.0% fragmentation) MARK FILE SYSTEM CLEAN? yes ***** FILE SYSTEM MARKED CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** #
If the checks were successful, type reboot
to re-attempt a normal boot.
If any filesystems are in use (the boot process may have started one up before the filesystem check failed on a later filesystem), then you will see an error like the following.
# fsck -y /dev/rxbd0a: file system is mounted read-write on /; not checking
N.B. the automated check of all filesystems stops when this happens, so no further filesystems are checked in this case. You will need to check them manually in order yourself. To do this, get a list of filesystems of type ffs
:
# grep ffs /etc/fstab /dev/xbd0a / ffs rw 1 1 /dev/xbd1a /usr ffs rw 1 2
The message from fsck said that xbd0a
was in use, so we can skip that. The other filesystem is using device xbd1a
, this can be manually checked by giving xbd1a
on the command line:
# fsck -y xbd1a ** /dev/rxbd1a ** Last Mounted on /usr ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 41302 files, 643838 used, 4517049 free (2177 frags, 564359 blocks, 0.0% fragmentation)
Repeat this for any other ffs filesystems.
When the process is complete, type reboot
to re-attempt a normal boot.
Forcing a filesystem check
The procedure is documented here.