X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FGRUB_PC%2F11-iank;h=aaebc82a5593404759132ab4f278a2eaea3b7a5e;hb=739efea3642e2f8a7a672c4600da152a27bedf1a;hp=29be58e2769532b0a803da8a1be9670d2d2fedd1;hpb=21353fd35096ba6786c1bae3046b763bfeac5890;p=automated-distro-installer diff --git a/fai/config/scripts/GRUB_PC/11-iank b/fai/config/scripts/GRUB_PC/11-iank index 29be58e..aaebc82 100755 --- a/fai/config/scripts/GRUB_PC/11-iank +++ b/fai/config/scripts/GRUB_PC/11-iank @@ -104,9 +104,29 @@ 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" ;; + kd) + fcopy -v /usr/bin/myncq + + cat >$target/etc/systemd/system/myncq.service <<'EOF' +[Unit] +Description=fix ncq errors + +[Service] +Type=oneshot +ExecStart=/usr/bin/myncq +TimeoutStartSec=20 + +[Install] +# https://www.enricozini.org/blog/2017/debian/systemd-07-devices/ +WantedBy=dev-disk-by\x2did-ata\x2dSamsung_SSD_870_QVO_8TB_S5VUNG0N900656V.device +EOF + + 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 @@ -131,7 +151,15 @@ EOF chroot $FAI_ROOT bash </dev/null; then + update-grub2 +else + update-grub +fi + EOF fi ##### end != dirinstall && != NOCRYPT @@ -248,7 +281,6 @@ iface eth0 inet6 static address 2600:3c00:e000:280::2/64 EOF fi - fi # I prefer to stick with ifup/down for now. a. networkd is not in its @@ -262,15 +294,14 @@ EOF if ifclass VOL_BUSTER_BOOTSTRAP; then - fcopy -riM /etc/systemd/system + fcopy /etc/systemd/system/faicheck.service chroot $FAI_ROOT bash <<'EOFOUTER' -systemctl enable fai_check.service +systemctl enable faicheck.service EOFOUTER exit 0 # avoid unnecessary stuff in bootstrap vol fi - ## misc settings chroot $FAI_ROOT bash <<'EOFOUTER' #### begin .ssh setup ###