core: 安装模式添加 tty cmdline

This commit is contained in:
bin456789
2023-08-08 23:21:28 +08:00
parent 9be306830e
commit 1f12589f47
5 changed files with 61 additions and 9 deletions

View File

@ -1,4 +1,6 @@
# shellcheck disable=SC2148,SC2154
# https://www.debian.org/releases/stable/amd64/apbs04.zh-cn.html
# B.4.1. 本地化
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
@ -66,6 +68,11 @@ d-i preseed/early_command string \
d-i partman/early_command string \
debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
d-i partman/early_command string \
confhome="$(grep -o 'extra\.confhome=[^ ]*' /proc/cmdline | cut -d= -f2)"; \
ttys=$(wget $confhome/ttys.sh -O- | sh -s console=); \
debconf-set debian-installer/add-kernel-opts "$ttys"
# debian 10 没有 /target/etc/ssh/sshd_config.d/ 文件夹
d-i preseed/late_command string \
echo "PermitRootLogin yes" >/target/etc/ssh/sshd_config.d/01-permitrootlogin.conf || \