Fixing a botched /etc/rc.conf file

In an effort to get my wireless NIC working, I added a line to /etc/rc.conf and decided to reboot the system. On start-up, however, the system reported a syntax error and presented me with the option to fix it.

/usr was not mounted, so I was unable to edit the file with vi. I tried using /bin/ed to edit the file, but the system reported that the system was read-only. I was not sure what to do, but luckily the FreeBSD team has splendid documentation and FAQs.

As the FAQ states, one has to mount the root file system as read/write in order to modify any of the files. I rebooted and when presented with the syntax error, escaped to the shell. I then proceeded to mount the root file system with write access:

mount -urw /
mount -a -t ufs    # for vi

After making the changes, I did a quick reboot and sure enough the problem was fixed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s