使用 preseed 在 debian wheezy 中設定鍵盤佈局

使用 preseed 在 debian wheezy 中設定鍵盤佈局

我想自動安裝 debian。我已經複製了範例預置文件進入 initrd,並驗證它包含

d-i keymap select us

在安裝系統中,/var/log/syslog包含一行

successfully loaded preseed file from file:///preseed.cfg

但我仍然看到該Configure the Keyboard對話框。如何在沒有使用者互動的情況下讓安裝選擇鍵盤佈局?

答案1

範例預置檔案是錯誤的。您需要設定以下選項:

d-i keyboard-configuration/xkb-keymap select us

答案2

這是我的 Ubuntu xenial 配置;多麼痛苦。我找到了這個在這裡,感謝這位 GitHub 用戶

# Keyboard selection.
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/variantcode string

答案3

對於 Debian 11.6.0,設定keyboard-configuration/xkb-keymap似乎不夠。使用網路安裝程序,在下載軟體包後,我仍然被要求提供鍵盤佈局。它也可以透過設定來keyboard-configuration/variant修復解決方法:

d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/variant select Deutschland
d-i keyboard-configuration/xkb-keymap select de

什麼不起作用

我還透過設定佈局代碼或變體代碼等屬性嘗試了一些具有不同變體的組合(每個段落都是一次嘗試),但它們都不起作用:

d-i keyboard-configuration/xkb-keymap select de

d-i keyboard-configuration/xkb-keymap select German

d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/layoutcode string de

d-i keyboard-configuration/xkb-keymap select de
d-i keyboard-configuration/layoutcode string de
d-i keyboard-configuration/variantcode string

此外,還為所有這些組合設定了以下內容:

d-i console-setup/ask_detect boolean false
d-i debian-installer/locale string de_DE

看來並console-setup/ask_detect沒有什麼效果。這僅供參考,如果有人想嘗試的話。至少對於 Debian 11.6.0 netinstall,它們不起作用。

答案4

我跟你有同樣的問題。除了鍵盤之外,我已經預置了所有內容,這樣在安裝過程中就不會提示任何內容。您的問題是,您實際上需要將鍵盤配置新增至功能表檔案的附加行(可能會命名為 main,具體取決於您正在執行的操作)。您的鍵盤映射設定也是正確的。在 debian 中,鍵盤映射是 Keyboard-configuration/xkb-keymap 的別名。

相關內容