Recovering from Syntax Errors in /etc/rc.conf in FreeBSD
I have been exploring FreeBSD over the last few weeks. In fact, I moved this blog over to a server running FreeBSD tonight. Naturally, while fiddling around with /etc/rc.conf
(the default init file of FreeBSD) with vi I made a syntax error. Upon rebooting, FreeBSD yells at me and starts a shell in a read only file system.
Loading configuration files.
/etc/rc.conf: 16: Syntax error: Unterminated quoted string
Enter full pathname of shell or RETURN for /bin/sh:
At first, I was super sad and thought I had to reinstall everything (which would not have been so bad since the installation just takes a few minutes), but then I realized that it is not possible that I am the first person to ever make an error in this file, there has to be a way to recover. Sure enough, there is.
- Remount the Root File System First we must remount the root files system. Go ahead and press RETURN to pop into
/bin/sh
/sbin/mount -o rw /
- Edit
/etc/rc.conf
Now that we have a read/write file system mounted we can edit our/etc/rc.conf
file and fix the syntax error usingvi
- Reboot
Reboot, and FreeBSD will be back in action.
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- Now What?
- Setting up ANTLR4 on Windows
- SQLite DB Migrations with PRAGMA user_version
- Meritocracy?
- Possible Plagiarism Made me Cringe
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- The Rise of Bluesky from Communications of the ACM
- Podcaster, DJ, and writer DJ Louie XIV on going for it (even if you’re terrified) from The Creative Independent
- Useful Bluesky Tools from Robb Knight • Posts • Atom Feed
- Re: Bluesky from Colin Devroe
- From the Red Hell to the Sky of Blue from Straphanger
- We don’t need to use what we make from Derek Sivers blog
- Ubuntu Summit 2024: A joyful experience filled with sorrow from Planet KDE | English
- Sabotage from jwz
Articles from blogs I follow around the net
Pluralistic: Battery rationality (06 Dec 2024)
Today's links Battery rationality: Ringing down the curtain on 9/11's security theater. Hey look at this: Delights to delectate. This day in history: 2009, 2014, 2019, 2023 Upcoming appearances: Where to find me. Recent appearances: Where I've…
via Pluralistic: Daily links from Cory Doctorow December 6, 2024P&B: Erica Fustero
This is the 67th edition of People and Blogs, the series where I ask interesting people to talk about themselves and their blogs. Today we have Erica Fustero and her blog, ericafustero.com To follow this series subscribe to the newsletter. …
via All the interviews for the People and Blogs series. December 6, 2024P&B: Erica Fustero
This is the 67th edition of People and Blogs, the series where I ask interesting people to talk about themselves and their blogs. Today we have Erica Fustero and her blog, ericafustero.com To follow this series subscribe to the newsletter. …
via Manuel Moreale RSS Feed December 6, 2024Generated by openring