Please don't use sedutil-cli --scan in linuxpba-arch, it's problematic (it doesn't print all drives for some reason, even supported ones, which can be a not so pleasant surprise for someone booting): https://github.com/Drive-Trust-Alliance/sedutil/issues/520
Instead, you can use any method of listing possible block devices (even something as crude as for glob in 'sd[a-z]' 'nvme[0-9]n[0-9]' 'nvme[0-9][0-9]n[0-9][0-9]' ; do find /dev/ -name "$glob" done) and then check with: sedutil-cli --isValidSED $DRIVE >/dev/null 2>&1 and check if status is 0.
In that same file, NR==2 and NR==6 hardcoded to awk seem to be wrong for me (it's 1 and 5 for me), consider using this line instead (that's still not perfect for the latter line in case they shift the order/amount of variables printed, but still an improvement):
sedutil-cli --query $DRIVE | awk '/^\/dev\// {name=$3; serial=$5} /^ *Locked =/ {gsub(",","",$0);lock=$3; mbr=$12} END {print name,serial,lock,mbr}'
Further improvement would be listing the locking ranges instead of assuming that only range 0 exists and is enabled (wiki mentions setting up range 1 and 2 for root partition and ESP/boot respectively for encrypting the boot drive). Do I assume currently that the current mkinitcpio is for decrypting non-root drives? Or does it assume that the initramfs is on a separate just-for-booting drive alternatively?
Pinned Comments
R00KIE commented on 2016-08-27 21:39 (UTC)