Giter Club home page Giter Club logo

pi-pxeboot's Introduction

pi-pxeboot

Raspberry Pi PXE boot configuation for both client and server.

PXE Boot without Docker

Client:

bash client/setupClient.sh
sudo reboot

Server:

bash server/setupServer.sh
sudo reboot

Install Docker

Install

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker pi

Install docker-compose

sudo apt-get install libffi-dev libssl-dev
sudo apt-get install -y python3 python3-pip
sudo apt-get remove python-configparser
sudo pip3 install docker-compose

Create a docker base image for Raspberry Pi Lite OS

Setting up the docker base container (base on raspberry pi lite os):

apt-get install -y wget unzip git
wget -O ospilite.zip https://downloads.raspberrypi.org/raspios_lite_armhf_latest
sudo mkdir $HOME/ospilite/

sudo unzip ospilite.zip -d $HOME/ospilite/
LOOPDIR=$(sudo losetup --show -fP $HOME/ospilite/2020-08-20-raspios-buster-armhf-lite.img)

sudo mkdir -p /mnt/rootfs
sudo mkdir -p /mnt/boot

sudo mount ${LOOPDIR}p1 /mnt/boot
sudo mount ${LOOPDIR}p2 /mnt/rootfs

sudo tar -C /mnt/rootfs -czpf ospilite.tar.gz --numeric-owner .
sudo tar -C /mnt/boot -czpf boot.tar.gz --numeric-owner .

sudo docker build -t iperezx/ospilite:latest -f Dockerfile.ospilite .
sudo docker run -it iperezx/ospilite:latest bash

Note that ${LOOPDIR}p1 is the boot config files and ${LOOPDIR}p2 is the root filesystem. This was tested on both a Raspberry PI 4b 4GB and NVIDIA NX Board.

Docker containers for pxe boot setup

Create custom nfs server:

cd $HOME
git clone https://github.com/iperezx/nfs-server-alpine.git
cd nfs-server-alpine
sudo docker build -t iperezx/nfs:latest .

Create docker containers:

docker-compose up -d --build

Cleanup:

docker-compose down && docker volume rm docker_nfs-data

pi-pxeboot's People

Contributors

iperezx avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.