Thursday, March 12, 2009

WARNING: /usr was not properly dismounted

WARNING: /usr was not properly dismounted

generally this happens if you just turn of your computer without a
proper 'shutdown -h now'. FreeBSD has to write cached filesystem data
from memory to the disk before a shutdown. if the system is switched
off before this sync, there is the possibility that your filesystem is
in an inconsistent state.

are you using soft-updates on this filesystem? you can check this with
the mount commando, for example:

/dev/mirror/rm0s1a on / (ufs, local, soft-updates)

if yes you should see a background fsck process running (check with
'ps ax | grep fsck') after the system boots. Check /var/log/messages
to see if there are any messages from fsck.

to be sure you can also boot the system into single user mode (use
menu item 4 on the FreeBSD boot screen) an run fsck manually
(e.g. 'fsck /dev/ad0s1f' where ad0s1f should be replaced with the
actual mount point of your /usr filesystem. maybe fsck has to fix the
filesystem and will ask some questions that you should answer with
'y'. a second run of fsck is not required but does not hurt just to be
sure the filesystem is consistent. after that you can just 'exit' the
single user shell to continue booting or reboot the system again.

remember to always use 'shutdown -h' or 'shutdown -p'.

please also consult the FreeBSD handbook at

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/which contains a lot of information for newcomers. there are also
excellent books about FreeBSD available, just search amazon.

No comments: