From: Ian Kelling Date: Wed, 18 Aug 2021 04:26:37 +0000 (-0400) Subject: update to bullseye X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=f67d4b719356595b424aa3cd358abc79426583c5;p=automated-distro-installer update to bullseye --- diff --git a/README b/README index a1cb54d..aeb3957 100644 --- a/README +++ b/README @@ -140,9 +140,6 @@ fresize # resize swap or boot partitions in a host # Replacing a raid 10 disk -# i expect better results with newer kernel and btrfs progs than the default stretch -fai-server buster - pxe-server -S HOST fai # btrfs replace or delete. prefer replace. to setup partitions on replacement drive: diff --git a/fai-revm b/fai-revm index 0d117e6..5aa1e6c 100755 --- a/fai-revm +++ b/fai-revm @@ -122,7 +122,7 @@ else BASEFILE_DIR=/tmp fi isopath=$BASEFILE_DIR/$iso - isosrc=$BASEFILE_DIR/BUSTER64.tar.gz + isosrc=$BASEFILE_DIR/BULLSEYE64.tar.gz if [[ ! -e $isopath || $(stat -c %Y $isopath) -lt $(stat -c %Y $isosrc) ]]; then e sudo fai-cd -g $(readlink -f grub.cfg.${iso%%.*}) -f -A $isopath fi diff --git a/fai/config/class/50-host-classes b/fai/config/class/50-host-classes index f6b7caa..c62229f 100755 --- a/fai/config/class/50-host-classes +++ b/fai/config/class/50-host-classes @@ -27,12 +27,12 @@ echo FAIBASE STANDARD DEBIAN # With X suffix, means it has gone through the dirinstall process and has eXtra # things installed, to speed up installation. # -# STRETCH64, BUSTER64, BULLSEYE64, +# STRETCH64, BUSTER64, BULLSEYE64, BOOKWORM64 # FLIDAS64, FLIDAS64BIG, ETIONA64, NABIA64 # XENIAL64, BIONIC64, FOCAL64, # # The distro subvol name, we can add as many of these as we want: -# VOL_TESTING, VOL_STRETCH, VOL_BUSTER, VOL_BULLSEYE, +# VOL_TESTING, VOL_STRETCH, VOL_BUSTER, VOL_BULLSEYE, VOL_BOOKWORM # VOL_FLIDAS, VOL_ETIONA, VOL_NABIA # VOL_XENIAL, VOL_BIONIC VOL_FOCAL # VOL_BUSTER_BOOTSTRAP. @@ -43,6 +43,7 @@ echo FAIBASE STANDARD DEBIAN # STRETCH_FREE, STRETCH_NONFREE, # BUSTER_FREE, BUSTER_NONFREE, # BULLSEYE_FREE, BULLSEYE_NONFREE +# BOOKWORM_FREE, BOOKWORM_NONFREE # TESTING_FREE, TESTING_NONFREE, # XENIAL_FREE, BIONIC, FOCAL, FLIDAS, ETIONA, NABIA, STRETCH_LINODE. # @@ -86,7 +87,11 @@ echo FAIBASE STANDARD DEBIAN #!/bin/bash if [[ ! -e /a/bin/fai/fai-wrapper || $FAI_ACTION == dirinstall ]]; then case $HOSTNAME in - # buster based minimal recovery / bootstraping os: + # bookworm + _) echo BOOKWORM64 VOL_BOOKWORM_BOOTSTRAP BOOKWORM_FREE ;; + # bullseye based minimal recovery / bootstraping os: + _) echo BULLSEYE64 VOL_BULLSEYE_BOOTSTRAP BULLSEYE_FREE ;; + # buster _) echo BUSTER64 VOL_BUSTER_BOOTSTRAP BUSTER_FREE ;; # flidas _) echo UBUNTU FLIDAS64 VOL_FLIDAS FLIDAS ;; diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index b0e0700..0204ce5 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -50,7 +50,7 @@ au() { # add user. i don't use adduser for portability chpw root "$ROOTPW" # only setup root pass for bootstrap vol -if ifclass VOL_BUSTER_BOOTSTRAP; then +if ifclass VOL_BULLSEYE_BOOTSTRAP; then exit 0 fi diff --git a/fai/config/distro-install-common/libreboot_grub.cfg b/fai/config/distro-install-common/libreboot_grub.cfg index 54cf468..7af4219 100644 --- a/fai/config/distro-install-common/libreboot_grub.cfg +++ b/fai/config/distro-install-common/libreboot_grub.cfg @@ -14,7 +14,7 @@ function save_chosen { } # fai_check is so we can act like a pxe boot, but just for fai, and by -# using /buster_bootstrap to do it. We toggle on and off the grub var +# using /bullseye_bootstrap to do it. We toggle on and off the grub var # did_fai_check so we can do the check every other boot. Then # /debian_bootstrap checks for that var on boot and if we want to do a # fai check, it does it, then reboots. But fai-check also sets @@ -25,7 +25,7 @@ function save_chosen { # We don't set this to fai check so we can't get into # an infinite reboot cycle. We depend on the os to # create the initial grubenv file. -set default=/debianbuster_bootstrap # could use 0 here. +set default=/debianbullseye_bootstrap # could use 0 here. set timeout=1 # grub_extn @@ -44,7 +44,7 @@ done did_fai_check=false -bs_dir=/debianbuster_bootstrap +bs_dir=/debianbullseye_bootstrap menuentry $bs_dir --id=$bs_dir { # note, we might be able to use $chosen and avoid setting this here, # and set it inside save_chosen. but I haven't tested it, diff --git a/fai/config/files/etc/apt/sources.list.d/bulleye.list/BULLSEYE_FREE b/fai/config/files/etc/apt/sources.list.d/bullseye.list/BULLSEYE_FREE similarity index 50% rename from fai/config/files/etc/apt/sources.list.d/bulleye.list/BULLSEYE_FREE rename to fai/config/files/etc/apt/sources.list.d/bullseye.list/BULLSEYE_FREE index 04e72ca..c830a4d 100644 --- a/fai/config/files/etc/apt/sources.list.d/bulleye.list/BULLSEYE_FREE +++ b/fai/config/files/etc/apt/sources.list.d/bullseye.list/BULLSEYE_FREE @@ -1,11 +1,11 @@ -deb http://http.us.debian.org/debian bullseye main -deb-src http://http.us.debian.org/debian bullseye main +deb http://deb.debian.org/debian bullseye main +deb-src http://deb.debian.org/debian bullseye main deb http://security.debian.org/ bullseye-security main deb-src http://security.debian.org/ bullseye-security main -deb http://http.us.debian.org/debian bullseye-updates main -deb-src http://http.us.debian.org/debian bullseye-updates main +deb http://deb.debian.org/debian bullseye-updates main +deb-src http://deb.debian.org/debian bullseye-updates main deb http://http.debian.net/debian bullseye-backports main deb-src http://http.debian.net/debian bullseye-backports main diff --git a/fai/config/files/etc/apt/sources.list.d/bulleye.list/BULLSEYE_NONFREE b/fai/config/files/etc/apt/sources.list.d/bullseye.list/BULLSEYE_NONFREE similarity index 100% rename from fai/config/files/etc/apt/sources.list.d/bulleye.list/BULLSEYE_NONFREE rename to fai/config/files/etc/apt/sources.list.d/bullseye.list/BULLSEYE_NONFREE diff --git a/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP b/fai/config/files/root/fai-check/VOL_BULLSEYE_BOOTSTRAP similarity index 94% rename from fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP rename to fai/config/files/root/fai-check/VOL_BULLSEYE_BOOTSTRAP index 900c719..330efcc 100755 --- a/fai/config/files/root/fai-check/VOL_BUSTER_BOOTSTRAP +++ b/fai/config/files/root/fai-check/VOL_BULLSEYE_BOOTSTRAP @@ -70,7 +70,7 @@ for dev in $(btrfs fi show / | sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \ set +x fi first=false - # we could just as well check if last_boot != /debianbuster_boostrap + # we could just as well check if last_boot != /debianbullseye_bootstrap # the intent with this one is just a little clearer. if [[ $did_fai_check == true ]]; then grub-editenv /mnt/grubenv set did_fai_check=os_true @@ -92,7 +92,7 @@ for dev in $(btrfs fi show / | sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \ done # the check for last_boot is not needed afaik, just sanity check. -if [[ $did_fai_check == true && $last_boot != /debianbuster_boostrap ]]; then +if [[ $did_fai_check == true && $last_boot != /debianbullseye_bootstrap ]]; then # no need to reboot if we actually want to boot into this os. reboot fi diff --git a/fai/config/hooks/instsoft.DEFAULT b/fai/config/hooks/instsoft.DEFAULT index 07adc1d..2d0c905 100755 --- a/fai/config/hooks/instsoft.DEFAULT +++ b/fai/config/hooks/instsoft.DEFAULT @@ -3,7 +3,7 @@ # These are things we can do before package_config packages get installed. # exit for any vm except demohost, or if we are doing a dirinstall -if ifclass VM && ! ifclass demohost || ifclass VOL_BUSTER_BOOTSTRAP || [[ ! $FAI_ACTION || $FAI_ACTION = dirinstall ]]; then +if ifclass VM && ! ifclass demohost || ifclass VOL_BULLSEYE_BOOTSTRAP || [[ ! $FAI_ACTION || $FAI_ACTION = dirinstall ]]; then exit 0 fi diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index afbca5a..56919e9 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -386,8 +386,8 @@ esac if [[ ! $DISTRO ]]; then - if ifclass VOL_BUSTER_BOOTSTRAP; then - DISTRO=debianbuster_bootstrap + if ifclass VOL_BULLSEYE_BOOTSTRAP; then + DISTRO=debianbullseye_bootstrap elif ifclass VOL_STRETCH; then DISTRO=debianstretch elif ifclass VOL_BUSTER; then @@ -671,7 +671,7 @@ else fi -if $wipe && [[ $DISTRO != debianbuster_bootstrap ]]; then +if $wipe && [[ $DISTRO != debianbullseye_bootstrap ]]; then # bootstrap distro doesn't use separate encrypted root. mount -o subvolid=0 $first_root_crypt /mnt # systemd creates subvolumes we want to delete. @@ -711,7 +711,7 @@ btrfs subvolume set-default 0 /mnt # already default, just ensuring it. mkdir -p /mnt/grub2 cp $FAI/distro-install-common/libreboot_grub.cfg /mnt/grub2 -if [[ $DISTRO == debianbuster_bootstrap ]]; then +if [[ $DISTRO == debianbullseye_bootstrap ]]; then # this is just convenience for the libreboot_grub config # so we can glob the other ones easier. boot_vol=$DISTRO @@ -735,7 +735,7 @@ grub-editenv /mnt/grubenv set last_boot=/$boot_vol umount /mnt fstabstd=x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s -if [[ $DISTRO == debianbuster_bootstrap ]]; then +if [[ $DISTRO == debianbullseye_bootstrap ]]; then cat > /tmp/fai/fstab <>/etc/fai/apt/sources.list <