Update '5.update-fstab.sh'

This commit is contained in:
2022-09-07 15:25:29 -05:00
parent 2ccabf911b
commit 90c1548769
+7 -6
View File
@@ -1,15 +1,16 @@
#!/bin/bash
PI_SERIAL="3079dde4"
NFS_IP="192.168.1.5"
#NFS_ROOT_PATH="/nfs/$(hostname -s)-boot"
PI_SERIAL="6218cd17"
TFTP_ROOT="/volume1/rpi/tftpboot/"
ISCSI_ROOT_PARTITION="/dev/sda1"
ISCSI_ROOT_DIR="/tmp/tmp.8feKTYMg0S"
ISCSI_TARGET_IQN="iqn.2000-01.com.synology:SynologyNAS.default-target.b63ef49539c"
ISCSI_ROOT_DIR="/iscsi/$(hostname -s)-iscsi"
ISCSI_TARGET_IQN="iqn.2000-01.com.synology:SynologyNAS.Target-11.b63ef49539c"
# Update /boot to point to the NFS mount of the TFTP folder for the Pi.
NFS_IP="192.168.1.5"
NFS_ROOT_PATH="${TFTP_ROOT}${PI_MAC}"
NFS_ROOT_PATH="${TFTP_ROOT}${PI_SERIAL}"
sudo sed -i -r -E \
"s@.*/boot +.*@${NFS_IP}:${NFS_ROOT_PATH} /boot nfs defaults,vers=4.1,proto=tcp 0 0@" \
"s@.*/boot +.*@${NFS_IP}:${NFS_ROOT_PATH} /boot nfs defaults,proto=tcp 0 0@" \
${ISCSI_ROOT_DIR}/etc/fstab
# Update / to point to the iSCSI drive.