LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD wont load after editing /etc/rc.conf (https://www.linuxquestions.org/questions/%2Absd-17/freebsd-wont-load-after-editing-etc-rc-conf-545853/)

JoeC21 04-13-2007 03:29 PM

FreeBSD wont load after editing /etc/rc.conf
 
I recently just installed FreeBSD. I edited the /etc/rc.conf to try and have gdm load automatically at startup. It seems I failed to check my typing and I forgot to add the closing " after typing gdm_enable="YES"

After restarting I am stuck with the message

Code:

Loading configuration files.
/etc/rc.conf: 16: Syntax error: Unterminated quoted string
Enter full pathname of shell or RETURN for /bin/sh:

If I just hit enter it doesn't seem like I can log in to edit the file. When I did the install I set my user login shell to /usr/local/bin/bash, so I tried typing that but says no such file or directory.

How would I log into it to correct the error? I have a Mepis live cd I could try to use if there isnt a way to do it from the install but I don't know how to access the file from the live cd.

Thanks for any help,

Joe

vermaden 04-13-2007 03:59 PM

Code:

Loading configuration files.
/etc/rc.conf: 16: Syntax error: Unterminated quoted string
Enter full pathname of shell or RETURN for /bin/sh:

type /bin/csh here, then /bin/cp /etc/rc.conf /etc/rc.conf.old and hit CTRL D two times or reboot.
You may also need to remount / with RW: /sbin/mount -o rw /

Quote:

When I did the install I set my user login shell to /usr/local/bin/bash, so I tried typing that but says no such file or directory.
You dropped into single user mode where /usr partition is not mounted until you do that manually with /sbin/mount /usr

JoeC21 04-18-2007 12:11 AM

Hey vermaden, I apologize for taking so long to respond.

It seems I do have to remount / first as if I dont I get cp: /etc/rc.conf.old :Read-only file system

but after typing /sbin/mount -o rw / and entering /bin/cp /etc/rc.conf /etc/rc.conf.old and hitting the ctrl d twice I no longer get the message saying it is read-only but I am still left with the same error after exiting the shell and rebooting.

Does it seem I did something wrong in the above or do you have any other suggestions?

As much as I hate to just give up, would it be best to just reinstall? I did this just after the install so I dont have anything on the computer that would be lost.

Thanks for the help so far

Joe

vermaden 04-19-2007 06:34 AM

Quote:

Originally Posted by JoeC21
Hey vermaden, I apologize for taking so long to respond.

that is not a problem for me.

Quote:

Originally Posted by JoeC21
but after typing /sbin/mount -o rw / and entering /bin/cp /etc/rc.conf /etc/rc.conf.old and hitting the ctrl d twice I no longer get the message saying it is read-only but I am still left with the same error after exiting the shell and rebooting.

Sorry, I fucked up, You should do
Code:

/bin/mv /etc/rc.conf /etc/rc.conf.old
instead of
Code:

/bin/cp /etc/rc.conf /etc/rc.conf.old
My fault.

now as it will load check /etc/rc.conf.old line 16 and make it proper and then save it as /etc/rc.conf.

You can also post later this fault /etc/rc.conf.

JoeC21 04-19-2007 11:54 PM

That did it, fixed the file and gdm loads fine now.

Thanks for the help

Joe

vermaden 04-20-2007 05:57 AM

You are welcome.


All times are GMT -5. The time now is 09:11 AM.