From 859d1e792038314355e118ba688d02181ada8def Mon Sep 17 00:00:00 2001 From: Adam Parler Date: Mon, 25 Dec 2023 11:48:26 -0800 Subject: [PATCH] Created a PXE server with NetBoot --- netbootxyz_install.sh | 37 +++++++++++++++++++++++++++++++++++++ pre_setup.sh | 1 + setup_server.sh | 1 + 3 files changed, 39 insertions(+) create mode 100644 netbootxyz_install.sh diff --git a/netbootxyz_install.sh b/netbootxyz_install.sh new file mode 100644 index 0000000..d43eb0e --- /dev/null +++ b/netbootxyz_install.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +## Define admin user account +if [ -z "$ADMIN_ACCOUNT"] +then + ADMIN_ACCOUNT=root +fi +su - ${ADMIN_ACCOUNT} + +## Define bulk storage location +if [ -z "$ZFS_DIR" ] +then + ZFS_DIR=/data +fi + +echo "Installing Netboot-xyz ..." +NETBOOTXYZ_HOME=${ZFS_DIR}/netboot_xyz + +NETBOOT_EXTERN_HTTP=11080 + +sudo docker run -d \ + --name netbootxyz \ + -p 3000:3000 \ + -p 69:69/udp \ + --publish ${NETBOOT_EXTERN_HTTP}:80 \ + --env PUID=1000 \ + --env PGID=1000 \ + --env TZ=America/Los_Angeles \ + --env MENU_VERSION=1.9.9 \ + --env PORT_RANGE=30000-30010 \ + --env SUBFOLDER=/ \ + --volume ${NETBOOTXYZ_HOME}/config:/config \ + --volume ${NETBOOTXYZ_HOME}/assets:/assets \ + --restart unless-stopped \ + lscr.io/linuxserver/netbootxyz:latest + +echo "Successfully installed Netboot-xyz" \ No newline at end of file diff --git a/pre_setup.sh b/pre_setup.sh index dc0ae46..39d55ad 100644 --- a/pre_setup.sh +++ b/pre_setup.sh @@ -19,5 +19,6 @@ zfs create tank/gitlab zfs create tank/home zfs create tank/jupyter zfs create tank/mineos +zfs create tank/netbootxyz zfs create tank/nextcloud zfs create tank/plex \ No newline at end of file diff --git a/setup_server.sh b/setup_server.sh index 1826ddf..3e03306 100755 --- a/setup_server.sh +++ b/setup_server.sh @@ -60,6 +60,7 @@ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin dock ./gitlab_install.sh ./jupyterhub_install.sh ./mineos_install.sh +./netbootxyz_install.sh ./nextcloud_install.sh ./plex_install.sh