Packer:使用非美式键盘布局创建 vmware box

Packer: Creating a vmware box with with non-US keyboard layout

我完成了 packer / atlas tutorial 并且一切正常,也就是说,我设法通过 packer build template.json 构建了一个 vmware box。

我觉得所有的东西都是英文的(例如菜单、帮助文件……)但是 我需要使用非美国布局(德语)的键盘。

我尝试在 preseed.cfg 中设置键盘布局,该文件是教程 git 存储库的一部分,并尝试了我在 [=18] 中找到的 d-i 命令=].虽然设置被忽略了。键盘布局仍然是美国。教程 git 存储库中原始 preseed.cfg 的相关行是:

d-i debian-installer/locale string en_US.utf8
d-i console-setup/ask_detect boolean false
d-i console-setup/layout string USA

template.json 中摆弄引导命令也不成功(仍然是美国布局或安装没有再进行)。原始 template.json 文件的相关摘录是

"type": "vmware-iso",
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{ .Name }} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- <enter>"
]

有人能告诉我如何配置加壳器吗?从 packer / atlas tutorial 的简单示例开始,以便构建的 vagrant box 的键盘布局设置为德语?

我最终用这个 boot_command:

"boot_command": [
                "<esc><esc><enter><wait>",
                "/install/vmlinuz noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/my_preseed.cfg ",
                "debian-installer/locale=en_US keyboard-configuration/layoutcode=de ",
                "hostname={{ .Name }} ",
                "fb=false debconf/frontend=noninteractive ",
                "console-setup/ask_detect=false ",
                "initrd=/install/initrd.gz -- keyboard-configuration/layout=de <enter>"
            ],

以及 pressed.cfg

中的这些行
# File starts here
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string de

#d-i netcfg/get_hostname string dummy
...

但是,我不知道为什么这行得通而另一个配置却不行。有人知道吗?

我还在 "Unix & Linux" 问了 question 关于 configuration/layoutcodekeyboard-configuration/layout 的(区别)。