Rescuing broken init file

Add your Tips and tricks to configure and tweak your GhostBSD System here.
Post Reply
nevets
Posts: 163
Joined: Tue Jun 23, 2020 3:54 am

Rescuing broken init file

Post by nevets »

OK, so I got too adventurous and left a typo in /etc/rc.conf.d/myghost.conf
The problem left me in
"Enter full pathname to shell or RETURN for /bin/sh:"
The system wouldn't come up.

Now I tried to use an old BE but that didn't solve the problem either.

After faffing around for a while I found a folder helpfully called rescue
# cd rescue
# man rescue
and discovered...
"You're in read only mode and need to mount the root first !"
So I typed in
# su - root
(no password requested)
Then I mounted the file system
# mount uw /
Then I could remove the offending conf file
# rm /etc/rc.conf.d/myghost.conf
and reboot
# reboot

Thought I'd share the experience...
Steve
Post Reply