
私の preseed はほぼ期待通りに動作していますが、何らかの理由で、これら 2 つのリポジトリを source.list ファイルに追加できません。常にコメント アウトされているため、検証できません。
これらを late_command スクリプトに入れることもできることはわかっていますが、cfg ファイルに入れたいと思っています。
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string http://xxx.xxx.xxx.xxx:xxxxx
## Setup GITLAB-MULTI-CI-RUNNER
d-i apt-setup/local0/repository string deb https://packages.gitlab.com/runner/gitlab-ci-multi-runner/debian/ stretch main
d-i apt-setup/local0/source boolean true
d-i apt-setup/local0/key string https://packages.gitlab.com/runner/gitlab-runner/gpgkey
## Setup DOCKER
d-i apt-setup/local1/repository string deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
d-i apt-setup/local1/source boolean false
d-i apt-setup/local1/key string https://download.docker.com/linux/debian/gpg
d-i debian-installer/allow_unauthenticated boolean true
d-i
何か見落としている行があるのでしょうか、それともその方法では単純に不可能なのでしょうか?
答え1
少なくともdockerリポジトリでは、まったく同じ問題に遭遇したようです。これは、httpsの代わりにhttpapt-transport-https
トランスポートとして使用します。 またはのいずれか (または両方) がデフォルトでインストールされていないため、preseed インストーラーはリポジトリの検証に失敗しca-certificates
、 内のそれらの行をコメント アウトします/etc/apt/sources.list
。
late_command
私の場合は、必要なパッケージをインストールし、インストール後にリポジトリを有効にすることで問題を解決できました。
d-i pkgsel/include string ca-certificates apt-transport-https
そして
d-i preseed/late_command string in-target sed -i 's/^#deb https:/deb https:/g' /etc/apt/sources.list
これは一種のハックであるという点には同意しますが、これが私が思いついた最善の策です。