Add '6.update-partition-PARTUUID.sh'
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user