rockumsockum
Posts: 1
Joined: Sat Sep 22, 2012 8:03 am

Raspberry Pi PXE server issues

Sat Sep 22, 2012 8:17 am

Hey, this is my first post, and it's going to sound noobish, but I would appreciate any and all help. :D

I have been trying to turn my raspberry pi into a tftp PXE server.
I followed this tutorial to a 'T': http://www.debian-administration.org/articles/478
using dnsmasq.

However, when I plug my laptop and Pi into my router (and turn off router DHCP)
it never even gives my laptop a DHCP offer, let alone pxelinux, it just sits there with the twirling line, showing my MAC address saying it's waiting for offers.

Another idea I got from this video: http://www.youtube.com/watch?feature=pl ... QpzWnVMRHs
After emailing the creator, was to use iPXE. However, iPXE still requires DHCP and tftp serving to chainload the network driver and microcorelinux for their suit of extensible booting options.
If anyone can help me with this, I'd be eternally grateful!!
:D

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Raspberry Pi PXE server issues

Sat Sep 22, 2012 7:44 pm

Some time ago I was trying to build a PXE server and I had gathered a lot of instructions as preparation.

The instructions are at
http://elinux.org/R-Pi_PXE_Server

Unfortunately, I abandoned this project and it was never finished. However, you may find some of the information useful. The text may look a bit strange because it was copied from many sources.

jrsmile
Posts: 1
Joined: Tue Sep 25, 2012 2:03 pm

Re: Raspberry Pi PXE server issues

Tue Sep 25, 2012 2:05 pm

just contact me as you already have, i am glad to help you with every problem you might find.

Steven715
Posts: 27
Joined: Mon Dec 24, 2012 9:01 pm
Location: Bedfordshire

Re: Raspberry Pi PXE server issues

Sat Dec 29, 2012 11:25 am

Hello there I am having the same problem I have been successful in getting a web server to work with MySQL and even run a basic forum on. I have been using raspian wheeze is there a preference on which software to use?

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Raspberry Pi PXE server issues

Mon Dec 31, 2012 6:57 am

rockumsockum wrote:Hey, this is my first post, and it's going to sound noobish, but I would appreciate any and all help. :D

I have been trying to turn my raspberry pi into a tftp PXE server.
I followed this tutorial to a 'T': http://www.debian-administration.org/articles/478
using dnsmasq.

However, when I plug my laptop and Pi into my router (and turn off router DHCP)
it never even gives my laptop a DHCP offer, let alone pxelinux, it just sits there with the twirling line, showing my MAC address saying it's waiting for offers.

Another idea I got from this video: http://www.youtube.com/watch?feature=pl ... QpzWnVMRHs
After emailing the creator, was to use iPXE. However, iPXE still requires DHCP and tftp serving to chainload the network driver and microcorelinux for their suit of extensible booting options.
If anyone can help me with this, I'd be eternally grateful!!
:D
With newer versions of dnsmasq, some of that tutorial in debian-administration.org becomes redundant
I have a blog post on how I got a pxe server going which is a bit more recent than that tutorial if you want to give that a shot
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

lulzhacks
Posts: 6
Joined: Thu Jan 03, 2013 5:26 pm

Re: Raspberry Pi PXE server issues

Thu Jan 03, 2013 5:31 pm

so can you post the tutorial thing? has anyone got this working?

i know this thread is a bit old but im trying to revive a net book that doesn't have an OS and can only recognize PXE, and i don't have another computer to run a PXE server on.

many thanks

Steven715
Posts: 27
Joined: Mon Dec 24, 2012 9:01 pm
Location: Bedfordshire

Re: Raspberry Pi PXE server issues

Thu Jan 03, 2013 7:56 pm

lulzhacks wrote:so can you post the tutorial thing? has anyone got this working?

i know this thread is a bit old but im trying to revive a net book that doesn't have an OS and can only recognize PXE, and i don't have another computer to run a PXE server on.

many thanks
Hello there I have been trying it out over the last couple of days I am nearly there now but something for people that are new to this like I am you need to do an update of all the software etc.

Code: Select all

sudo apt-get upgrade
This updated the system and allowed me to get the apps that was needed.

I am struggling with the dhcp server at the moment with my subnet. If I get this to work I will try and do a tutorial for this with steps that is easy to understand for noobs like me. I will keep you posted.

However for the time being the goto this link and go to extra useful text http://elinux.org/R-Pi_PXE_Server

This is the instructions I have been following. I have told myself I will get this to work as this is on of my many reasons for buying the pi :D good luck

lulzhacks
Posts: 6
Joined: Thu Jan 03, 2013 5:26 pm

Re: Raspberry Pi PXE server issues

Thu Jan 03, 2013 9:21 pm

i'm looking forward to that steven, someone should make an all in one package one day?

thanks again,
lulz

Steven715
Posts: 27
Joined: Mon Dec 24, 2012 9:01 pm
Location: Bedfordshire

Re: Raspberry Pi PXE server issues

Thu Jan 03, 2013 10:06 pm

I hope so for a no hassle solution but for me this will be a good learning curve. I will do come more work tomorrow and if all goes well I will retrace my steps on a clean install and I will try and get some instructions done. Let me know how you get on in the mean time though.

Steve

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Raspberry Pi PXE server issues

Fri Jan 04, 2013 3:30 pm

lulzhacks wrote:so can you post the tutorial thing? has anyone got this working?

i know this thread is a bit old but im trying to revive a net book that doesn't have an OS and can only recognize PXE, and i don't have another computer to run a PXE server on.

many thanks
Sorry, should have made it clearer that the words 'blog post' linked to my blog
The link is http://sirlagz.net/2011/05/09/how-to-se ... an-part-2/
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

Steven715
Posts: 27
Joined: Mon Dec 24, 2012 9:01 pm
Location: Bedfordshire

Re: Raspberry Pi PXE server issues

Fri Jan 04, 2013 7:50 pm

SirLagz wrote:
lulzhacks wrote:so can you post the tutorial thing? has anyone got this working?

i know this thread is a bit old but im trying to revive a net book that doesn't have an OS and can only recognize PXE, and i don't have another computer to run a PXE server on.

many thanks
Sorry, should have made it clearer that the words 'blog post' linked to my blog
The link is http://sirlagz.net/2011/05/09/how-to-se ... an-part-2/
Thanks for this I will give it a try after the weekend. And post back if I got this to work or not. I have been working on the other link but I have only got it to half work the dhcp works but the tftp side is not sending a file I have ran out if time today but I will have another go at it so hang in there. ;)

Schorschi
Posts: 226
Joined: Thu Nov 22, 2012 9:38 pm

Re: Raspberry Pi PXE server issues

Sat Jan 05, 2013 6:57 pm

This may not be what is desired? But I am using one of my Pi devices as a network services server for my home office/lab/etc, DHCP, BIND, NTP, etc. And I wanted to also have it serve as my PXE/TFTP server for the various OS installations I do frequently since I worked with x86 and SPARC based virtualization in my career. I am serving via PXE, OS instalations for various Linux distributions, and Windows less frequently. I did this, speaking high-level, by using my existing CentOS linux PXE/TFTP server, and cloning the PXE configuration and boot image files to my Pi device.

Pi device is running Fedora 17 ARM...
1) Install and configure TFTP server
2) Install and configure DHCP service, paying explicit detail to DHCP/PXE/TFTP boot requirements
2) Copy existing PXE/TFTP configuration from existing CentOS PXE/TFTP server to Pi device

Works. I can now use my Pi device as a PXE/TFTP server for my various operating system installations as needed. I also have a Linux based repo server, but that is not strictly necessary, depending on how you setup your PXELinux configuration files. If anyone is intersted in this, just reply back to this thread, and I will post additional details. But if you already understand PXELinux (SysLinux), and have an existing setup for PXELinux, migrating it or cloning it to the Pi device is not especially difficult.

Unfortunately, Fedora 17 ARM lacks native PXELinux (SysLinux) package, so PXE booting Pi devices and loading Pi ARM OS via PXE, is not what I needed, but would be easy to add at some point whe PXELinux support materializes. It might be possible to via some extensive manual configuration effort, but the boot strap for Pi devices is unique. How to get PXE to download and chain to the start.elf file, would be an interesting adventure.

Steven715
Posts: 27
Joined: Mon Dec 24, 2012 9:01 pm
Location: Bedfordshire

Re: Raspberry Pi PXE server issues

Sat Jan 05, 2013 8:06 pm

Schorschi wrote:This may not be what is desired? But I am using one of my Pi devices as a network services server for my home office/lab/etc, DHCP, BIND, NTP, etc. And I wanted to also have it serve as my PXE/TFTP server for the various OS installations I do frequently since I worked with x86 and SPARC based virtualization in my career. I am serving via PXE, OS instalations for various Linux distributions, and Windows less frequently. I did this, speaking high-level, by using my existing CentOS linux PXE/TFTP server, and cloning the PXE configuration and boot image files to my Pi device.

Pi device is running Fedora 17 ARM...
1) Install and configure TFTP server
2) Install and configure DHCP service, paying explicit detail to DHCP/PXE/TFTP boot requirements
2) Copy existing PXE/TFTP configuration from existing CentOS PXE/TFTP server to Pi device

Works. I can now use my Pi device as a PXE/TFTP server for my various operating system installations as needed. I also have a Linux based repo server, but that is not strictly necessary, depending on how you setup your PXELinux configuration files. If anyone is intersted in this, just reply back to this thread, and I will post additional details. But if you already understand PXELinux (SysLinux), and have an existing setup for PXELinux, migrating it or cloning it to the Pi device is not especially difficult.

Unfortunately, Fedora 17 ARM lacks native PXELinux (SysLinux) package, so PXE booting Pi devices and loading Pi ARM OS via PXE, is not what I needed, but would be easy to add at some point whe PXELinux support materializes. It might be possible to via some extensive manual configuration effort, but the boot strap for Pi devices is unique. How to get PXE to download and chain to the start.elf file, would be an interesting adventure.
Hello there Schorschi thank you for the post. If you can do a wright up on this that would be excellent I more or less want to do the same thing as you. Once I get my tftp side of the server working then its all systems go as with the menus etc i am fine with.

As I said I am getting an IP address but not getting anything from the tftp server. I know that this is a configuration issue it's just where I need to find lol. Keeps me busy the good thing is that this is just a little project for myself so no stress if I don't get this working. I am doing this to learn more about Linux that is why I got my pi. So far I am very happy with this.

After this I will be playing with the GPIO and python yeah bring it on its all exciting stuff.

Schorschi
Posts: 226
Joined: Thu Nov 22, 2012 9:38 pm

Re: Raspberry Pi PXE server issues

Sun Feb 03, 2013 6:17 am

Sure, I can write up what I did. But, really it is just using Fedora 17 ARM distribution, and installing and enabling basic network services, DNS, DHCP, NTP, etc. Sorry I did not see you request sooner, have been rather busy the last month, so have not been haunting the Pi forum as often as I have been in the past.

Make sure BIND, DHCP, TFTP are configured correctly and functional before attempting any PXE based deployment. I have DHCP, and BIND on Pi, but repository on another device, which has more storage for the local Fedora repo. The key setting in the DHCP configuration is options 66 and 67 which defined the PXELinux file and the IP address of the TFTP server. Once you have this setup right, as well as the boot kernel image files staged on your Pi SD card, everything should work in reference DHCP/TFTP/PXE. In my case my Pi serves as the TFTP server, if you have enough storage to support the image files for the OSes you want to load via PXE/TFTP. I have a 16GB SD card, which is more than enough for multiple OSes. Note, I do not store the total distribution on the Pi device, I have a (local) repository server for that since I often build Fedora, CentOS, RHEL, RHEV-H, and ESXi (stateless) servers via PXE. I could do Windows as well if needed.

Below is what my dhcpd.conf file looks like (redacting a few things). Most of the option settings are defaults or pretty much straight-forward from the Linux DHCP server best practices or documentation...

option netbios-node-type 8;
option ip-forwarding off;
option option-128 code 128 = string;
option option-192 code 129 = text;

default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
log-facility local7;
always-broadcast off;
one-lease-per-client true;

deny client-updates;
deny bootp;
deny booting;
deny unknown-clients;
deny duplicates;
deny declines;

subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.235 192.168.1.242;
range 192.168.1.243 192.168.1.253;

option domain-name-servers 192.168.1.9;
option domain-name "<your domain name>.org";
option domain-search "<your domain name>.org";
option time-servers 192.168.1.9;
option ntp-servers 192.168.1.9;

option routers router.<your domain name>.org;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;

#option root-path "/tftpboot";
option root-path "/var/lib/tftpboot";

filename "/pxelinux.0";
next-server 192.168.1.9;

allow client-updates;
allow bootp;
allow booting;
allow unknown-clients;

ddns-update-style interim;
}

host Infrastructure {
hardware ethernet 00:00:00:00:00:FD;
server-name "Infrastructure.<your domain name>.org";
fixed-address 192.168.1.9;
}

host Pi32 {
hardware ethernet 00:00:00:00:00:FE;
server-name "Pi32.<your domain name>.org";
fixed-address 192.168.1.51;
}

host Pi47 {
hardware ethernet 00:00:00:00:00:FF;
server-name "Pi47.<your domain name>.org";
fixed-address 192.168.1.53;
}

You also need to make sure your PXE configuration is correct, but I will leave that for the next chapter when needed or if needed. I can also provide PXELinux configuration file examples if needed. Just let me know. For now I am assuming you have working knowledge of SysLinux/PXELinux? As well as setup of DHCP, TFTP, BAND servers, but if not, let me know I can help as needed with those services as well.

Return to “Networking and servers”