# Clavier qwerty après install PXE (preseed)

**URL:** <https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262>\
**Category:** Support Debian\
**Tags:** wheezy, installation\
**Created:** [Février 21, 2016, 8:18 UTC](https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262 "2016-02-21T20:18:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyberfrk](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/c/dbc845/32.png) [@cyberfrk](https://www.debian-fr.org/u/cyberfrk)\
**Post date:** [Février 21, 2016, 8:18 UTC](https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262/1 "2016-02-21T20:18:11Z")

</div>

Bonjour,

Je souhaiterais installer, de façon automatisée, une debian sur un poste client via PXE.

Le client boot correctement en PXE, interprète le `preseed.cfg` et lance l’installation jusqu’au reboot. Tout est correcte (partition, hostname etc…) sauf le clavier qui est en `qwerty`.

Voici les fichiers conf:

```nohighlight
/var/lib/tftpboot/debian-installer/i386/boot-screens/syslinux.cfg

```

```nohighlight
# D-I config version 2.0
include debian-installer/i386/boot-screens/menu.cfg
default debian-installer/i386/boot-screens/vesamenu.c32
prompt 0
timeout 0

DEFAULT wheezy

LABEL wheezy
        kernel debian-installer/i386/linux
APPEND vga=normal initrd=debian-installer/i386/initrd.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/file=/preseed.cfg IPAPPEND 2

```

`preseed.cfg` (que j’ai injecté à la racine de `initrd.gz` (`/var/lib/tftpboot/debian-installer/i386/initrd.gz`))

```nohighlight
####################################################################
# Localizations
####################################################################

# Install Time 
d-i	console-tools/archs string skip-config
d-i debian-installer/locale string fr_FR
d-i console-keymaps-at/keymap select fr

d-i languagechooser/language-name-fb select French
d-i debian-installer/locale select fr_FR.UTF-8

## Fuseau horaire
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org

# Mirroir
d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/suite string 

# Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note

d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true

####################################################################
# Networking
####################################################################

# Network Configuration
#d-i netcfg/get_hostname string monhostname
#d-i netcfg/get_domain string mondomaine.fr

####################################################################
# Disk Partitioning/Boot loader
####################################################################

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular

# This makes partman automatically partition without confirmation.
d-i partman/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm_nooverwrite boolean true

# This one makes grub-installer install to the MBR even if finds some other OS
# too, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true

# X11 config
xserver-xorg xserver-xorg/autodetect_monitor boolean true
xserver-xorg xserver-xorg/config/monitor/selection-method select medium
xserver-xorg xserver-xorg/config/monitor/mode-list select 1024x768 @ 60 Hz
xserver-xorg xserver-xorg/config/display/modes multiselect 1024x768, 800x600

####################################################################
# User Creation
####################################################################

# Root User
d-i passwd/root-password-crypted passwd monmotdepasse

# Mortal User
d-i passwd/user-fullname string monuser
d-i passwd/username string monuser
d-i passwd/user-password-crypted passwd monmotdepasse

####################################################################
# Software Selections
####################################################################

tasksel tasksel/first multiselect ssh-server standard

####################################################################
# Additional preseed entries (from data/debconf)
####################################################################

exim4-config exim4/no_config boolean true

```

Pour info, les parties `DHCP/DNS` sont gérées par `dnsmasq` et je me suis basé sur [http://www.instalinux.com](http://www.instalinux.com) pour générer adapter mon `preseed.cfg`

Avez-vous une solution?

---

<div class="post-metadata">

**Author:** ![Rexdeus](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/r/8491ac/32.png) [@Rexdeus](https://www.debian-fr.org/u/Rexdeus)\
**Post date:** [Février 21, 2016, 8:19 UTC](https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262/2 "2016-02-21T20:19:42Z")

</div>

essai un

```nohighlight
setxkbmap fr

```

pour revenir en `azerty` en attendant qu’un autre te donne la marche a suivre pour ton soucie

---

<div class="post-metadata">

**Author:** ![anon29980398](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@anon29980398](https://www.debian-fr.org/u/anon29980398)\
**Post date:** [Février 21, 2016, 8:19 UTC](https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262/3 "2016-02-21T20:19:42Z")

</div>

Je n’ai pas récemment utilisé `pxe`,  
mais voici la ligne des paramètres qui me permettent de lancer une version “live” en français:

```auto
lang=fr_FR.UTF-8 locales=fr_FR.UTF-8 keyboard-layouts=fr keyboard-model=pc105 timezone=Europe/Paris utc=yes
```

Il devrait donc être possible de les utiliser dans le fichier `/var/lib/tftpboot/debian-installer/i386/boot-screens/syslinux.cfg` comme ceci:

```auto
# D-I config version 2.0
include debian-installer/i386/boot-screens/menu.cfg
default debian-installer/i386/boot-screens/vesamenu.c32
prompt 0
timeout 0

DEFAULT wheezy

LABEL wheezy
        kernel debian-installer/i386/linux
APPEND vga=normal initrd=debian-installer/i386/initrd.gz lang=fr_FR.UTF-8 locales=fr_FR.UTF-8 keyboard-layouts=fr keyboard-model=pc105 timezone=Europe/Paris utc=yes auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/file=/preseed.cfg IPAPPEND 2
```

tout en ayant commenté les directives correspondantes du fichier `preseed.cfg` (histoire d’éviter les conflits)

```auto
####################################################################
# Localizations
####################################################################

# Install Time
d-i console-tools/archs string skip-config
# d-i debian-installer/locale string fr_FR
# d-i console-keymaps-at/keymap select fr

# d-i languagechooser/language-name-fb select French
# d-i debian-installer/locale select fr_FR.UTF-8

## Fuseau horaire
# d-i clock-setup/utc boolean true
# d-i time/zone string Europe/Paris
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string 0.debian.pool.ntp.org

# Mirroir
d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian/
d-i mirror/suite string

# Post install APT setup
d-i apt-setup/uri_type select d-i
d-i apt-setup/hostname string ftp.fr.debian.org
d-i apt-setup/directory string /debian/
d-i apt-setup/another boolean false
d-i apt-setup/security-updates boolean false
d-i finish-install/reboot_in_progress note
d-i prebaseconfig/reboot_in_progress note

d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true

####################################################################
# Networking
####################################################################

# Network Configuration
#d-i netcfg/get_hostname string monhostname
#d-i netcfg/get_domain string mondomaine.fr

####################################################################
# Disk Partitioning/Boot loader
####################################################################

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular

# This makes partman automatically partition without confirmation.
d-i partman/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm_nooverwrite boolean true

# This one makes grub-installer install to the MBR even if finds some other OS
# too, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true

# X11 config
xserver-xorg xserver-xorg/autodetect_monitor boolean true
xserver-xorg xserver-xorg/config/monitor/selection-method select medium
xserver-xorg xserver-xorg/config/monitor/mode-list select 1024x768 @ 60 Hz
xserver-xorg xserver-xorg/config/display/modes multiselect 1024x768, 800x600

####################################################################
# User Creation
####################################################################

# Root User
d-i passwd/root-password-crypted passwd monmotdepasse

# Mortal User
d-i passwd/user-fullname string monuser
d-i passwd/username string monuser
d-i passwd/user-password-crypted passwd monmotdepasse

####################################################################
# Software Selections
####################################################################

tasksel tasksel/first multiselect ssh-server standard

####################################################################
# Additional preseed entries (from data/debconf)
####################################################################

exim4-config exim4/no_config boolean true
```

Ou alors, il faudrait trouver la syntaxe correspondante pour `preseed.cfg`

* * *

EDIT:

```auto
d-i keyboard-configuration/variant select France
d-i keyboard-configuration/xkb-keymap select fr

d-i console-keymaps-at/keymap	select fr
d-i console-setup/layout select France
d-i console-setup/charmap select UTF-8
d-i console-setup/model select Generic 105-key (Intl) PC
```

à tester et à adapter au type de clavier.

NOTE: Source: [debian.org/releases/wheezy/ … 02.html.fr](https://www.debian.org/releases/wheezy/s390/apbs02.html.fr)

```nohighlight
... Il faut savoir que le noyau Linux (version 2.6.9 et au delà) accepte un maximum de 32 options ligne de commandes et 32 variables d'environnement.
 Les options ajoutées par l'installateur sont comprises dans ces chiffres.
 S'il y a dépassement, le noyau panique.
 Les précédents noyaux acceptaient moins d'options. ...

```

---

<div class="post-metadata">

**Author:** ![cyberfrk](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/c/dbc845/32.png) [@cyberfrk](https://www.debian-fr.org/u/cyberfrk)\
**Post date:** [Février 21, 2016, 8:19 UTC](https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262/4 "2016-02-21T20:19:52Z")

</div>

Malheureusement, cela ne fonctionne toujours pas… ☹

---

<div class="post-metadata">

**Author:** ![cyberfrk](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/c/dbc845/32.png) [@cyberfrk](https://www.debian-fr.org/u/cyberfrk)\
**Post date:** [Février 21, 2016, 8:22 UTC](https://www.debian-fr.org/t/clavier-qwerty-apres-install-pxe-preseed/62262/5 "2016-02-21T20:22:39Z")

</div>

Pour celles et ceux qui seraient intéressés, voici ce qu’il faut mettre dans `preseed.cfg` pour avoir le prompt en français au reboot du client:

```nohighlight
# Locales
d-i debian-installer/fallbacklocale select fr_FR.UTF-8
d-i debian-installer/locale select fr_FR.UTF-8

# Keyboard
d-i console-keymaps-at/keymap select fr-latin9
d-i debian-installer/keymap string fr-latin9

```

Merci aux contributeurs.  
ps: Le titre du sujet peut être précédé de “résolu”.
