From a2ee23523c377cee58f960e70d43d88c667981de Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Sat, 13 Mar 2021 23:39:51 +0100 Subject: [PATCH] keyboard layout --- pxe-setup/README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++ pxe-setup/fr-pc.ktl | Bin 0 -> 256 bytes 2 files changed, 59 insertions(+) create mode 100644 pxe-setup/fr-pc.ktl diff --git a/pxe-setup/README.md b/pxe-setup/README.md index deba6b1..edc764b 100644 --- a/pxe-setup/README.md +++ b/pxe-setup/README.md @@ -163,3 +163,62 @@ Create **/etc/ethers** and **/etc/dnsmasq.hosts**. ```sh touch /etc/ethers /etc/dnsmasq.hosts ``` + +## French Keyboard Layout + +### For Grub + +Generate a suitable Keyboard layout for Grub. + +```sh +mkdir -p /var/lib/tftpboot/EFI/centos/layouts +gunzip -c /usr/lib/kbd/keymaps/xkb/fr.map.gz |grub2-mklayout -o /var/lib/tftpboot/EFI/centos/layouts/fr.gkb +``` + +Edit **/var/lib/tftpboot/grub.cfg** and add the following lines. + +``` +insmod keylayouts +insmod at_keyboard +terminal_input at_keyboard +keymap fr +``` + +### For Syslinux + +```sh +curl -Lo syslinux.tgz https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz +tar zxvf syslinux.tgz +cd syslinux-6.03 +cat > patch <<"EOF" +diff --git a/utils/keytab-lilo b/utils/keytab-lilo +index 9e34160..337a869 100755 +--- a/utils/keytab-lilo ++++ b/utils/keytab-lilo +@@ -48,9 +48,9 @@ sub load_map + $empty = 1; + while () { + chop; +- if (/^(static\s+)?u_short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) { ++ if (/^(static\s+)?(u_|unsigned )short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) { + die "active at beginning of map" if defined $current; +- $current = $pfx.":".$2; ++ $current = $pfx.":".$3; + next; + } + undef $current if /^};\s*$/; +EOF +patch -p1 < patch +./utils/keytab-lilo -p 60=46 -p 92=60 -p 124=62 /usr/lib/kbd/keymaps/legacy/i386/qwerty/us.map.gz /usr/lib/kbd/keymaps/legacy/i386/azerty/fr-pc.map.gz > /var/lib/tftpboot/fr-pc.ktl +``` + +Edit **/var/lib/tftpboot/pxelinux.cfg/default** and add the following lines. + +``` +KBDMAP fr-pc.ktl +``` + +More details here: +- https://wiki.archlinux.fr/syslinux +- http://ix.io/n0p + diff --git a/pxe-setup/fr-pc.ktl b/pxe-setup/fr-pc.ktl new file mode 100644 index 0000000000000000000000000000000000000000..4e651128f95732452985237b16ef033235c76289 GIT binary patch literal 256 zcmV+b0ssC00RjUA1qKHQ2?`4g4Gs?w5fT#=6&4p585bKI9UdPbF(orJH8=S=FgPna zDLNtGCg~z4C@tt;=S^)cJujy+Q9?sRMMg(RNlHshKTc0jK~hsxRaRP9Syuu)BsQ?J zabja+WoBn+X=-b1EN*XbVRCbHb#{7qd3OXpqq2X1fr5jCg@%WSiHeJijgF6yk&=^? zm6n&7nVOrNot~edp<|<4rKYE-sj922t*)=Iv9hzYwYImoxw^Z&y}rM|!NSAD#m2|T z$;!*j&Cbuz(bCh@)z;V8+1lIO-QM5e;o{@u<>u$;>FVq3?e6dJ@$&QZ_4fDp`TG0( G{r>-*If9x1 literal 0 HcmV?d00001