debian: 虚拟机使用 cloud 内核

This commit is contained in:
bin456789
2023-08-27 23:52:06 +08:00
parent 8a7aa18a81
commit 5c5b2ae81c
2 changed files with 12 additions and 4 deletions

View File

@ -69,12 +69,14 @@ d-i preseed/early_command string \
debconf-set mirror/http/hostname $hostname
d-i partman/early_command string \
debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
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"
debconf-set debian-installer/add-kernel-opts "$ttys"; \
kernel="$(grep -o 'extra\.kernel=[^ ]*' /proc/cmdline | cut -d= -f2)"; \
debconf-set base-installer/kernel/image "$kernel"
# debian 10 没有 /target/etc/ssh/sshd_config.d/ 文件夹
d-i preseed/late_command string \