RE: FreeBSD 11.0-CURRENT Single User Keymap

2015-09-21 Thread Brendan Sechter
> Date: Sun, 20 Sep 2015 20:05:29 +0900
> From: junch...@dec.sakura.ne.jp
> To: freebsd-current@freebsd.org
> Subject: Re: FreeBSD 11.0-CURRENT Single User Keymap
>
> When booting to single user mode, no rc scripts are executed.
> So rc.conf is NOT processed at all and keymap setting is not applied.
>
> What I do in single user mode is as follows.
>
> &kbdcontrol -r fast -l jp.kbd
>
> I'm using vt, and fast keyrate. If you prefer sc, and do not want fast
> keyrate, try below.
>
> &kbdcontrol -l jp.106.kbd
>
> No interactive inputs needed. No writes to drives.

The following also works and it is easier for me to remember.

service syscons start

Disabling kbdmux allows the system to boot into single user mode
with a custom keymap if the kernel is compiled with the below kernel
configuration options.  I prefer this solution because I do not need to
patch anything, nor do I need to enter a command to use my
preferred keymap.

> On Wed, 16 Sep 2015 14:20:15 +0900
> Brendan Sechter  wrote:
>
>>> Date: Wed, 16 Sep 2015 04:59:40 +0200
>>> From: gljennj...@gmail.com
>>> To: sg...@hotmail.com
>>> CC: freebsd-current@freebsd.org
>>> Subject: Re: FreeBSD 11.0-CURRENT Single User Keymap
>>>
>>> On Tue, 15 Sep 2015 19:32:35 +0900
>>> Brendan Sechter  wrote:
>>>
>>>> When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change 
>>>> the keymap used in single user mode? __I originally asked this question on 
>>>> the FreeBSD forums, but was bounced to the mailing list because CURRENT is 
>>>> an unsupported version.
>>>>
>>>> I have read an old forum thread on this topic. I have also read 
>>>> the__atkbd(4)__and__ukbd(4)__man pages. The relevant parts of my kernel 
>>>> configuration are as follows:
>>>>
>>>> &__--__--__--__--
>>>> include GENERIC
>>>> ident MY_KERNEL
>>>>
>>>> & AT Keyboard
>>>> device atkbdc
>>>> options ATKBD_DFLT_KEYMAP
>>>> makeoptions ATKBD_DFLT_KEYMAP=jp.106
>>>> device atkbd
>>>>
>>>> & USB Keyboard
>>>> device ukbd
>>>> options UKBD_DFLT_KEYMAP
>>>> makeoptions UKBD_DFLT_KEYMAP=jp.106
>>>>
>>>> & everything else
>>>> & ...
>>>> &__--__--__--__--
>>>>
>>>> So far as I can tell, these options should be working. I am using a 106 
>>>> key Japanese keyboard. Single user mode appears to use the keymap for a 
>>>> 101 key standard US layout. I have tried the following values:
>>>> - jp
>>>> - jp.106
>>>> - jp.106.kbd (not tried recently)
>>>>
>>>> Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure 
>>>> I am having the same problem on my physical machines. The specific driver 
>>>> almost certainly depends on the hardware.
>>>>
>>>
>>> Try setting keymap in /etc/rc.conf to the entry you want. Just
>>> putting keymap="jp.106" there should work.
>>
>> My /etc/rc.conf already contained keymap="jp".
>> Changing it to keymap="jp.106" did not resolve the issue.
>> The keymap is correct in multi user mode, but not single user mode.
>>
>> I have never been able to get single user mode to boot with anything other 
>> than a〓101 key standard US layout.
>> If I recall correctly, starting devd would load the /etc/rc.conf keymap in 
>> previous versions, but I am not 100% sure of that.
>>
>> Running kbdmap after booting into single user mode gives some interesting 
>> but expected output.
>> & kbdmap
>> lang_default = en
>> dialect = en
>> lang_abk = en
>> Could not open temporary file "/tmp/_kbd_lang.R4J6"
>> &
>>
>> I can change the keymap by remounting a read/write filesystem and running 
>> kbdmap.
>> This is not ideal.
>> & mount -u /
>> & kbdmap
>> [interactively select Japanese 106 keyboard layout]
>> keymap="jp.kbd"
>> &
>>
>> I only found one solution to this issue in Japanese, but it requires 
>> remounting and manually setting the keymap.
>> Are people booting into single user mode with working European keymaps?
>> Is it possible the jp keymap has some quirk that is causing it to be 
>> rejected when booting in single user mode?
>>
>> If it matters, this system s

RE: FreeBSD 11.0-CURRENT Single User Keymap

2015-09-21 Thread Brendan Sechter
> Date: Sun, 20 Sep 2015 16:50:40 +0200
> Subject: Re: FreeBSD 11.0-CURRENT Single User Keymap
> From: oliver.pin...@hardenedbsd.org
> To: gljennj...@gmail.com
> CC: sg...@hotmail.com; freebsd-current@freebsd.org
>
> On 9/16/15, Gary Jennejohn  wrote:
>> On Tue, 15 Sep 2015 19:32:35 +0900
>> Brendan Sechter  wrote:
>>
>>> When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change
>>> the keymap used in single user mode? __I originally asked this question on
>>> the FreeBSD forums, but was bounced to the mailing list because CURRENT is
>>> an unsupported version.
>>>
>>> I have read an old forum thread on this topic. I have also read
>>> the__atkbd(4)__and__ukbd(4)__man pages. The relevant parts of my kernel
>>> configuration are as follows:
>>>
>>> &__--__--__--__--
>>> include GENERIC
>>> ident MY_KERNEL
>>>
>>> & AT Keyboard
>>> device atkbdc
>>> options ATKBD_DFLT_KEYMAP
>>> makeoptions ATKBD_DFLT_KEYMAP=jp.106
>>> device atkbd
>>>
>>> & USB Keyboard
>>> device ukbd
>>> options UKBD_DFLT_KEYMAP
>>> makeoptions UKBD_DFLT_KEYMAP=jp.106
>>>
>>> & everything else
>>> & ...
>>> &__--__--__--__--
>>>
>>> So far as I can tell, these options should be working. I am using a 106
>>> key Japanese keyboard. Single user mode appears to use the keymap for a
>>> 101 key standard US layout. I have tried the following values:
>>> - jp
>>> - jp.106
>>> - jp.106.kbd (not tried recently)
>>>
>>> Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure
>>> I am having the same problem on my physical machines. The specific driver
>>> almost certainly depends on the hardware.
>>>
>>
>> Try setting keymap in /etc/rc.conf to the entry you want. Just
>> putting keymap="jp.106" there should work.
>>
>> Umm, but this is for syscons. Not sure what you may need for vt,
>> which I don't use.
>
> See this patch: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193865

PR 194744 implies that disabling kbdmux is a workaround.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194744

Indeed, compiling with the above kernel configuration and disabling kbdmux by
adding the following line to /boot/device.hints allows single user mode to boot
with a custom keymap.  jp.106.kbd in my case.
hint.kbdmux.0.disabled="1"

In my tests, recompiling with a manually patched 
/usr/src/sys/dev/kbd/kbdtables.h
had no impact on the kbdmux keymap.  Neither did temporarily replacing
/usr/share/syscons/keymaps/us.iso.kbd before the build.

I look forward to seeing the custom keymap related patches pulled into head.
I understand the developers have more pressing and exciting things to work on.

>> --
>> Gary Jennejohn
>> ___
>> freebsd-current@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>>
  
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: FreeBSD 11.0-CURRENT Single User Keymap

2015-09-20 Thread Oliver Pinter
On 9/16/15, Gary Jennejohn  wrote:
> On Tue, 15 Sep 2015 19:32:35 +0900
> Brendan Sechter  wrote:
>
>> When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change
>> the keymap used in single user mode? __I originally asked this question on
>> the FreeBSD forums, but was bounced to the mailing list because CURRENT is
>> an unsupported version.
>>
>> I have read an old forum thread on this topic. I have also read
>> the__atkbd(4)__and__ukbd(4)__man pages. The relevant parts of my kernel
>> configuration are as follows:
>>
>> #__--__--__--__--
>> include GENERIC
>> ident MY_KERNEL
>>
>> # AT Keyboard
>> device atkbdc
>> options ATKBD_DFLT_KEYMAP
>> makeoptions ATKBD_DFLT_KEYMAP=jp.106
>> device atkbd
>>
>> # USB Keyboard
>> device ukbd
>> options UKBD_DFLT_KEYMAP
>> makeoptions UKBD_DFLT_KEYMAP=jp.106
>>
>> # everything else
>> # ...
>> #__--__--__--__--
>>
>> So far as I can tell, these options should be working. I am using a 106
>> key Japanese keyboard. Single user mode appears to use the keymap for a
>> 101 key standard US layout. I have tried the following values:
>> - jp
>> - jp.106
>> - jp.106.kbd (not tried recently)
>>
>> Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure
>> I am having the same problem on my physical machines. The specific driver
>> almost certainly depends on the hardware.
>>
>
> Try setting keymap in /etc/rc.conf to the entry you want.  Just
> putting keymap="jp.106" there should work.
>
> Umm, but this is for syscons.  Not sure what you may need for vt,
> which I don't use.

See this patch: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193865

>
> --
> Gary Jennejohn
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: FreeBSD 11.0-CURRENT Single User Keymap

2015-09-20 Thread Tomoaki AOKI
When booting to single user mode, no rc scripts are executed.
So rc.conf is NOT processed at all and keymap setting is not applied.

What I do in single user mode is as follows.

  #kbdcontrol -r fast -l jp.kbd

I'm using vt, and fast keyrate. If you prefer sc, and do not want fast
keyrate, try below.

  #kbdcontrol -l jp.106.kbd

No interactive inputs needed. No writes to drives.


On Wed, 16 Sep 2015 14:20:15 +0900
Brendan Sechter  wrote:

> > Date: Wed, 16 Sep 2015 04:59:40 +0200
> > From: gljennj...@gmail.com
> > To: sg...@hotmail.com
> > CC: freebsd-current@freebsd.org
> > Subject: Re: FreeBSD 11.0-CURRENT Single User Keymap
> >
> > On Tue, 15 Sep 2015 19:32:35 +0900
> > Brendan Sechter  wrote:
> >
> >> When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change 
> >> the keymap used in single user mode? __I originally asked this question on 
> >> the FreeBSD forums, but was bounced to the mailing list because CURRENT is 
> >> an unsupported version.
> >>
> >> I have read an old forum thread on this topic. I have also read 
> >> the__atkbd(4)__and__ukbd(4)__man pages. The relevant parts of my kernel 
> >> configuration are as follows:
> >>
> >> &__--__--__--__--
> >> include GENERIC
> >> ident MY_KERNEL
> >>
> >> & AT Keyboard
> >> device atkbdc
> >> options ATKBD_DFLT_KEYMAP
> >> makeoptions ATKBD_DFLT_KEYMAP=jp.106
> >> device atkbd
> >>
> >> & USB Keyboard
> >> device ukbd
> >> options UKBD_DFLT_KEYMAP
> >> makeoptions UKBD_DFLT_KEYMAP=jp.106
> >>
> >> & everything else
> >> & ...
> >> &__--__--__--__--
> >>
> >> So far as I can tell, these options should be working. I am using a 106 
> >> key Japanese keyboard. Single user mode appears to use the keymap for a 
> >> 101 key standard US layout. I have tried the following values:
> >> - jp
> >> - jp.106
> >> - jp.106.kbd (not tried recently)
> >>
> >> Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure 
> >> I am having the same problem on my physical machines. The specific driver 
> >> almost certainly depends on the hardware.
> >>
> >
> > Try setting keymap in /etc/rc.conf to the entry you want. Just
> > putting keymap="jp.106" there should work.
> 
> My /etc/rc.conf already contained keymap="jp".
> Changing it to keymap="jp.106" did not resolve the issue.
> The keymap is correct in multi user mode, but not single user mode.
> 
> I have never been able to get single user mode to boot with anything other 
> than a〓101 key standard US layout.
> If I recall correctly, starting devd would load the /etc/rc.conf keymap in 
> previous versions, but I am not 100% sure of that.
> 
> Running kbdmap after booting into single user mode gives some interesting but 
> expected output.
> # kbdmap
> lang_default = en
> dialect = en
> lang_abk = en
> Could not open temporary file "/tmp/_kbd_lang.R4J6"
> #
> 
> I can change the keymap by remounting a read/write filesystem and running 
> kbdmap.
> This is not ideal.
> # mount -u /
> # kbdmap
> [interactively select Japanese 106 keyboard layout]
> keymap="jp.kbd"
> #
> 
> I only found one solution to this issue in Japanese, but it requires 
> remounting and manually setting the keymap.
> Are people booting into single user mode with working European keymaps?
> Is it possible the jp keymap has some quirk that is causing it to be rejected 
> when booting in single user mode?
> 
> If it matters, this system started as a minimal install 
> using〓FreeBSD-10.2-RELEASE-amd64-disc1.iso.
> I tracked 11.0-CURRENT immediately after performing a minimum install and 
> rebuilt everything a couple of times.
> 
> > Umm, but this is for syscons. Not sure what you may need for vt,
> > which I don't use.
> 
> Multiuser works, single user does not.
> 
> Single user (default standard US keymap):
> # tty
> /dev/console
> 
> Multi user (correct /etc/rc.conf keymap):
> # tty
> /dev/ttyv0
> 
> Multi user SSH〓(correct /etc/rc.conf keymap):
> $ su
> # tty
> /dev/pts/0
> 
> > --
> > Gary Jennejohn
> > ___
> > freebsd-current@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> 
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> 


-- 
Tomoaki AOKIjunch...@dec.sakura.ne.jp
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


RE: FreeBSD 11.0-CURRENT Single User Keymap

2015-09-15 Thread Brendan Sechter
> Date: Wed, 16 Sep 2015 04:59:40 +0200
> From: gljennj...@gmail.com
> To: sg...@hotmail.com
> CC: freebsd-current@freebsd.org
> Subject: Re: FreeBSD 11.0-CURRENT Single User Keymap
>
> On Tue, 15 Sep 2015 19:32:35 +0900
> Brendan Sechter  wrote:
>
>> When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change the 
>> keymap used in single user mode? __I originally asked this question on the 
>> FreeBSD forums, but was bounced to the mailing list because CURRENT is an 
>> unsupported version.
>>
>> I have read an old forum thread on this topic. I have also read 
>> the__atkbd(4)__and__ukbd(4)__man pages. The relevant parts of my kernel 
>> configuration are as follows:
>>
>> &__--__--__--__--
>> include GENERIC
>> ident MY_KERNEL
>>
>> & AT Keyboard
>> device atkbdc
>> options ATKBD_DFLT_KEYMAP
>> makeoptions ATKBD_DFLT_KEYMAP=jp.106
>> device atkbd
>>
>> & USB Keyboard
>> device ukbd
>> options UKBD_DFLT_KEYMAP
>> makeoptions UKBD_DFLT_KEYMAP=jp.106
>>
>> & everything else
>> & ...
>> &__--__--__--__--
>>
>> So far as I can tell, these options should be working. I am using a 106 key 
>> Japanese keyboard. Single user mode appears to use the keymap for a 101 key 
>> standard US layout. I have tried the following values:
>> - jp
>> - jp.106
>> - jp.106.kbd (not tried recently)
>>
>> Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure I 
>> am having the same problem on my physical machines. The specific driver 
>> almost certainly depends on the hardware.
>>
>
> Try setting keymap in /etc/rc.conf to the entry you want. Just
> putting keymap="jp.106" there should work.

My /etc/rc.conf already contained keymap="jp".
Changing it to keymap="jp.106" did not resolve the issue.
The keymap is correct in multi user mode, but not single user mode.

I have never been able to get single user mode to boot with anything other than 
a 101 key standard US layout.
If I recall correctly, starting devd would load the /etc/rc.conf keymap in 
previous versions, but I am not 100% sure of that.

Running kbdmap after booting into single user mode gives some interesting but 
expected output.
# kbdmap
lang_default = en
dialect = en
lang_abk = en
Could not open temporary file "/tmp/_kbd_lang.R4J6"
#

I can change the keymap by remounting a read/write filesystem and running 
kbdmap.
This is not ideal.
# mount -u /
# kbdmap
[interactively select Japanese 106 keyboard layout]
keymap="jp.kbd"
#

I only found one solution to this issue in Japanese, but it requires remounting 
and manually setting the keymap.
Are people booting into single user mode with working European keymaps?
Is it possible the jp keymap has some quirk that is causing it to be rejected 
when booting in single user mode?

If it matters, this system started as a minimal install using 
FreeBSD-10.2-RELEASE-amd64-disc1.iso.
I tracked 11.0-CURRENT immediately after performing a minimum install and 
rebuilt everything a couple of times.

> Umm, but this is for syscons. Not sure what you may need for vt,
> which I don't use.

Multiuser works, single user does not.

Single user (default standard US keymap):
# tty
/dev/console

Multi user (correct /etc/rc.conf keymap):
# tty
/dev/ttyv0

Multi user SSH (correct /etc/rc.conf keymap):
$ su
# tty
/dev/pts/0

> --
> Gary Jennejohn
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
  
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: FreeBSD 11.0-CURRENT Single User Keymap

2015-09-15 Thread Gary Jennejohn
On Tue, 15 Sep 2015 19:32:35 +0900
Brendan Sechter  wrote:

> When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change the 
> keymap used in single user mode? __I originally asked this question on the 
> FreeBSD forums, but was bounced to the mailing list because CURRENT is an 
> unsupported version.
> 
> I have read an old forum thread on this topic. I have also read 
> the__atkbd(4)__and__ukbd(4)__man pages. The relevant parts of my kernel 
> configuration are as follows:
> 
> #__--__--__--__--
> include GENERIC
> ident MY_KERNEL
> 
> # AT Keyboard
> device atkbdc
> options ATKBD_DFLT_KEYMAP
> makeoptions ATKBD_DFLT_KEYMAP=jp.106
> device atkbd
> 
> # USB Keyboard
> device ukbd
> options UKBD_DFLT_KEYMAP
> makeoptions UKBD_DFLT_KEYMAP=jp.106
> 
> # everything else
> # ...
> #__--__--__--__--
> 
> So far as I can tell, these options should be working. I am using a 106 key 
> Japanese keyboard. Single user mode appears to use the keymap for a 101 key 
> standard US layout. I have tried the following values:
> - jp
> - jp.106
> - jp.106.kbd (not tried recently)
> 
> Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure I 
> am having the same problem on my physical machines. The specific driver 
> almost certainly depends on the hardware.
> 

Try setting keymap in /etc/rc.conf to the entry you want.  Just
putting keymap="jp.106" there should work.

Umm, but this is for syscons.  Not sure what you may need for vt,
which I don't use.

-- 
Gary Jennejohn
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


FreeBSD 11.0-CURRENT Single User Keymap

2015-09-15 Thread Brendan Sechter
When compiling a FreeBSD 11.0-CURRENT kernel, what is required to change the 
keymap used in single user mode?  I originally asked this question on the 
FreeBSD forums, but was bounced to the mailing list because CURRENT is an 
unsupported version.

I have read an old forum thread on this topic. I have also read the atkbd(4) 
and ukbd(4) man pages. The relevant parts of my kernel configuration are as 
follows:

# -- -- -- --
include GENERIC
ident MY_KERNEL

# AT Keyboard
device atkbdc
options ATKBD_DFLT_KEYMAP
makeoptions ATKBD_DFLT_KEYMAP=jp.106
device atkbd

# USB Keyboard
device ukbd
options UKBD_DFLT_KEYMAP
makeoptions UKBD_DFLT_KEYMAP=jp.106

# everything else
# ...
# -- -- -- --

So far as I can tell, these options should be working. I am using a 106 key 
Japanese keyboard. Single user mode appears to use the keymap for a 101 key 
standard US layout. I have tried the following values:
- jp
- jp.106
- jp.106.kbd (not tried recently)

Finally, this is a FreeBSD VM running in VirtualBox on OSX. I am 99% sure I am 
having the same problem on my physical machines. The specific driver almost 
certainly depends on the hardware.

Thanks,
-Brendan  
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"