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
adduser | |
apparmor | |
ca-certificates | |
conntrack | |
cpio | |
curl | |
dbus | |
dbus-bin | |
dbus-daemon | |
dbus-session-bus-common |
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
waste_collection_schedule: | |
sources: | |
- name: seattle_gov | |
args: | |
street_address: "ADDRESS HERE" | |
customize: | |
- type: "Garbage" | |
icon: "mdi:delete" | |
- type: "Food/Yard Waste" | |
alias: "Compost" |
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 |
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
PI_MAC="dc-a6-32-7a-b4-02" | |
TFTP_ROOT="/mnt/rust0/tftp/" | |
# Update /boot to point to the NFS mount of the TFTP folder for the Pi. | |
NFS_IP=$(cat ${ISCSI_ROOT_DIR}/etc/iscsi/iscsi.initramfs | grep 'ISCSI_TARGET_IP=' | cut -d '=' -f 2) | |
NFS_ROOT_PATH="${TFTP_ROOT}${PI_MAC}" | |
sudo sed -i -r -E \ | |
"s@.*/boot +.*@${NFS_IP}:${NFS_ROOT_PATH} /boot nfs defaults,vers=4.1,proto=tcp 0 0@" \ | |
${ISCSI_ROOT_DIR}/etc/fstab |
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
ISCSI_ROOT_PARTITION="/dev/sdb1" | |
# Create the ext4 Filesystem | |
sudo mkfs.ext4 /${ISCSI_ROOT_PARTITION} | |
ISCSI_ROOT_DIR="$(mktemp -d)" | |
sudo mount "${ISCSI_ROOT_PARTITION}" ${ISCSI_ROOT_DIR} | |
# Mount the Root Partion in the Generated Image | |
CREATION_OUTPUT=$(sudo partx --add -v output-arm-image/image) |
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
ISCSI_DEVICE="/dev/sdb" | |
sudo parted ${ISCSI_DEVICE} mklabel gpt | |
sudo parted --align optimal ${ISCSI_DEVICE} mkpart primary ext4 0% 100% |
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
sudo iscsiadm \ | |
--mode discovery \ | |
--type sendtargets \ | |
--portal ${ISCSI_TARGET_IP} | |
sudo iscsiadm \ | |
--mode node \ | |
--targetname ${ISCSI_TARGET_IQN} \ | |
--portal ${ISCSI_TARGET_IP} \ | |
--login |
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
TFTP_ROOT="/mnt/rust0/tftp/" | |
PI_HOSTNAME=$(hostname) | |
PI_IP=$(ifconfig eth0 | awk '/inet /{ print $2;}') | |
PI_MAC=$(ifconfig eth0 | awk '/ether/{ print $2;}' | tr ':' '-') | |
PI_NETMASK=$(ifconfig eth0 | awk '/netmask/{ print $4;}') | |
ISCSI_INITIATOR_IQN=$(cat /etc/iscsi/iscsi.initramfs | grep 'ISCSI_INITIATOR=' | cut -d '=' -f 2) | |
ISCSI_TARGET_IP=$(cat /etc/iscsi/iscsi.initramfs | grep 'ISCSI_TARGET_IP=' | cut -d '=' -f 2) | |
ISCSI_TARGET_IQN=$(cat /etc/iscsi/iscsi.initramfs | grep 'ISCSI_TARGET=' | cut -d '=' -f 2) |
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
cp /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-04-16.bin pieeprom.bin | |
rpi-eeprom-config pieeprom.bin > bootconf.txt | |
# Enable pxe booting, and copy over additions. | |
sed -i -r -e 's/BOOT_ORDER.*?$/BOOT_ORDER=0x21/g' bootconf.txt | |
# Set prefix to be the mac address, like normal PXE things. | |
TFTP_IP=$(cat /etc/iscsi/iscsi.initramfs | grep 'ISCSI_TARGET_IP=' | cut -d '=' -f 2) | |
sed -i -r -e 's/TFTP_PREFIX.*?$/TFTP_PREFIX=2/g' bootconf.txt |
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
vcgencmd bootloader_config |
NewerOlder