Neue Erkenntnisse bei Veritysetup verarbeitet.

This commit is contained in:
eichehome 2023-07-25 18:46:51 +02:00
parent f44c9a4985
commit 13f50f28b1

View file

@ -445,11 +445,23 @@ echo "veritysetup"
OUTPUT_VERITYSETUP=$(veritysetup format /dev/vda2 /dev/vda3) OUTPUT_VERITYSETUP=$(veritysetup format /dev/vda2 /dev/vda3)
ROOT_HASH=$(echo "${OUTPUT_VERITYSETUP}" | grep "Root hash" | sed 's/[[:blank:]]\+/ /g' | cut -d ' ' -f 3) ROOT_HASH=$(echo "${OUTPUT_VERITYSETUP}" | grep "Root hash" | sed 's/[[:blank:]]\+/ /g' | cut -d ' ' -f 3)
ROOTHASH_TEIL="${ROOT_HASH:0:32}"
lsblk USR_TEIL="${ROOT_HASH:0:32}"
USRHASH_TEIL="${ROOT_HASH:32:32}"
echo "Root hash: ${ROOT_HASH}"
echo "USR-Teil: ${USR_TEIL}"
echo "USRHASH-Teil: ${USRHASH_TEIL}"
sgdisk -u "${USR_PARTITION['PARTNUMBER']}":"${USR_TEIL}"
sgdisk -u "${USRHASH_PARTITION['PARTNUMBER']}":"${USRHASH_TEIL}"
#sgdisk -u "${USR_PARTITION["PARTNUMBER"]}":"${ROOTHASH_TEIL}${UUID_USRHASH_TEIL}"
sed -i "s/options.\+quiet/options usrhash=${ROOT_HASH} quiet/g" /boot/loader/entries/arch.conf
#sgdisk -u (partnum /USR):(64 char roothash)(UUID_USRHASH) #sgdisk -u (partnum /USR):(64 char roothash)(UUID_USRHASH)
#sgdisk -u (ROOT_PARTITION):(ROOT_HASH 0 - 32 char,128 bit)
#sgdisk -u (ROOT_VERITY_PARTITION):(ROOT_HASH 33 - 64 char,128 bit)
#--------------------------# #--------------------------#