Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F133738
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
View Options
diff --git a/clone.sh b/clone.sh
new file mode 100755
index 0000000..9ac5507
--- /dev/null
+++ b/clone.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+#UDP Receiver for /dev/sda
+DEST="/dev/sda"
+
+if [ -b '/dev/nvme0n1' ]; then
+ DEST='/dev/nvme0n1'
+elif [ -b '/dev/sda' ]; then
+ DEST='/dev/sda'
+else
+ exit 1
+fi
+
+curl -n ~/.netrc --silent http://nfs-netboot.engr.unr.edu/images/current.img.zst | zstd -T4 -d --stdout -q | pv -e -r -p -s 271G > ${DEST}
+sync
diff --git a/clone_base.sh b/clone_base.sh
new file mode 100755
index 0000000..300131b
--- /dev/null
+++ b/clone_base.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+DST=""
+
+while getopts ":d:" opt; do
+ case ${opt} in
+ d )
+ DST=$OPTARG
+ ;;
+ \? )
+ echo "Invalid option: $OPTARG" 1>&2
+ ;;
+ : )
+ echo "Invalid option: $OPTARG requires an argument" 1>&2
+ ;;
+ esac
+done
+
+echo ${DST}
+if [ -b "${DST}" ]; then
+ echo "Found block device: ${DST}"
+ read -p "Press any key to continue... "
+else
+ print "${DST} does not exist or is not a block device."
+ exit 1
+fi
+
+curl -n ~/.netrc \
+--silent http://nfs-netboot.engr.unr.edu/images/win10_1909.img.zst | \
+zstd --long=31 -T4 -d --stdout -q | \
+pv -e -r -p -s 128G > ${DST}
+
+sync
diff --git a/clone_base_ng.sh b/clone_base_ng.sh
new file mode 100755
index 0000000..add872b
--- /dev/null
+++ b/clone_base_ng.sh
@@ -0,0 +1,98 @@
+#!/bin/bash
+DST=""
+
+while getopts ":d:" opt; do
+ case ${opt} in
+ d )
+ DST=$OPTARG
+ ;;
+ \? )
+ echo "Invalid option: $OPTARG" 1>&2
+ ;;
+ : )
+ echo "Invalid option: $OPTARG requires an argument" 1>&2
+ ;;
+ esac
+done
+
+if [ -b "${DST}" ]; then
+ echo "Found block device: ${DST}"
+ read -p "Press any key to continue... "
+else
+ print "${DST} does not exist or is not a block device."
+ exit 1
+fi
+
+echo "${DST}" | grep "nvme"
+EXIT_CODE=$?
+PREFIX=""
+
+if [ $EXIT_CODE == "0" ]; then
+ PREFIX="p"
+fi
+
+
+curl -n ~/.netrc \
+--silent http://nfs-netboot.engr.unr.edu/images/base/parts.table | \
+sfdisk --force "${DST}"
+
+sync
+
+hdparm -z ${DST}
+
+
+echo "Partiton 1: WinRE"
+#Partition 1
+if [ -b "${DST}${PREFIX}1" ]; then
+ echo "Found partition: ${DST}${PREFIX}1"
+ curl -n ~/.netrc \
+ --silent http://nfs-netboot.engr.unr.edu/images/base/1.part | \
+ dd of="${DST}${PREFIX}1" status=progress
+else
+ print "${DST}${PREFIX}1 not found"
+ exit 1
+fi
+
+
+echo "Partiton 2: EFI"
+#Partition 2
+if [ -b "${DST}${PREFIX}2" ]; then
+ echo "Found partition: ${DST}${PREFIX}2"
+ curl -n ~/.netrc "user:ember19" \
+ --silent http://nfs-netboot.engr.unr.edu/images/base/2.part | \
+ dd of="${DST}${PREFIX}2" status=progress
+else
+ print "${DST}${PREFIX}2 not found"
+ exit 1
+fi
+
+
+echo "Partiton 3: Reserved"
+#Partition 3
+if [ -b "${DST}${PREFIX}3" ]; then
+ echo "Found partition: ${DST}${PREFIX}3"
+ curl -n ~/.netrc \
+ --silent http://nfs-netboot.engr.unr.edu/images/base/3.part | \
+ dd of="${DST}${PREFIX}3" status=progress
+else
+ print "${DST}${PREFIX}3 not found"
+ exit 1
+fi
+
+
+echo "Partiton 4: Root filesystem"
+
+#Partition 4
+if [ -b "${DST}${PREFIX}4" ]; then
+ echo "Found partition: ${DST}${PREFIX}4"
+ curl -n ~/.netrc \
+ --silent http://nfs-netboot.engr.unr.edu/images/base/4.part.zst | \
+ zstd --long=31 -T4 -d --stdout -q | \
+ ntfsclone --restore-image --overwrite "${DST}${PREFIX}4" -
+
+else
+ print "${DST}${PREFIX}4 not found"
+ exit 1
+fi
+
+exit 0
diff --git a/udp-r-sda.sh b/udp-r-sda.sh
new file mode 100755
index 0000000..28aaab4
--- /dev/null
+++ b/udp-r-sda.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#UDP Receiver for /dev/sda
+DEST="/dev/sda"
+
+if [ -b '/dev/nvme0n1' ]; then
+ DEST='/dev/nvme0n1'
+elif [ -b '/dev/sda' ]; then
+ DEST='/dev/sda'
+else
+ exit 1
+fi
+
+/usr/bin/udp-receiver --mcast-rdv-addr 224.2.2.0 \
+--nokbd \
+--interface br0 --pipe "zstd -T8 -d" | dd bs=1M of=${DEST}
+sync
diff --git a/udp-sender-sda.sh b/udp-sender-sda.sh
new file mode 100755
index 0000000..b87be81
--- /dev/null
+++ b/udp-sender-sda.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+IMAGE="/data/source.img"
+
+zstd --stdout -6 -T4 -z ${IMAGE} | udp-sender --min-wait 30 \
+--full-duplex --max-bitrate 800m --mcast-rdv-addr 224.2.2.0 \
+--mcast-data-addr 224.2.2.1 --interface br-lan
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 22, 5:59 AM (22 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14646
Default Alt Text
(4 KB)
Attached To
rNBU Netboot Utils
Event Timeline
Log In to Comment