Solved Enter full pathname of shell or RETURN for /bin/sh:

I screwed up the rc.conf file now the machine gets stuck with
Code:
Enter full pathname of shell or RETURN for /bin/sh:
Prior to that
Code:
/etc/rc.conf: -T: not found
/etc/rc.conf: 54: Syntax error: Unterminated quoted string

Code:
/rescue/sh
/fsck -y

Everything comes back clean.

Some help please.
 
Not sure really but the machine starts to boot then stopped with "Enter full pathname of shell or RETURN for /bin/sh:"

As I previously stated, I know it has to do with bad syntax in /etc/rc.conf but I am unable to modify the file since I am stuck at single user and unable to switch to root. Some internet search suggests "/rescue/sh" is the key but for what I don't know.
 
I screwed up the rc.conf file now the machine gets stock with
Code:
Enter full pathname of shell or RETURN for /bin/sh:
Prior to that
Code:
/etc/rc.conf: -T: not found
/etc/rc.conf: 54: Syntax error: Unterminated quoted string

Code:
/rescue/sh
/fsck -y

Everything comes back clean.

Some help please.
Ok, so when it boots, do as it says, press RETURN for the default shell and (you're root), edit rc.conf to fix your problem on line 54.
Editors available should be ee and vi.
 
That did not work, it seems the machine is not going to root but stay into single user mode. I was able to modify the file with ee but I get unable to write file after "esc" follow by "a" to leave the file and "a" to save it.

vi right away returns with Read-only file system.
 
I also noticed prior to the machine complaining about rc.conf there is "mountroot: waiting for device /dev/ada1a..."
 
I'm fairly certain you're root (it would be a catastrophe if it failed to default to that!), but that your read-only device is causing the problem.
What is device ada1a? Is your root directory on this (/)?
What you have to do is mount your root as read/write to edit the file:
mount -u -o rw /dev/xxxx
 
You got dropped to single user mode. In single user mode only the root filesystem is mounted and it is mounted read-only.
For UFS:
Code:
fsck -y
mount -u /
mount -a -t ufs
swapon -a
# Fix your issue, and shutdown -r now
For ZFS:
Code:
zfs set readonly=off zroot/ROOT/default # Assuming the default BE
zfs mount -a
swapon -a
# Fix your issue, and shutdown -r now
 
Back
Top