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