mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-04-25 07:05:56 +03:00
[GH-ISSUE #26] Self-hosting Instructions #14
Labels
No labels
Hacktoberfest
Hacktoberfest
bootloader
bsd
bug
confirmed
documentation
duplicate
enhancement
enhancement
enhancement
eol
experimental-merged
freebsd
help wanted
invalid
investigate
ipxe
linux
live-os
memdisk
menu
no-issue-activity
no-issue-activity
pull-request
released
todo
upstream
windows
windows
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/netboot.xyz#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @asmartin on GitHub (Jan 13, 2016).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/26
Would it be possible to provide instructions for how to create your own self-hosted version of http://boot.netboot.xyz (where ipxe chainloads to) for situations where you cannot access the Internet website (e.g slow connection, firewall, etc)?
@antonym commented on GitHub (Jan 14, 2016):
Really it's just a matter of grabbing the src directory, dropping it on a webserver, editing boot.cfg and it's done. I'll try and add something to the docs sooner or later.
@asmartin commented on GitHub (Jan 14, 2016):
That would be fantastic! Thanks!
@antonym commented on GitHub (Jan 14, 2016):
Just one thing to note, if you can't access the internet, you probably aren't going to have much success installing anything since it's all on the internet. :)
@asmartin commented on GitHub (Jan 14, 2016):
True, but for my use case I am just interested in self-hosting for security rather than pointing pxe at the cloud
@chris18890 commented on GitHub (Jan 14, 2016):
@antonym in addition to modifying boot.config, do you have to recompile ipxe to point at your own url?
@DavidVentura commented on GitHub (Jan 29, 2016):
"Big images" such as gparted take a very long time to load for me, debian8-text takes ~1 min. Debian graphics takes <3 min (I came back 3 min later and it was loaded). Gparted takes >10min. Is this because of latency? I have a 50mbps downlink. I could mirror the ISOs locally if the problem is the bandwidth/latency.
@antonym commented on GitHub (Jan 29, 2016):
I think it's probably more related to Sourceforge's mirrors where GParted hosts its builds. Their mirrors are typically overloaded and sluggish.
@DavidVentura commented on GitHub (Jan 30, 2016):
How do I build the ISO? I want to point to my servers to test timings locally.
Oops. I wasn't able to build it because you can't compile iPXE on arch atm. Worked fine on Debian
@asmartin commented on GitHub (Mar 26, 2016):
Any updates on this? I would really like to test out netboot.xyz, but don't want to rely on pulling down installers from online due to the possibility of mirrors being compromised (like what happened with Linux Mint)
@asmartin commented on GitHub (Aug 27, 2016):
Any updates on this?
@MayhemBill commented on GitHub (Feb 15, 2017):
Has this been updated at all? or still dead?
@asmartin commented on GitHub (Feb 15, 2017):
I am still interested in this as well
On Feb 14, 2017 7:08 PM, "BillyTheHero" notifications@github.com wrote:
@TechnologyClassroom commented on GitHub (Jul 20, 2017):
@asmartin, @TheHeroBilly, and @DavidVentura, this can be accomplished on a LAN by serving up the images that the .ipxe files point to on a local server via http, ftp, or your file server favorite method. The netboot menu could be modified to point to your server instead of the original source. After that is setup, the repos would still be coming from the original source. You could mirror repos locally and modify the images to point to your local repos. A script to set all of that up would be nice.
@MitchRatquest commented on GitHub (Sep 29, 2017):
Maybe I'm late to the party, but I've successfully done this with using buildroot on a tiny ARM computer. You can find the repo here: https://github.com/MitchRatquest/tinyNetboot
It uses Dnsmasq and python to host the files. Its a matter of tweaking the mirror locations to point to the local machine. While slow (100mbs), its powered by a USB port, and boots/serves files quicker than the target machine gets into netboot, so it works for me.
@webairnetboot commented on GitHub (Nov 2, 2017):
Self Hosted netboot.xyz - Use at your own risk!
I'm setting up an in-house netboot server, cloning the git repo to a Cent OS 6.9 server.
Hopefully someone can use this to get their own self hosted solution working.
First let's get some basic dependencies installed:
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel virtualenv gcc pyliblzma genisoimage cdw xorrisoNext install the web server of your choice and PHP7, you may not need all of the modules I've chosen to install:
yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-mcrypt.x86_64 php70w-bcmath.x86_64 php70w-fpm.x86_64 php70w-gd.x86_64 php70w-intl.x86_64 php70w-mbstring.x86_64 php70w-ldap.x86_64 php70w-opcache.x86_64 php70w-mysql.x86_64 php70w-pear.noarch php70w-soap.x86_64 php70w-tidy.x86_64 php70w-xml.x86_64 php70w-xmlrpc.x86_64 php70w-phpdbg.x86_64 php70w-process.x86_64 php70w-pspell.x86_64 php70w-recode.x86_64 php70w-snmp.x86_64Next upgrade python to latest version without breaking yum, I used the steps outlined by Daniel Eriksson with success:
https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/
I skipped the python 2.7 and went with only 3.6.3:
wget http://python.org/ftp/python/3.6.3/Python-3.6.3.tar.xztar xf Python-3.6.3.tar.xzcd Python-3.6.3./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"make && make altinstallI also opted to strip symbols from the shared library to reduce the memory footprint out of sheer geekdom:
strip /usr/local/lib/libpython3.6m.so.1.0Next, install MkDocs and its pip dependencies:
pip install mkdocsThen I git cloned the netboot.xyz source to /usr/local/src:
git clone https://github.com/antonym/netboot.xyz.gitRun the prep-release.sh script which compiles ipxe accordingly and prepares the documentation for publishing:
cd netboot.xyzscript/prep-release.shNow you're ready to create the site for the web server:
mkdocs buildOnce the build completes you should have a directory named "site" which can be copied to the DocumentRoot of your custom URL.
You may need to tweak the above accordingly for your specific environment. As stated, use at your own risk! :)
@antonym commented on GitHub (Nov 2, 2017):
Haven't forgotten about this... my main goal is to get some Ansible playbooks that you should just be able to run and have it set up everything for a local copy with your own settings. Just been trying to find some time to hack on them and get them working with basic functionality.
@dragon788 commented on GitHub (Nov 8, 2018):
I wonder if Docker or Ansible would be the less painful route.
@asmartin commented on GitHub (Nov 9, 2018):
I would advocate for ansible
On Thu, 8 Nov 2018 at 16:04, dragon788 notifications@github.com wrote:
@akiross commented on GitHub (Dec 17, 2018):
Would be nice to have this on docker with something like this: https://jpetazzo.github.io/2013/12/07/pxe-netboot-docker/
One could run the image and configure the bridge to use a specific eth card to have it up and running.
@antonym commented on GitHub (Dec 2, 2019):
For an update on this, I'm looking at switching over to Ansible for self-hosting and we should be swapping out the existing code in the repo for the Ansible templates in the coming weeks:
https://netboot.xyz/blog/2019-11-29-self-hosting-and-live-booting/
@asmartin commented on GitHub (Dec 2, 2019):
That sounds great, thanks!
On Sun, Dec 1, 2019, 9:27 PM Antony Messerli notifications@github.com
wrote:
@antonym commented on GitHub (Dec 11, 2019):
The development branch now contains the work being done with Ansible. It's still in dev but it's in a place that can be tested if anyone wants to hack around with it:
https://github.com/netbootxyz/netboot.xyz/tree/development#self-hosting-netbootxyz
@antonym commented on GitHub (Dec 25, 2019):
Docs are now up here: https://netboot.xyz/selfhosting/ and the Ansible code has made its way into netboot.xyz master.