LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-17-2020, 12:04 PM   #1
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
NumLock During Boot


Any Slackers using NumLock during the boot stage? If so how?

By design the Linux kernel disables NumLock and ignores any related BIOS setting. NumLock must be enabled elsewhere by users.

Often this has no impact on users because NumLock can be enabled at the console in rc.local, login managers, and desktop environments. There is one notable exception.

Encrypted disks.

At that moment NumLock is disabled. Hardly the end of the world but a nuisance for users acclimated to using NumLock.

Not directly related to Slackware, but I found this and this.

Suggestions and ideas welcomed.

Thanks again.
 
Old 03-17-2020, 02:02 PM   #2
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
BIOS Works for Me

The configuration firmware on the motherboard (BIOS) of three of my computers has a setting for numeric lock and it works for me (USB connected keyboards). I use LUKS with a typed passphrase needed for the root partition. Perhaps the numeric lock option effectiveness during boot varies between manufacturers.

The nitpick I have is setting up LUKS in laptops for the elderly. The laptops they have (in these particular cases) don't have a firmware setting to disable repeating keys with continued keypress (whatever it's called) during boot.

They hold the keys too long when typing even a simple passphrase (4 characters) so the computer doesn't boot. The keys are not echoed to the screen so they don't see their mistake.

My workarounds are to change the external keyboard to mechanical switches, use an Apple iphone stylus to press the passphrase keys, change to a single character passphrase, and or rebuild the system without encryption or no encryption on the root partition.

My experience is that these two items, numeric lock & repeating keys, during boot vary from computer to computer. Most of my stuff is older so newer computers may be more consistent.

EDIT: I just realized that the numeric lock indicator is lit but none of my passphrases actually use the numeric keyboard. I will test to confirm.

Last edited by TracyTiger; 03-17-2020 at 03:12 PM. Reason: Need to Test, grammar/spelling
 
1 members found this post helpful.
Old 03-17-2020, 02:59 PM   #3
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
The Secret is UEFI/BIOS Settings

I just now added a LUKS key for my root partition that uses a numeric digit and it works correctly when using the numeric pad on boot. That is the motherboard setting of having the numeric lock on during boot works on my particular computer.

I have an ASUS motherboard with an AMI UEFI/BIOS Utility from 2012 on the firmware. The setting is labelled "Bootup Numeric State". So in this case I'm just lucky to have a motherboard where numeric lock is settable on bootup.

Does anyone have a computer that allows disabling the "key repeat" during boot?
 
Old 03-24-2020, 01:19 AM   #4
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,967

Rep: Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545
Quote:
Originally Posted by upnort View Post
Any Slackers using NumLock during the boot stage? If so how?
I don't use encrypted disk but I do set NumLock to on during the boot stage. Perhaps this will spark and idea or two.

Here is the applicable section form my rc.local:
Code:
# Turn on Num Lock
if [ -x /etc/rc.d/rc.numlock ]; then
  /etc/rc.d/rc.numlock on 
fi
And the rc.numblock file:
Code:
#!/bin/sh
# Turn on Num Lock

# Turn on Num Lock 
numlock_on() {
  if [ -x /usr/bin/setleds ]; then
    echo "Turning on Num Lock"
    CLITTY=/dev/tty[1-6]
    for tty in $CLITTY; do
      /usr/bin/setleds -D +num < $tty
    done
  fi
}

case "$1" in
'on')
  numlock_on
  ;;
*)
  echo "usage $0 on"
esac
setleds is part of the kbd package in Slackware. The rc.numlock I had to create.
 
3 members found this post helpful.
Old 03-24-2020, 11:48 AM   #5
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
The rc.numlock I had to create.
I do something similar but sadly that does not fix the NumLock state in between the boot loader launching and rc.d boot scripts.
 
Old 03-24-2020, 12:55 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by upnort View Post
I do something similar but sadly that does not fix the NumLock state in between the boot loader launching and rc.d boot scripts.
I suppose another option would be to add setleds and any dependencies/libraries to the initrd and then edit the init script to change numlock's state.
 
Old 03-24-2020, 01:08 PM   #7
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
I suppose another option would be to add setleds and any dependencies/libraries to the initrd and then edit the init script to change numlock's state.
Yes, refer to the links in the original post.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD and numlock on at boot gentisle *BSD 2 05-25-2005 01:47 PM
numlock @ boot nadroj Linux - Newbie 5 04-06-2005 03:07 PM
numlock on boot... moschi Linux - Newbie 4 09-05-2004 03:11 AM
Boot with numlock on? Possible? MillyFish Fedora 14 06-10-2004 08:05 AM
Numlock on on boot FNC Linux - General 2 05-18-2003 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration