看到「ISC DHCP Server has reached EOL」這個,月初的時候 ISC 宣佈了 EoL,除非有嚴重的安全性問題冒出來,不然官方打算停止維護了:
The 4.4.3-P1 and 4.1-ESV-R16-P2 versions of ISC DHCP, released on October 5, 2022, are the last maintenance versions of this software that ISC plans to publish. If we become aware of a significant security vulnerability, we might make an exception to this, but it is our intention to cease actively maintaining this…
My project for the past weekend and now today was/is to set up a PXEBoot server, so I could install my box over and over again with the same settings so that when I accidentally forget to save something like theMaster Boot Recordonto a separate disk, I can recover by reinstalling without having to click through everything.
Speaking of MBR's, my project last week was to nuke the MBR and restore it by using a rescue disk; which lead to me reinstalling my box about five times because I kept making mistakes. (Placing the MBR backup onto the disk whose MBR I was deleting; backing up the wrong MBR; Deleting the wrong MBR; placing a Linux MBR over my Windows 7 Partition... [Thankfully, I'd backed up the wrong MBR earlier, which just so happened to be the correct MBR I'd overwritten...] and other such errors.)
But first! How to set-up a PXEBoot server! (Kind of)
Packages You Will Need
DHCP
tftp-server
syslinux
httpd
I had lots of fun setting everything up...
2. Setting up your Configuration
I had to look up a lot of tutorials to get my dhcpd.conf file to work. Fortunately, if you can't figure outwhy it's not working, there's a command that works with dhcpd to tell you if it's because you don't have the proper syntax.
dhcp status will tell you if you where you screwed up,if you screwed up.
Also, a useful site for helping you set-up your configuration (for almost the entire PXEBoot server) can be found here because, in the interest of saving time, I really don't want to type everything out.
Since the tutorial helps you with everything else, it's time to inform you, (hopefully those of you who read this and actually know what they're doing will find humor at my expense) of the types of errors I encountered, and the small mistake that they all stemmed from.
Most of my problems came from incorrectly configuring dhcpd.conf, but I ran into a slew of errors trying to pxeboot with my firewall turned on.... turn off your firewall, or set iptables up to allow the traffic through.(I don't know how to do that yet, but when I do, I'll post a how-to here.) I also set SELinux to permissivemode, just in case. (note: I didn't run into any problems with it on, but SELinux hated my Samba server, so I turned it "off" [also, I noticed that the source in my previous post, for temporarily disabling SELinux is no longer there. You can find out how-to disable SELinux here. It explains why youshouldn'tdisable SELinux, and personally, I agree.] for now.)
My main problem was that for some reason, ARP (Address Resolution Protocol) wasn't resolving the IP address of my VM (Virtual Machine) for some odd reason. I spent hours and hours with the PXE-11 Error, trying to figure out why. Originally, I had thought it had to do with my router, (Friggin' 2WIRE) and not having a proper DNS set-up. My father and I were originally going to stop using DHCP on it, but we have AT&T Uverse, and since the Television uses DHCP resolution to stream to our house TV, AT&T makes it impossible for you to turn DHCP off. (AAAAAAARGH!) So that attempt at a solution was implausible.
Then we were going to use our Linksys router to do the same thing, removing it from the AT&T network and having it broadcast it's own wireless to do the same thing. However, I don't know the router password, and my father (who had set it up) didn't know it either. Leaving us the only option to reset the darn thing. Unfortunately, there are other people living in the house who kind of sort of need their internet, so we can't do that until next weekend.
We spent hours, almost all of Saturday and Sunday trying to figure out why it wasn't working. Looking it up on Google, we thought it was an issue with the VMWare Player we were using to PXEBoot.
It wasn't, but we switched the .nic the VM was using anyway. It still did not work.
No, the problems we kept encountering stemmed all from one mistake in the dhcpd.conf file. I had made a typo of all things on the server-name line. Instead of the IP Address of my box, I had listed an IP address that, in my house at least, did not exist... And the only reason we discovered that was because we ended up using a packet sniffer to try and find out why ARP wasn't working.
Ofcourseit wouldn't work! I had typed in the wrong address!
So let that be an interesting lesson. A lot of issues come from typos.