From fb4603788d40c4c6070090666d40a6d50afd678e Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Sun, 25 Jul 2021 11:41:33 +0000 Subject: [PATCH] Daily d-i support --- README.md | 4 +++- debi.sh | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d740aa4..5d4e448 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,9 @@ Otherwise, you can run this command to revert all changes made by the script: * `--dns '8.8.8.8 8.8.4.4'` (Default IPv6 DNS: `2001:4860:4860::8888 2001:4860:4860::8844`) * `--hostname ` FQDN hostname (includes the domain name), e.g. `server1.example.com` * `--network-console` Enable the network console of the installer. `ssh installer@ip` to connect - * `--suite buster` + * `--suite buster` Choose the version to install: `buster` or `stable` for 10, `bullseye` or `testing` for 11, `stretch` or `oldstable` for 9, `sid` or `unstable` + * `--release-d-i` d-i (Debian Installer) for the released versions: 10 (buster) and 9 (stretch) + * `--daily-d-i` Use latest daily build of d-i (Debian Installer) for the unreleased versions: 11 (bullseye) and sid (unstable) * `--mirror-protocol http` or `https` or `ftp` * `--https` alias to `--mirror-protocol https` * `--mirror-host deb.debian.org` diff --git a/debi.sh b/debi.sh index c0a40b1..ed518d6 100755 --- a/debi.sh +++ b/debi.sh @@ -81,6 +81,7 @@ dns='8.8.8.8 8.8.4.4' hostname= network_console=false suite=buster +daily_d_i=false mirror_protocol=http mirror_host=deb.debian.org mirror_directory=/debian @@ -153,8 +154,19 @@ while [ $# -gt 0 ]; do ;; --suite) suite=$2 + [ "$2" = 'bullseye' ] || + [ "$2" = 'testing' ] || + [ "$2" = 'sid' ] || + [ "$2" = 'unstable' ] && + daily_d_i=true shift ;; + --release-d-i) + daily_d_i=false + ;; + --daily-d-i) + daily_d_i=true + ;; --mirror-protocol) mirror_protocol=$2 shift @@ -416,7 +428,6 @@ d-i mirror/$mirror_protocol/hostname string $mirror_host d-i mirror/$mirror_protocol/directory string $mirror_directory d-i mirror/$mirror_protocol/proxy string d-i mirror/suite string $suite -d-i mirror/udeb/suite string $suite EOF [ "$account_setup" = true ] && { @@ -615,6 +626,7 @@ EOF save_grub_cfg='cat' [ "$dry_run" = false ] && { base_url="$mirror_protocol://$mirror_host$mirror_directory/dists/$suite/main/installer-$architecture/current/images/netboot/debian-installer/$architecture" + [ "$daily_d_i" = true ] && base_url="https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-installer/$architecture" firmware_url="https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/$suite/current/firmware.cpio.gz" download "$base_url/linux" linux