Skip to content

Instantly share code, notes, and snippets.

@sdwilsh
Last active May 30, 2020 18:27
Show Gist options
  • Save sdwilsh/c7368bf4149547f37e17baa33a86e2c3 to your computer and use it in GitHub Desktop.
Save sdwilsh/c7368bf4149547f37e17baa33a86e2c3 to your computer and use it in GitHub Desktop.
Updating TFTP Root Partion's PARTUUID for Network Booting a Pi 4
# 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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment