for dev in $(btrfs fi show / | sed -rn 's#^\s*devid\s.*\s([^0-9 ]+)\S+$#\1#p' \
|sort); do
- if [[ $(blockdev --getsize64 ${boot_disk}4) == 8388608 ]]; then
- # old partition scheme
+ # Decide which is my grub_ext partition. see partition.DEFAULT file
+ # for details
+ if [[ $(blockdev --getsize64 ${dev}4) == 8388608 ]]; then
+ # Old partition scheme
dev+=4
else
dev+=5
arg=libata.force=${ata}.00:noncq
if ! grep "^GRUB_CMDLINE_LINUX_DEFAULT=.*[\" ]${arg//./\\.}[\" ]" /etc/default/grub; then
- sed -ri "s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)/GRUB_CMDLINE_LINUX_DEFAULT=\"$arg \1/" /etc/default/grub
+ sed -ri "s/([\" ])libata.force=[^ ]+ */\1/g;s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)/GRUB_CMDLINE_LINUX_DEFAULT=\"$arg \1/" /etc/default/grub
if $upgrub; then
echo "$0: warning: grub updated. you may want to reboot"
if type -P update-grub2 &>/dev/null; then
# btrfs subvolume set-default \
# $(btrfs subvolume list . | grep "root_$DISTRO$" | awk '{print $2}') .
- # no cow on the root filesystem. it's setup is fully scripted,
- # if it's messed up, we will just recreated it,
- # and we can get better perf with this.
- # I can't remember exactly why, but this is preferable to mounting with
- # -o nodatacow, I think because subvolumes inherit that.
- chattr -Rf +C root_$DISTRO
+ # For raid systems, cow allows for error correction, for non-raid systems,
+ # protects root fs from having the plug pulled. Reprovisioning a root
+ # subvol is not my favorite thing to do.
+ # # no cow on the root filesystem. it's setup is fully scripted,
+ # # if it's messed up, we will just recreated it,
+ # # and we can get better perf with this.
+ # # I can't remember exactly why, but this is preferable to mounting with
+ # # -o nodatacow, I think because subvolumes inherit that.
+ # chattr -Rf +C root_$DISTRO
cd /
umount /mnt
fi
grub-efi-arm64
linux-image-arm64
-PACKAGES install GRUB_PC
-grub-pc
+# this is duplicate with STANDARD.
+#PACKAGES install GRUB_PC
+#grub-pc
-PACKAGES install GRUB_EFI
-grub-efi
+#PACKAGES install GRUB_EFI
+#grub-efi
PACKAGES install LVM
grub-pc
PACKAGES install GRUB_EFI
-grub-efi
+# normally would have just grub-efi
+# but theres a dependency problem with it in nabia: for some reason it depends on
+# a version in security, but theres a later version in updates that the system
+# really wants to install.
+grub-efi-amd64
PACKAGES install NABIA FOCAL
WantedBy=dev-disk-by\x2did-ata\x2dSamsung_SSD_870_QVO_8TB_S5VUNG0N900656V.device
EOF
- chroot $FAI_ROOT bash <<'EOFOUTER'
+ chroot $FAI_ROOT bash <<'EOFOUTER'
systemctl enable myncq.service
/usr/bin/myncq no-upgrub
EOFOUTER
- ;;
+ ;;
# per rubens suggestion to make a d16 more stable
kd|kw) cmdline+=" pci=realloc=off" ;;
esac
esac
+# bug fix, somewhere between t9's xorg 1.19.6
+# and 1.20.1-3ubuntu2
+# xserver-xorg-video-nouveau 1:1.0.15-3
+# xorg stopped load nouveau
+# https://www.linuxquestions.org/questions/slackware-14/kernel-modules-conflicting-with-nouveau-driver-4175623867/
+# https://nouveau.freedesktop.org/InstallNouveau.html
+if lspci|grep -q 'GeForce GTX 6[0-9][0-9]\]'; then
+ mkdir -p $target/etc/X11/xorg.conf.d/
+ cat >$target/etc/X11/xorg.conf.d/10-nouveau.conf <<'EOF'
+Section "Device"
+Identifier "Device0"
+Driver "nouveau"
+EndSection
+EOF
+fi
+
# use networkmanager if this host has wireless.
if type -p iw &>/dev/null && [[ $(iw dev) ]]; then
chroot $FAI_ROOT bash <<EOF
Note: there is a bug in 5.9.4, fixed by adding
sleep 2
+Note: in t9, there is a bug in recent fai packages (eg 2021+), where
+ unshare uses a too new argument. I was able to fix it by
+ just going to the site of the error and changing unshare to
+ chroot like it used to be, but I'm not bothering to make
+ any persistent fix, since I'm now on t10. If it ever came
+ up again, using an old fai package would also work.
+
/usr/sbin/fai-make-nfsroot:503, before apt-get update
linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt,reboot FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
initrd /boot/initrd.img
}
+
+menuentry "FAI server via dns, no reboot" {
+ set gfxpayload=$resolution
+ search --set=root --file /FAI-CD
+ linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp
+ initrd /boot/initrd.img
+}
+
# ro,noatime,vers=3,rsize=1048576,wsize=same,namelen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.2.0.2,nountvers=3,mountport=49179,mountproto=udp,lock_lock=all,addr=10.2.0.2
menuentry "Autodiscover the FAI server" {
search --set=root --file /FAI-CD
if [[ ! $cmd ]]; then
e "removing pxe for $host on tarantula"
ssh tarantula.office.fsf.org bash -e <<EOF
-sed -ri 's/^( *host +$host *\{).*/\1/' /etc/dhcp3/dhcpd.conf
-/etc/init.d/dhcp3-server restart
+sed -ri 's/^( *host +$host *\{).*/\1/' /etc/dhcp/dhcpd.conf
+systemctl restart isc-dhcp-server
EOF
elif [[ $cmd == fai ]]; then
e "adding pxe for $host on tarantula"
ssh tarantula.office.fsf.org bash -e <<EOF
-sed -ri 's/^( *host +$host *\{).*/\1 next-server faiserver.office.fsf.org; filename "pxelinux.0";/' /etc/dhcp3/dhcpd.conf
-/etc/init.d/dhcp3-server restart
+sed -ri 's/^( *host +$host *\{).*/\1 next-server faiserver.office.fsf.org; filename "pxelinux.0";/' /etc/dhcp/dhcpd.conf
+systemctl restart isc-dhcp-server
EOF
fi
else