User Tools

Site Tools


setup_a_pxe_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

setup_a_pxe_server [2013/03/23 15:08]
glenux [Debian / Ubuntu Tutorial]
setup_a_pxe_server [2017/07/25 14:56] (current)
46.161.9.20
Line 1: Line 1:
- +wh0cd944116 ​<a href=http://lisinopril20mg.us.com/>Order Lisinopril</a
-====== PXE Server Setup ===== +
- +
-===== Debian / Ubuntu Script ===== +
- +
-Steps : +
-  * Simply download the following script : \\ ''​wget http://​wiki.youandjerrycan.org/​doku.php?​do=export_code&​id=setup_a_pxe_server&​codeblock=0 -O pxe_server.sh''​ +
-  * Run the script, typing : \\ ''​sh pxe_server.sh''​ +
- +
-<file bash pxe_server.sh>​ +
-#!/bin/sh +
- +
-# DON'T PANIC +
-# Before running this script, you must set the following paramaters to  +
-# the values that suit your needs. +
- +
-# ARCH could be one of : i386 | amd64 | etc. +
-ARCH=i386 +
-DISTRO=debian +
-PXE_ROOT=/​opt/​pxe/​$DISTRO-$ARCH +
-DNSMASQ_CONF=/​opt/​pxe/​dnsmasq.conf +
- +
-sudo apt-get install dnsmasq syslinux memtest86+ +
- +
-# Creation du repertoire servi par le builtin tftp de dnsmasq +
-mkdir -p $PXE_ROOT/​pxelinux.cfg +
-cd $PXE_ROOT +
- +
-# On fetch le kernel, le bootloader pxe et le ramdisk +
-export SITEFTP=ftp.fr.debian.org:/​debian/​dists/​stable/​main/​installer-$ARCH/​current/​images/​netboot/​debian-installer/​$ARCH +
-wget -c $SITEFTP/​pxelinux.0 -O $PXE_ROOT/​pxelinux.0 +
-wget -c $SITEFTP/​linux -O $PXE_ROOT/​linux  +
-wget -c $SITEFTP/​initrd.gz -O $PXE_ROOT/​initrd.gz +
- +
-# Config du bootloader +
-cat > $PXE_ROOT/​pxelinux.cfg/​default << EOF +
-DEFAULT lenny +
-LABEL lenny +
-        kernel linux +
-        append vga=normal initrd=initrd.gz -- +
-TIMEOUT 0 +
-EOF +
- +
-# Config dnsmasq +
-cat > $DNSMASQ_CONF << EOF +
-interface=eth0 +
-enable-tftp +
-tftp-root=$PXE_ROOT +
-dhcp-range=10.42.0.10,​10.42.0.50,​255.255.255.0 +
-dhcp-boot=pxelinux.0,​pxeserver,​10.42.0.1 +
-EOF +
- +
-sudo ifconfig eth0 10.42.0.1 netmask 255.255.255.0 +
-sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE +
- +
-# Reload dnsmasq +
-sudo /​etc/​init.d/​dnsmasq stop +
-sudo dnsmasq \ +
-        --keep-in-foreground \ +
-        --conf-file=$DNSMASQ_CONF \ +
-        --log-facility=-  +
-</​file>​ +
- +
- +
-===== CentOS ===== +
- +
-WARNING: This tutorial is in progress as I document my configuration process while trying to have a functionnal PXE server for network install. +
-The idea is to run a virtual machine on my laptop to boot another computer on the LAN for PXE install. +
- +
-  * Start ssh service on centOS for an easy access from the host machine +
-<​code>#​ service sshd start</​code>​ +
- +
- +
-  * EPEL repo config for centOS: +
-<​code>​ +
-cd /tmp +
-</​code>​ +
-<​code>​ +
-wget http://dl.fedoraproject.org/​pub/​epel/​6/​i386/​epel-release-6-8.noarch.rpm +
-</​code>​ +
-<​code>​ +
-# rpm -Uvh epel-release-6*.rpm +
-</​code>​ +
-[[http://​www.rackspace.com/knowledge_center/​article/​installing-rhel-epel-repo-on-centos-5x-or-6x|Source]] +
- +
- +
-  * Update the system and install Cobbler +
-<code># yum update +
-# yum install cobbler</code>+
setup_a_pxe_server.txt · Last modified: 2017/07/25 14:56 by 46.161.9.20