Single user mode on FreeBSD

On a multi user operating system, such as FreeBSD, it can be necessary to be able to perform critical system administration tasks without outside interference. This is eliminated by switching the operating system into single user mode.

This is the procedure to go into single user mode on a FreeBSD operating system.

In our example, the boot proces has been stopped due to critical error and we have been issued a shell prompt on a read only root file system.

The local file systems are cleaned, changed from read only to read and write, file systems are mounted and swap memory file system is mounted.

fsck -p -t ufs -y
mount -u
mount -a
swapon -a

The operating system is now in single user mode and we can perform our system administration tasks and round off with a reboot test, that should bring the operating system back to normal operation.

reboot

If the boot proces issues another single user mode prompt because of a non clean network file system (NFS), then the file system tab needs to be configured. NFS should not be cleaned during the boot proces. These are cleaned by the remote operating system. This is done by a value of zero in the sixth field (pass).

vi /etc/fstab/
reboot

Print

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.