# 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:
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
# 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.
# 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.
#
#!/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 ;;
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
}
# 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
# 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
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,
-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
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
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
# 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
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
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.
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
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 <<EOF
$first_boot_dev / btrfs noatime,subvol=$boot_vol 0 0
$first_efi /boot/efi vfat nofail,$fstabstd 0 0
-# otherwise sshd takes like 10 seconds to start
-PACKAGES install BUSTER
+# otherwise sshd takes like 10 seconds to start.
+# not sure if this applies to bullseye or just buster, installing it so i dun have to worry.
+PACKAGES install BUSTER BULLSEYE
haveged
PACKAGES install NONFREE
##### end network setup #####
-if ifclass VOL_BUSTER_BOOTSTRAP; then
+if ifclass VOL_BULLSEYE_BOOTSTRAP; then
fcopy /etc/systemd/system/faicheck.service
chroot $FAI_ROOT bash <<'EOFOUTER'
systemctl enable faicheck.service
work. Separate from running this, faiserver needs to be setup in dns to
point to whatever host this is run on.
-Default BASE_CODENAME is buster. Default ARCH is 64. The script expects corresponding
+Default BASE_CODENAME is bullseye. Default ARCH is 64. The script expects corresponding
$BASEFILE_DIR/${UPCASED_BASE_CODENAME}${ARCH}.tar.(gz|xz) to exist, and it must have been
generated around the same time as the nfsroot, at least so it has the
same kernel version.
e() { echo "+ $@"; "$@"; }
-base=${1:-buster}
+base=${1:-bullseye}
arch=${2:-64}
if [[ $base == [[:upper:]] ]]; then
update=false
case $base in
- stretch|buster|bullseye)
+ stretch|bullseye|bullseye)
if ! grep -qFx "deb https://fai-project.org/download $base koeln" /etc/apt/sources.list.d/fai.list; then
update=true
fi
### begin setup security repo ###
case $base in
- stretch|buster)
+ stretch|buster|bullseye)
cat >>/etc/fai/apt/sources.list <<EOF
deb http://security.debian.org/debian-security $base/updates main contrib
EOF
Args I've used before:
+-z BULLSEYE64
-z BUSTER64
-z STRETCH64
-z XENIAL64