diff --git a/1.initramfs-and-tftp-setup.sh b/1.initramfs-and-tftp-setup.sh index 87c30e5..073898f 100644 --- a/1.initramfs-and-tftp-setup.sh +++ b/1.initramfs-and-tftp-setup.sh @@ -1,9 +1,9 @@ #!/bin/bash TFTP_ROOT="/volume1/rpi/tftpboot/" ISCSI_TARGET_IP="192.168.1.5" -ISCSI_TARGET_IQN="iqn.2000-01.com.synology:SynologyNAS.default-target.b63ef49539c" -ISCSI_INITIATOR_IQN="iqn.1993-08.org.debian:01:ab91dbfb8224" -PI_SERIAL="3079dde4" +ISCSI_TARGET_IQN="iqn.2000-01.com.synology:SynologyNAS.Target-11.b63ef49539c" +ISCSI_INITIATOR_IQN="iqn.1993-08.org.debian:01:9174e3877a3" +PI_SERIAL="6218cd17" PI_HOSTNAME=$(hostname) PI_IP=$(ifconfig eth0 | awk '/inet /{ print $2;}') @@ -28,8 +28,8 @@ update-initramfs -v -k "$(uname -r)" -c -b /nfs/$(hostname -s)-boot # https://git.kernel.org/pub/scm/libs/klibc/klibc.git/tree/usr/kinit/ipconfig/README.ipconfig # However, don't put anything after static in the line below, because it completely breaks # everything in a very non-obvious way. -touch /nfs/$(hostname -s)-boot/cmdline.txt -touch /nfs/$(hostname -s)-boot/config.txt +cp cmdline.txt /nfs/$(hostname -s)-boot/cmdline.txt +cp config.txt /nfs/$(hostname -s)-boot/config.txt sed -i -r -e \ "s/$/ ip=${PI_IP}:::${PI_NETMASK}:${PI_HOSTNAME}:eth0:static ISCSI_INITIATOR=${ISCSI_INITIATOR_IQN} ISCSI_TARGET_NAME=${ISCSI_TARGET_IQN} ISCSI_TARGET_IP=${ISCSI_TARGET_IP} rw/g" \ /nfs/$(hostname -s)-boot/cmdline.txt @@ -39,4 +39,4 @@ sed -i -r -e \ "s@\[pi4\]@[pi4]\ninitramfs initrd.img-$(uname -r) followkernel@" \ /nfs/$(hostname -s)-boot/config.txt -umount /nfs/$(hostname -s)-boot \ No newline at end of file +#umount /nfs/$(hostname -s)-boot \ No newline at end of file