Last active
May 30, 2020 18:27
-
-
Save sdwilsh/c7368bf4149547f37e17baa33a86e2c3 to your computer and use it in GitHub Desktop.
Updating TFTP Root Partion's PARTUUID for Network Booting a Pi 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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