Custom debian-netinstall iso


Iso с включенной ssh консолью и стандартными ответами на стандартные вопросы.

Ставим нужный софт
apt install xorriso genisoimage syslinux-utils
Создаем временный каталог
mktemp -d
Отобразится название каталога,например /tmp/tmp.Zi1npQsniK
Разворачиваем iso
xorriso -osirrox on -indev ./debian-11.3.0-amd64-netinst.iso -extract / /tmp/tmp.Zi1npQsniK
Права
chmod -R +w /tmp/tmp.Zi1npQsniK
Правим /tmp/tmp.QPi0Abdfdr/isolinux/txt.cfg
в начало строки append добавляем (после слова append)
auto=true priority=high file=/cdrom/preseed.cfg

в /tmp/tmp.QPi0Abdfdr/isolinux/isolinux.cfg
timeout 3
default vesamenu.c32 меняем на default install

в /tmp/tmp.QPi0Abdfdr/isolinux/menu.cfg
удаляем строку include gtk.cfg
Получится так
menu title ^GDebian GNU/Linux installer menu (BIOS mode)
include stdmenu.cfg
include txt.cfg
menu begin advanced

/tmp/tmp.QPi0Abdfdr/preseed.cfg
d-i debian-installer/locale string en_US
d-i localechooser/supported-locales multiselect en_US.UTF-8, ru_RU.UTF-8
d-i keyboard-configuration/xkb-keymap select us
d-i time/zone string Europe/Sofia

d-i anna/choose_modules string network-console
d-i network-console/password password megapass
d-i network-console/password-again password megapass
d-i passwd/make-user boolean false

tasksel tasksel/first multiselect standard, ssh-server

popularity-contest popularity-contest/participate boolean false

заворачиваем обратно
genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o pre-debian-11.3.0-amd64-netinst.iso /tmp/tmp.QPi0Abdfdr
isohybrid ./pre-debian-11.3.0-amd64-netinst.iso

Грузиться по идее будет только в legacy bios,не проверял.

Ссыль раз https://wiki.debian.org/ManipulatingISOs#remaster
Ссыль два https://www.debian.org/releases/bullseye/amd64/apbs04.en.html