You are not logged in.

#1 2015-12-27 10:07:48

Dreyeth
Member
Registered: 2015-10-17
Posts: 13

[SOLVED] GRUB and Syslinux keymap conversion utilities.

After hours and hours of trying to generate the custom kmaps for either bootloader from a existing .kmap file,
I had a good cursing fit at every qwerty user on the planet
I'm so bitter at the qwerty users that forget non-qwerty keyboard suppport beacuse well they can see their keys as QWERTY here so they don't need it.

After following the directions on the wiki and running this command it spits out a mangled file.

ckbcomp dvorak | sudo grub-mklayout -o /boot/grub/dvorak.gkb

https://wiki.archlinux.org/index.php/Talk:GRUB

I also have the suspicion that its even still ignoring the provided .gkb file even after that.

So I figured I'd finally check out Syslinux, which I've been meaning too to get around to for awhile.
And I find that its configuration file contains comments on loading keymaps, which I was very
happy to see.

But it requires a program distributed as part of LILO to actually convert the keymaps from the standard console ones
into a format both it and LILO use, so I build LILO and checkout keytab-lilo.
After some tinkering I find it only runs in a real console (fine I switch to one), and when run even then spits out a error message
about not being able to find the us.kmap and complains that the keymap is empty.

https://wiki.archlinux.org/index.php/Sy … ard_layout

Is there really a good reason these projects avoid using the .kmap (either compressed or uncompressed) files directly?

This began as hobby test to see bootloader support for residing within a encrypted partition without a separate boot
partition on a single BTRFS partition with Linux being on different subvolumes, but being a dvorak user with a modded keyboard that part
has turned into a real pain though its been completely successful otherwise. =/

Does anyone have a dvorak.ktl file?
I'm ready to give up and just download a prebuilt one, but I haven't been able to locate one on the net.

Sorry about the rant but I need to vent it, I'm so drained I'm totally zombied out, I'll be back in a few hours.

Last edited by Dreyeth (2015-12-27 20:11:30)

Offline

#2 2015-12-27 16:03:44

Dreyeth
Member
Registered: 2015-10-17
Posts: 13

Re: [SOLVED] GRUB and Syslinux keymap conversion utilities.

I could use a dvorak.gkb file as well.

Are there any Syslinux installation CD's that would have the files on them, that I can extract off the mounted ISO?
Any ideas is appreciated.

I've found this previous discussion of the same issues. https://bbs.archlinux.org/viewtopic.php?id=170366

Last edited by Dreyeth (2015-12-27 16:31:09)

Offline

#3 2015-12-27 17:41:54

jjacky
Member
Registered: 2011-11-09
Posts: 347
Website

Re: [SOLVED] GRUB and Syslinux keymap conversion utilities.

hmm, this sounds familiar. First off, you don't need LILO, keytab-lilo is a perl script that is actually provided by syslinux.

Then, when looking into this some time ago I found out that the format from loadkeys was changed (in kbd 2.0.3), and keymap-lilo needs to be adjusted accordingly. I meant to send a patch upstream, but forgot. I just did now though: http://ix.io/n0p
If you patch your keytab-lilo then instructions from the wiki should work fine.

Offline

#4 2015-12-27 18:46:20

Dreyeth
Member
Registered: 2015-10-17
Posts: 13

Re: [SOLVED] GRUB and Syslinux keymap conversion utilities.

Awesome! getting it fixed upstream, thank you for taking the time to send a fix in. smile

Time to learn the art of patching with diffs, download the source and patch it, this is going to take some reading.
Frankly I should already know how to do that. >_>
But after I'm done tinkering with the grub2 keymap support unless I get it totally working
and then I'll save that for my next install.

I've gotten grub2 to load keymaps from its command line interface by pressing 'c'
and typing.

keymap 'nameofkeymap'

if the keymaps are stored in /boot/grub/layouts/ which seems to be the default directory for that as far as grub is concerned.

But I've tried every instruction I can on just about any forum on making that permanent and the default,
both before and after the update scripts are run, and I haven't had much luck so far.

I will say that I was wrong and ckbcomp is outputting totally valid .gkb's files,
so that wasn't the problem.

Just that grub2 is ignoring every way I've been told to set the loading
of .gkb keymap files in its configuration files.

I've been really meaning to look into Syslinux for a very long time,
to see if it has a little (hopefully a lot) more sanity then GRUB. >_<

Last edited by Dreyeth (2015-12-27 18:57:42)

Offline

#5 2015-12-27 19:57:09

Dreyeth
Member
Registered: 2015-10-17
Posts: 13

Re: [SOLVED] GRUB and Syslinux keymap conversion utilities.

Well I've figured out how to get GRUB to load its keymap file correctly, but its useless
for what I'm trying to accomplish since it only loads it after trying to unlock the encrypted
partition, rather then installing the keymap file into the part of itself that loads off of the MBR.

You can do it by doing the following after installing ckbcomp if using the dvorak keyboard layout.

mkdir /boot/grub/layouts
ckbcomp dvorak | grub-mklayout -o /boot/grub/dvorak.gkb

Which creates the default directory GRUB expects to find its keymap files in without providing a explicit path.

Then editing.

vim /etc/default/grub

And changing.

GRUB_TERMINAL_INPUT=console

To this.

GRUB_TERMINAL_INPUT=at_keyboard

As well as editing.

vim /etc/grub.d/40_custom

And adding.

insmod keylayouts
keymap dvorak

Then running

grub-mkconfig -o /boot/grub/grub.cfg 

But while intially loading before reading its configuration file off of the root partition,
it still only supports qwerty unfortunately.

Last edited by Dreyeth (2015-12-27 20:12:26)

Offline

#6 2015-12-27 20:15:50

Dreyeth
Member
Registered: 2015-10-17
Posts: 13

Re: [SOLVED] GRUB and Syslinux keymap conversion utilities.

Between Jjacky sending a fix upstream to keytab-lilo for Syslinux's keymap support.

And figuring out how to do the same thing with GRUB,
even though it didn't work out for what I was doing at the time.

Its solved.

Thanks again Jjacky.

Last edited by Dreyeth (2015-12-27 20:16:04)

Offline

Board footer

Powered by FluxBB