Re: What's the point of the shell choice in single user mode? [now: keyboards]
On Fri, Dec 07, 2007 at 03:42:45PM +0100, Erik Trulsson wrote: > > On Fri, Dec 07, 2007 at 02:33:25PM +, Frank Shute wrote: > > On Fri, Dec 07, 2007 at 01:56:33PM +0100, Erik Trulsson wrote: > > > > > > On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: > > > > > > > > > > > > > > Thanks for all the tips on this subject. One more question: > > > > > > > > How would I enable a local keyboard layout in single user mode? > > > > I have had to find '/' by trial and error on my UK keyboard. > > > > > > > > > > You can use kbdcontrol(1) to load a new keyboard mapping. (Probably > > > requires that /usr is already mounted to work correctly.) > > > > > > You can also specify in the kernel config file which keyboard > > > layout should be used by default. See the atkbd(4) or ukbd(4) > > > manpages for details. > > > > > > > You can also specify it in /etc/rc.conf: > > > > keymap="uk.cp850" > > When you boot into single user mode (which the question was about) > the settings in /etc/rc.conf has not been applied yet. That happens > later in the boot process. > Thanks for correcting me. I always go into single user from multi-user so I guess it has been applied already. Thanks for the tip about setting it in the kernel config, I'll do that in case I have to boot into single user from boot-up. The handbook seems a bit sparse about keyboards. Wouldn't it be a good idea to recommend to all "foreign" users to set their keyboard in their kernel config? I assume it defaults to US. Just what you need in an emergency, a keyboard out of whack ;) -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Fri, Dec 07, 2007 at 02:33:25PM +, Frank Shute wrote: > On Fri, Dec 07, 2007 at 01:56:33PM +0100, Erik Trulsson wrote: > > > > On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: > > > > > > > > > > Thanks for all the tips on this subject. One more question: > > > > > > How would I enable a local keyboard layout in single user mode? > > > I have had to find '/' by trial and error on my UK keyboard. > > > > > > > You can use kbdcontrol(1) to load a new keyboard mapping. (Probably > > requires that /usr is already mounted to work correctly.) > > > > You can also specify in the kernel config file which keyboard layout should > > be used by default. See the atkbd(4) or ukbd(4) manpages for details. > > > > You can also specify it in /etc/rc.conf: > > keymap="uk.cp850" When you boot into single user mode (which the question was about) the settings in /etc/rc.conf has not been applied yet. That happens later in the boot process. -- Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Fri, Dec 07, 2007 at 01:56:33PM +0100, Erik Trulsson wrote: > > On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: > > > > > > Thanks for all the tips on this subject. One more question: > > > > How would I enable a local keyboard layout in single user mode? > > I have had to find '/' by trial and error on my UK keyboard. > > > > You can use kbdcontrol(1) to load a new keyboard mapping. (Probably > requires that /usr is already mounted to work correctly.) > > You can also specify in the kernel config file which keyboard layout should > be used by default. See the atkbd(4) or ukbd(4) manpages for details. > You can also specify it in /etc/rc.conf: keymap="uk.cp850" -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
El lunes 03 de diciembre a las 19:14:12 CET, RW escribió: > On Sun, 02 Dec 2007 18:48:33 +0100 > Jorn Argelo <[EMAIL PROTECTED]> wrote: > > > > 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. > > I think vi will also fail unless it has access to termcap, so you'd > need /usr mounted too. You can copy /usr/share/misc/termcap.db to /root/.termcap.db and use /rescue/vi. Only / and /tmp is needed. Regards pgpJ8kyXu7D5b.pgp Description: PGP signature
Re: What's the point of the shell choice in single user mode?
On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: > On Mon, 3 Dec 2007 13:53:02 -0500 > "Philip M. Gollucci" <[EMAIL PROTECTED]> wrote: > > > Jorn Argelo wrote: > > > RW wrote: > > >> On Sun, 02 Dec 2007 18:48:33 +0100 > > >> Jorn Argelo <[EMAIL PROTECTED]> wrote: > > >> > > >> > > >> > > >>> 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. > > >>> > > >> I think vi will also fail unless it has access to termcap, so you'd > > >> need /usr mounted too. > > >> > > > You'd need to mount /usr anyway, as the vi binary is located in /usr/bin > > > ;-) > > *cough* /rescue/vi > > Thanks for all the tips on this subject. One more question: > > How would I enable a local keyboard layout in single user mode? > I have had to find '/' by trial and error on my UK keyboard. > You can use kbdcontrol(1) to load a new keyboard mapping. (Probably requires that /usr is already mounted to work correctly.) You can also specify in the kernel config file which keyboard layout should be used by default. See the atkbd(4) or ukbd(4) manpages for details. -- Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Mon, 3 Dec 2007 13:53:02 -0500 "Philip M. Gollucci" <[EMAIL PROTECTED]> wrote: > Jorn Argelo wrote: > > RW wrote: > >> On Sun, 02 Dec 2007 18:48:33 +0100 > >> Jorn Argelo <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >>> 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. > >>> > >> I think vi will also fail unless it has access to termcap, so you'd > >> need /usr mounted too. > >> > > You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) > *cough* /rescue/vi Thanks for all the tips on this subject. One more question: How would I enable a local keyboard layout in single user mode? I have had to find '/' by trial and error on my UK keyboard. -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
--- Begin Message --- Philip M. Gollucci wrote: Jorn Argelo wrote: RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [1]<[EMAIL PROTECTED]> wrote: 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. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) *cough* /rescue/vi Ah good point, forgot about that one. Cheers References 1. mailto:[EMAIL PROTECTED] --- End Message --- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
Jorn Argelo wrote: > RW wrote: >> On Sun, 02 Dec 2007 18:48:33 +0100 >> Jorn Argelo <[EMAIL PROTECTED]> wrote: >> >> >> >>> 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. >>> >> I think vi will also fail unless it has access to termcap, so you'd >> need /usr mounted too. >> > You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) *cough* /rescue/vi -- Philip M. Gollucci ([EMAIL PROTECTED]) o:703.549.2050x206 Senior System Admin - Riderway, Inc. http://riderway.com / http://ridecharge.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo <[EMAIL PROTECTED]> wrote: 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. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo <[EMAIL PROTECTED]> wrote: > 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. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo <[EMAIL PROTECTED]> wrote: > John Murphy wrote: > > [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. Thanks. Useful to know that those tools are all in /sbin I can confirm that setenv PATH works too. > 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 -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
John Murphy wrote: On Sat, 1 Dec 2007 06:18:13 + RW <[EMAIL PROTECTED]> wrote: On Sat, 1 Dec 2007 04:44:27 + John Murphy <[EMAIL PROTECTED]> 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 14:06:19 + John Murphy <[EMAIL PROTECTED]> wrote: > On Sat, 1 Dec 2007 06:18:13 + > RW <[EMAIL PROTECTED]> wrote: > > > 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 I see what you mean - I do get that. I thought you were saying that /bin/tcsh wasn't starting. Personally I just put all the commands for the single-user mode install into a simple script and run that. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 13:46:12 + Daniel Bye <[EMAIL PROTECTED]> wrote: > On Sat, Dec 01, 2007 at 02:15:26PM +0100, Erik Trulsson wrote: > > On Sat, Dec 01, 2007 at 04:44:27AM +, John Murphy 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. > > > > > > fsck and mount were unknown commands and even though I could change > > > directory to /usr or /home they were (apparently) empty! Scary! > > > I now realise it was because they were not mounted of course. > > > > > > 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. > > > > On possible scenario is that /bin/sh has - somehow - been corrupted, deleted > > or otherwise made unusable. In that situation it is very nice to be able to > > choose some other shell so you can at least try to fix the problem. > > And some individuals even seem to prefer [t]csh over sh! I know, what's > that all about? ;-P (runs to a safe distance to watch the fireworks...) > > John - you would have had the same experience had you selected sh - > only the root file system is mounted if you come up into single user, > which is why the installworld instructions tell you to mount all your > other local file systems. As for fsck and mount being unknown, I suspect > that's due to a very conservative initial PATH under tcsh, but as I > don't use it, I don't know for sure. And the termcap grumble is > because /etc/termcap is actually a symlink to /usr/share/misc/termcap, > which on your system is evidently not on your / fs. Ah, that explains it. /usr is indeed elsewhere ad4s2f in fact. [t]csh always gets my vote. (The government still seems to win though) :) -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 06:18:13 + RW <[EMAIL PROTECTED]> wrote: > On Sat, 1 Dec 2007 04:44:27 + > John Murphy <[EMAIL PROTECTED]> 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. 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 -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sat, Dec 01, 2007 at 02:15:26PM +0100, Erik Trulsson wrote: > On Sat, Dec 01, 2007 at 04:44:27AM +, John Murphy 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. > > > > fsck and mount were unknown commands and even though I could change > > directory to /usr or /home they were (apparently) empty! Scary! > > I now realise it was because they were not mounted of course. > > > > 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. > > On possible scenario is that /bin/sh has - somehow - been corrupted, deleted > or otherwise made unusable. In that situation it is very nice to be able to > choose some other shell so you can at least try to fix the problem. And some individuals even seem to prefer [t]csh over sh! I know, what's that all about? ;-P (runs to a safe distance to watch the fireworks...) John - you would have had the same experience had you selected sh - only the root file system is mounted if you come up into single user, which is why the installworld instructions tell you to mount all your other local file systems. As for fsck and mount being unknown, I suspect that's due to a very conservative initial PATH under tcsh, but as I don't use it, I don't know for sure. And the termcap grumble is because /etc/termcap is actually a symlink to /usr/share/misc/termcap, which on your system is evidently not on your / fs. Dan -- Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ pgp70mFQf4TXJ.pgp Description: PGP signature
Re: What's the point of the shell choice in single user mode?
On Sat, Dec 01, 2007 at 04:44:27AM +, John Murphy 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. > > fsck and mount were unknown commands and even though I could change > directory to /usr or /home they were (apparently) empty! Scary! > I now realise it was because they were not mounted of course. > > 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. On possible scenario is that /bin/sh has - somehow - been corrupted, deleted or otherwise made unusable. In that situation it is very nice to be able to choose some other shell so you can at least try to fix the problem. -- Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 04:44:27 + John Murphy <[EMAIL PROTECTED]> 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. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"