Giter Club home page Giter Club logo

pxesetupwizard's Introduction

PXE SW

Gitter

NetBoot installers and Live OSs over TFTP. This project is a wizard, collection of install scripts, patches, ... to setup a PXE server with most popular GNU/Linux distros.

Dockerized

  • Clone this repository.
git clone https://github.com/piffall/pxe-sw
  • Build image and setup, this could take several time
make all

After this point, the container is ready. You only need to start/stop when you need.

docker start pxe-sw
docker stop pxe-sw

Systemd (to start up on boot)

#### Enable as service

make install # Systemd only

Hosted

Requirements

  • Debian based OS (Debian,Ubuntu,Mint,...)
  • Some packages: wget, sudo, unzip, tar, ...

Install

  • Install dependencies
sudo apt-get -y install git tftpd-hpa unzip wget curl p7zip-full xzip xz-utils cpio
  • Clone this repository, I recomend you clone into your home path.
git clone https://github.com/piffall/pxe-sw /path/to/pxe-sw
  • Setup (required step)

This will ask for IP address to listen to, and if you want to setup all OS. If you are only interested in one of them, answer "n" to this question.

./setup.sh
  • Specific OS setup

If you only want to setup one OS, for example, Debian, find corresponding setup script and run it, after that, you shuold run fix-vesamenu.sh.

./scripts/exec/debian-stable-amd64.sh
./fix_vesamenu.sh
  • Create a symlink

If you /srv/tftp already exists, this will cause an error, please backup and remove /srv/tftp before symlink.

sudo ln -s /path/to/pxe/ /srv/tftp

Configure and install TFTP server

  • Install tftpd-hpa
sudo apt-get install tftpd-hpa
  • Edit the configuration file "/etc/default/tftpd-hpa"
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--verbose"
#TFTP_OPTIONS="--secure"

Note that "--secure" option line is commented

Configure DHCP Server

Configure with OpenWRT dhcp server

  • Edit the DHCP configuration file "/etc/config/dhcp" to add a dhcp_boot option
config dnsmasq
  option domainneeded '1'
  option boguspriv '1'
  option localise_queries '1'
  ...
  option dhcp_boot '/srv/tftp/pxelinux.0,pxe-hostname,192.168.1.254' # Change host and IP address.
  • Restart your device

Configure with DHCP3 Server

  • Add an option to the network configuration
subnet 192.168.1.0 netmask 255.255.255.0 {
	range 192.168.1.200 192.168.1.253;
	option domain-name "lan";
	default-lease-time 1800;
	max-lease-time 7200;
	next-server "192.168.1.254";                     # The TFTP IP address
	option bootfile-name "/srv/tftp/pxelinux.0";     # The PXE file
}

OS and Tools

Popular GNU/Linux Distributions

More GNU/Linux Distributions

Recovery

Diagnostic and detection

Other OS

Boot Loaders

Other Tools

License

All files are under GNU General Public License v3

Donations (BTC)

Please consider support the project donating to the Bitcoin address below:

17q6RT31yEJAptrUzXhwEq5iPwEguEFFBG

pxesetupwizard's People

Contributors

abousselmi avatar piffall avatar vtomasr5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxesetupwizard's Issues

ArchLinux broken

wget https://releng.archlinux.org/pxeboot/ipxe.lkrn -O /tmp/f32ab9f4b92b25d9d333afbc874c1af8/archlinux.lkrn
--2017-01-22 19:48:06--  https://releng.archlinux.org/pxeboot/ipxe.lkrn
Resolving releng.archlinux.org (releng.archlinux.org)... failed: Name or service not known.

Update System Rescue CD

Update System Rescue CD version and check if the patch keeps working, or is not necessary in this version.

Issue Deploying Docker on RaspberryPi Rasbian Host

Hello! I am excited about this project and am interested in trying it. Unfortunately I ran into some issues deploying it into my Raspberry Pi. I was deploying with Docker and it looks like it got 9/9 steps through setup and then failed.

Do you have any pointers for troubleshooting?

[...]
[snip]
pi@raspberrypi:~/pxe-sw $ make all
[snip]
[...]
 ---> 166dd3af514a
Step 8/9 : CMD ["start"]
 ---> Running in 5ce9c7e8c0ee
Removing intermediate container 5ce9c7e8c0ee
 ---> cc1978297b61
Step 9/9 : EXPOSE 69/udp
 ---> Running in 4ddac295aa5e
Removing intermediate container 4ddac295aa5e
 ---> 637d4053b782
Successfully built 637d4053b782
Successfully tagged piffall/pxe-sw:latest
WARNING: Published ports are discarded when using host network mode
bba6cc91ff3c5d97f31f00c6fa28c6bc9851100bcac3c2a9608ed4cba4072058
pxe-sw
cannot exec in a stopped state: unknown
Makefile:16: recipe for target 'setup' failed
make: *** [setup] Error 126
pi@raspberrypi:~/pxe-sw $```

works well!

Hi,

After having failed to install Debian from a bootable USB stick, I started looking at network installations. Not knowing literally anything about it, I stumbled on this project.

I was not able to get the Docker image working, since that's another layer of something-I-don't-understand. I happened to have another Linux machine handy, and ran a manual installation.

I didn't understand that I needed to actually go download a tarball and extract it into /srv/tftp. If this was unintended, there may be a bug. I understand syslinux is a bootloader, but I don't know why it was installed. My client machine reported a PXE error (which I failed to capture) and quit after encountering the default configuration.

Once I had extracted the tarball, things worked properly. This tarball also wanted to overwrite pxelinux.cfg/, which I had to remove manually. I believe it was complaining because pxelinux.cfg/ was a symlink.

A couple suggestions to make things go more smoothly:

  1. Change the prompt of "Install scripts?" to be more descriptive about what's actually happening. I answered "Yes", but didn't use the downloaded files (to my knowledge).
  2. Add mention that a user may need to curl -O uri://netboot.tar.gz into /srv/tftp in README.md or script prompts.

Of course, you're not in the business of teaching PXE basics to noobs. 😄

Anyway, thanks again. I probably couldn't have gotten this working without your effort.

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.