# Misc # # Geek # # OpenBSD # # *NIX #

OpenBSD Single user mode to unscrew flags

In a recent post, the Yoigo router was sending me corrupt DNS data through the DHCP.
On quick remedy (dirty hack) was a:
#nano resolv.conf && chflags schg /etc/resolv.conf
As I quickly got rid of that operator, I wanted to change the flag back...
Booted to singleuser only to discover that chflags was not available to me
Two hours later, I found the solution on OpenBSD underused features
here it is:

boot> boot -s
...
Enter pathname of shell or RETURN for sh:
# mount -oro /usr
# mount -u -orw /
# chflags noschg /etc/resolv.conf
# reboot

OpenBSD Single mode to unscrew flags

view_list Categories