From 7bf16e24550a440f0727371bcc15a9beb5b80fca Mon Sep 17 00:00:00 2001 From: sfajeff Date: Mon, 5 Sep 2022 23:10:20 -0500 Subject: [PATCH] Add '6.update-partition-PARTUUID.sh' --- 6.update-partition-PARTUUID.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 6.update-partition-PARTUUID.sh diff --git a/6.update-partition-PARTUUID.sh b/6.update-partition-PARTUUID.sh new file mode 100644 index 0000000..9522d1f --- /dev/null +++ b/6.update-partition-PARTUUID.sh @@ -0,0 +1,16 @@ +#!/bin/bash +NFS_IP="192.168.1.5" +NFS_ROOT_PATH="/volume1/rpi/tftpboot/3079dde4" + +# Mount the NFS Folder +NFS_DIR="$(mktemp -d)" +sudo mount ${NFS_IP}:${NFS_ROOT_PATH} ${NFS_DIR} + +# Update the PARTUUID +sudo sed -i -r -E \ + "s@(.*root=PARTUUID=)[A-Za-z0-9-]+(.*)@\1${ISCSI_ROOT_PARTUUID}\2@" \ + ${NFS_DIR}/cmdline.txt + +# Unmount the NFS Folder +#sudo umount ${NFS_DIR} +view raw \ No newline at end of file