Git Product home page Git Product logo

gentoo-pxe-builder's Introduction

gentoo-pxe-builder

Purpose

The purpose of this PXE builder is to let you boot a machine from PXE and then automatically set it up so you can access it remotely using SSH.

Booting this PXE initramfs will display informations about the network interfaces available on the PXE host so that you don't need to type any sort of command to connect to it.

What it does for you

This automation script prepares a Gentoo kernel and initramfs suitable to boot from PXE:

  • It bases itself from the latest minimal ISO available
  • It will setup a root password and start the SSH daemon

It lets you take control of the PXE host easily:

  • You can change the files/setup.start script to adjust your needs at boot and rebuild the whole PXE stack by simply re-runing the build.sh script
  • Your SSH public key will already be present on the machine so you can connect without password to your PXE host

What will happen when I boot ?

  • At first this will start your machine just like a simple livecd
  • Then it will start waiting for connectivity and display the current IP of your network cards
  • As soon as one gets an IP address, it will setup the root password and start the SSH daemon
  • Finally, it will discover and display for you the real name of the network interfaces detected on the host based on udev deterministic naming

Usage

  • Modify the files/setup.start to match any specific need other than those already prepared for you
  • Then just execute the build.sh script and enjoy.

Prerequisites

  • The cpio command from app-arch/cpio
  • The gpg command from app-crypt/gnupg
  • The xz command from app-arch/xz-utils
  • The isoinfo command from app-cdr/cdrtools
  • You must have imported the 'Gentoo Linux Release Engineering (Automated Weekly Release Key)' GPG public key in your keyring gpg --locate-key [email protected]

Environment variables and defaults

The default SSH root password is gentoo-root. This is the list of accepted environment variables:

  • ARCH : amd64
  • MIRROR : http://distfiles.gentoo.org
  • SSH_KEY_PATH : ~/.ssh/id_rsa.pub

PXE server basic setup

Setting up a PXE server is quite easy, just remember a few things:

  • Suppose we want our PXE root to be located in /pxe/
  • Install sys-boot/syslinux as it contains the necessary files:
# cp /usr/share/syslinux/ldlinux.c32 /pxe/
# cp /usr/share/syslinux/pxelinux.0 /pxe/
  • Create the /pxe/pxelinux.cfg/ directory
  • Create the default PXE boot file /pxe/pxelinux.cfg/default:
default Gentoo

label Gentoo
kernel /gentoo_pxe/gentoo
append initrd=/gentoo_pxe/gentoo.igz root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot

gentoo-pxe-builder's People

Contributors

ultrabug avatar bengtfredh avatar nikize avatar darkdefender avatar wimmuskee 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.