rsync -rlpthvi --relative /a/bin/fai/ root@$host:/
rsync /a/bin/fai/ root@$host:/a/bin/fai/
-sudo scp -r /a/bin/devbyid /q/root/luks /q/root/shadow root@$host:
+sudo scp -r /a/bin/fai/devbyid /q/root/luks /q/root/shadow root@$host:
# creating shadow file string:
# on debian, you can use mkpasswd -m sha-512 to generate a pass.
# arch doesn't have this program. instead, you can do passwd,
--- /dev/null
+#!/bin/bash
+
+# input eg: /dev/sda1 or /dev/sda
+# output: /dev/disk/by-id/model+serial, or if no link exists, the same as input
+
+short_dev=$1 # i.e.
+
+# devices are identified by model+serial num,
+# and wwn. model+serial gives me more info, so use that.
+shopt -s extglob
+for id in /dev/disk/by-id/!(wwn*); do
+ [[ -e $id ]] || break # if we matched nothing
+ if [[ $(readlink -f $id) == "$short_dev" ]]; then
+ printf '%s\n' "$id"
+ exit
+ fi
+done
+# a vm may not have a by-id link.
+printf '%s\n' "$short_dev"
# these files are not exposed.
s scp -qr /q/root/luks /q/root/shadow \
root@$faiserver_host:/srv/fai/config/distro-install-common
-scp -q /a/bin/devbyid root@$faiserver_host:/srv/fai/nfsroot/usr/local/bin
+scp -q /a/bin/fai/devbyid root@$faiserver_host:/srv/fai/nfsroot/usr/local/bin
# built BELANOS basefile with mk-basefile -J BELENOS64. it's stored in
# it's own repo which is published alongside this one called