What's the point of the shell choice in single user mode?
Jorn Argelo
jorn at wcborstel.com
Sun Dec 2 10:04:36 PST 2007
John Murphy wrote:
> On Sat, 1 Dec 2007 06:18:13 +0000
> RW <fbsd06 at mlists.homeunix.com> wrote:
>
>
>> On Sat, 1 Dec 2007 04:44:27 +0000
>> John Murphy <freebsd001 at freeode.co.uk> wrote:
>>
>>
>>> I've just successfully done the world and kernel upgrade from 7 beta2
>>> to beta3. I've always had a mergemaster phobia, but it didn't seem too
>>> bad this time. I thought I'd broken it after choosing /bin/tcsh as my
>>> shell in single user mode. It grumbled about termcap (I think) and
>>> then gave me a "simple shell" with a % prompt.
>>> ...
>>> I'll know to always accept the suggested /bin/sh in future, but I was
>>> wondering if the only reason a choice of a different shell is offered
>>> is to scare the unwary.
>>>
>> Selecting /bin/[t]csh always works for me.
>>
>
> I just tried it again with exactly the same results (FreeBSD-7.0 beta3):
>
> [after pressing 4 at the Beasty menu]
>
> Trying to mount root from ufs:/dev/ad4s2a
> Enter full path name of shell or RETURN for /bin/sh:
> /bin/tcsh
> sh: Cannot open /etc/termcap
> sh: using dumb terminal settings
> %fsck -p
> fsck: Command not found
> %mount -u /
> mount: Command not found
> %reboot
> reboot: Command not found
> %exit
> logout ... continues to a Login prompt.
>
You simply don't have the commands in your PATH. Type /sbin/mount,
/sbin/fsck, /sbin/reboot and so on, and it does work. Never tried using
an setenv PATH /bin:/sbin:usr/bin:/usr/sbin(etc) in single user mode,
but I reckon it works.
Also note that vi doesn't work by default as it needs to write to /tmp.
So mount /tmp or re-mount / to RW permissions.
Regards,
Jorn
> Pressing RETURN or typing /bin/sh gets a '#' prompt and working fsck etc.
>
> Is your /etc/termcap a symlink?
>
> ll /etc/termcap
> lrwxrwxrwx 1 root wheel 23 Nov 15 20:27 /etc/termcap -> /usr/share/misc/termcap
>
>
More information about the freebsd-questions
mailing list