static usb ethnet addresses
[automated-distro-installer] / fai / config / hooks / partition.DEFAULT
index 9adaa76ee5babdf1603d5f963bbc085c8388e77c..11a7ee51f57839a01d04bc1436601b0c4e310d7b 100755 (executable)
@@ -180,7 +180,7 @@ bpart() { # btrfs a partition
 
 zilap() {
   case $HOSTNAME in
-    sy|bo)
+    sy|bo|so)
       return 0
       ;;
   esac
@@ -272,7 +272,7 @@ mktab() {
   dev=${boot_devs[0]}
   fstabstd="x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s"
 
-  if [[ $DISTRO == debianbullseye_bootstrap ]]; then
+  if [[ $DISTRO == *_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
@@ -692,7 +692,9 @@ fi
 
 
 if [[ ! $DISTRO ]]; then
-  if ifclass VOL_BULLSEYE_BOOTSTRAP; then
+  if ifclass VOL_BOOKWORM_BOOTSTRAP; then
+    DISTRO=debianbookworm_bootstrap
+  elif ifclass VOL_BULLSEYE_BOOTSTRAP; then
     DISTRO=debianbullseye_bootstrap
   elif ifclass VOL_STRETCH; then
     DISTRO=debianstretch
@@ -728,7 +730,7 @@ if [[ ! $DISTRO ]]; then
   fi
 fi
 
-if [[ $DISTRO == debianbullseye_bootstrap ]]; then
+if [[ $DISTRO == *_bootstrap ]]; then
   # this is just convenience for the libreboot_grub config
   # so we can glob the other ones easier.
   boot_vol=$DISTRO
@@ -883,10 +885,10 @@ if $partition; then
       # so use fixed sizes to allow both to grow
       # 600 = uefi 512 + grubext 8 + bios grub 3 + some extra cuz this is lvm
       #root_mib=$(( disk_mib - root2_part_mib - swap_mib - boot_part_mib - boot2_part_mib - 600 ))
-      o_mib=$(( 120 * 1000 ))
+      o_mib=$(( 180 * 1000 ))
       # max minus o, minus a gig just for some extra space
       max_root_mib=$(( disk_mib - root2_part_mib - swap_mib - boot_part_mib - boot2_part_mib - 600 - o_mib - 1000 ))
-      root_mib=$(( 1000 * 1000 )) # * 1000 to make it in gb.
+      root_mib=$(( 1700 * 1000 )) # * 1000 to make it in gb.
       if (( max_root_mib < root_mib )); then
         root_mib=$max_root_mib
       fi
@@ -1020,7 +1022,7 @@ else ## end if $partition ##
 fi
 
 
-if $wipe && [[ $DISTRO != debianbullseye_bootstrap ]]; then
+if $wipe && [[ $DISTRO != *_bootstrap ]]; then
   # bootstrap distro doesn't use separate encrypted root.
   mount -o subvolid=0 ${root_devs[0]} /mnt
   # systemd creates subvolumes we want to delete.