mostly nabia and update bootstrap to buster
authorIan Kelling <iank@fsf.org>
Wed, 17 Feb 2021 22:51:07 +0000 (17:51 -0500)
committerIan Kelling <iank@fsf.org>
Wed, 17 Feb 2021 22:51:07 +0000 (17:51 -0500)
fai/config/files/etc/apt/preferences.d/nabia-focal/NABIA
fai/config/files/etc/apt/sources.list.d/focal.list/ETIONA [changed from file to symlink]
fai/config/files/etc/apt/sources.list.d/focal.list/NABIA [new symlink]
fai/config/files/etc/systemd/system/fai_check.service/VOL_BUSTER_BOOTSTRAP
fai/config/hooks/partition.DEFAULT
fai/config/package_config/STANDARD
fai/config/scripts/GRUB_PC/11-iank
wrt-setup-local

index 1e6fc34fe254d11df391c0160bed5006ae53fedb..22eb56568329f7c735ccd6e52609afaffa81389c 100644 (file)
@@ -1,3 +1,7 @@
 Package: *
 Pin: release n=focal,o=Ubuntu
 Pin-Priority: -100
+
+Package: linux-image-* linux-modules-* linux-firmware intel-microcode amd64-microcode
+Pin: release n=focal,o=Ubuntu
+Pin-Priority: 500
deleted file mode 100644 (file)
index 2f4fbcbbc12c659418a3f19aab2c037dd2a1e5e3..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,8 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu/ focal main universe
-deb http://archive.ubuntu.com/ubuntu/ focal-updates main universe
-deb http://archive.ubuntu.com/ubuntu/ focal-security main universe
-deb http://archive.ubuntu.com/ubuntu/ focal-backports main universe
-deb-src http://archive.ubuntu.com/ubuntu/ focal main universe
-deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main universe
-deb-src http://archive.ubuntu.com/ubuntu/ focal-security main universe
-deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main universe
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..25af0ff7743052ad092e8d29f7d288da30fa58d0
--- /dev/null
@@ -0,0 +1 @@
+FOCAL
\ No newline at end of file
diff --git a/fai/config/files/etc/apt/sources.list.d/focal.list/NABIA b/fai/config/files/etc/apt/sources.list.d/focal.list/NABIA
new file mode 120000 (symlink)
index 0000000..25af0ff
--- /dev/null
@@ -0,0 +1 @@
+FOCAL
\ No newline at end of file
index cbe42722c75c6fd696d0567b2b01be18cf1aea3a..61f5a1f1c7151a00f3c6c5a8b69cdb39cc8b3340 100644 (file)
@@ -1,9 +1,11 @@
 [Unit]
 Description=check whether to kexec to fai, reboot, or do nothing
+After=syslog.target network-online.target
 
 [Service]
 Type=oneshot
 ExecStart=/root/fai-check
+TimeoutStartSec=60
 
 [Install]
-WantedBy=network.target
+WantedBy=multi-user.target
index ea8d2378039860719cd3e46da40f30d19d979425..e9cce5009a04fb20311611299064982c7cd51353 100755 (executable)
@@ -74,7 +74,7 @@ skiptask partition || ! type skiptask
 
 if ! type -p devbyid; then
   for d in $FAI/distro-install-common \
-             /a/bin/fai/fai/config/distro-install-common $FAI $PWD; do
+               /a/bin/fai/fai/config/distro-install-common $FAI $PWD; do
     [[ -d $d ]] || continue
     if [[ -e $d/devbyid ]]; then
       devbyid=$d/devbyid
@@ -270,9 +270,13 @@ for dev in ${devs[@]}; do
   fi
 done
 
+even_raid=false
 if ifclass RAID0 || (( ${#boot_devs[@]} == 1 )); then
   raid_level=0
 elif ifclass RAID1 || (( ${#boot_devs[@]} <= 3 )); then
+  if (( ${#boot_devs[@]} == 2 )); then
+    even_raid=true
+  fi
   raid_level=1
 else
   raid_level=10
@@ -406,6 +410,17 @@ if $partition; then
   fi
   ### end wipefs
 
+
+  if $even_raid; then
+    for dev in ${devs[@]}; do
+      disk_mib=$(( $(parted -m $dev unit MiB print | \
+                       sed -nr "s#^/dev/[^:]+:([0-9]+).*#\1#p") - 1))
+      if [[ ! min_disk_mib ]] || (( disk_mib < min_disk_mib )); then
+        min_disk_mib=$disk_mib
+      fi
+    done
+  fi
+
   for dev in ${devs[@]}; do
     if [[ $SPECIAL_DISK ]]; then
       dev=$(devbyid $SPECIAL_DISK)
@@ -417,8 +432,12 @@ if $partition; then
     #
     # Note: parted print error output is expected. example:
     # Error: /dev/vda: unrecognised disk label
-    disk_mib=$(( $(parted -m $dev unit MiB print | \
-                     sed -nr "s#^/dev/[^:]+:([0-9]+).*#\1#p") - 1))
+    if $even_raid; then
+      disk_mib=$min_disk_mib
+    else
+      disk_mib=$(( $(parted -m $dev unit MiB print | \
+                       sed -nr "s#^/dev/[^:]+:([0-9]+).*#\1#p") - 1))
+    fi
     root_end=$(( disk_mib - swap_mib - boot_mib /  ${#boot_devs[@]} ))
     swap_end=$(( root_end + swap_mib))
 
index 02f27b35b5d1712c4174e56f52d9ff543dae1246..7d9766794a347aafebfd18f9fe1f14ce64cccfeb 100644 (file)
@@ -21,8 +21,11 @@ ncurses-term
 openssh-client
 pciutils
 perl
+# newer distros dont have python, it gets naturally removed
 python
 python-minimal
+python3
+python3-minimal
 reportbug
 telnet
 traceroute
@@ -57,6 +60,10 @@ apt-transport-https
 ifupdown
 netplan.io-
 libnss-resolve
+publicsuffix
+iso-codes
+# new package buster/nabia+
+cryptsetup-initramfs
 
 # iank, copied from DEBIAN so it goes into ubuntu too
 PACKAGES install GRUB_PC
@@ -64,3 +71,5 @@ grub-pc
 
 PACKAGES install GRUB_EFI
 grub-efi
+
+PACKAGES install NABIA FOCAL
index 525010ee730eda4b1bbb3563ea8e1f13801e5f4a..29be58e2769532b0a803da8a1be9670d2d2fedd1 100755 (executable)
@@ -104,6 +104,9 @@ if [[ $FAI_ACTION != dirinstall ]] && ! ifclass NOCRYPT; then
     speed=115200
     cmdline="rd.luks.crypttab=no net.ifnames=0 console=ttyS0,${speed}n8 console=tty0"
     case $HOSTNAME in
+      # https://wiki.archlinux.org/index.php/Solid_state_drive#Resolving_NCQ_errors
+      # evo-870 doesnt get along well with d16 with etiona
+      kd) cmdline+=" libata.force=5.00:noncq" ;;
       # per rubens suggestion to make a d16 more stable
       kd|kw) cmdline+=" pci=realloc=off" ;;
     esac
index 5e4b03896edbdd88f433a4f9efe2a6d4e2c16291..fcab6e5a265920b0c8fe159681df978b5ef2d3a3 100755 (executable)
@@ -319,6 +319,7 @@ if $client; then
   uset wireless.radio1.disabled true
 else
   # defaults, just reseting in case client config ran
+  uset wireless.default_radio0.network lan
   uset wireless.default_radio0.mode ap
   for x in 0 1; do
     uset wireless.default_radio$x.ssid "$ssid"