Skip to content

Instantly share code, notes, and snippets.

@gh0st
Last active February 4, 2021 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gh0st/c4e3d0bcfc622adfec3062654cc73fcf to your computer and use it in GitHub Desktop.
Save gh0st/c4e3d0bcfc622adfec3062654cc73fcf to your computer and use it in GitHub Desktop.
A write up on how to get your pi working as a pxe server. (Note, I haven't actually been able to image a windows machine with this.)

Set up a pi to run as a pxe server

First we need to burn a SD card using Raspian Stretch Lite.

# After the image has been burned, enable ssh.
touch /Volumes/boot/ssh

Put the sd card in the pi, find the ip address of the pi, and remote into the pi with the default username and password.

# Once on the pi, do an update and upgrade
sudo apt-get update
sudo apt-get upgrade
# Install git
sudo apt-get install git
# Clone the pxe repo
git clone ~/https://github.com/gh0st/RPi-PXE-Server-1.git
# Assuming a thumb drive has been plugged in with the same folder structure as described in the above git repo mount the drive,
# and add the drive to fstab
# Before mounting an exfat disk, make sure to get the utils
sudo apt-get install exfat-fuse exfat-utils
# Get the UUID of the drive first
ls -la /dev/disk/by-uuid
mkdir -p /media/images
# Set pi as owner
sudo chown -R pi:pi /media/images
# Mount the drive
sudo mount /dev/sda1 /media/images -o uid=pi,gid=pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment