Failed to get an IP via DHCP!
-
Hello,
I’ve just started an internship in a company and I’ve been tasked with find a OS deployement solution. So did some research and came across FOG, so I decided to give it a try.
So I set up two computers on an isolated network, my server (on a Debian 9) with fog, and a client (lenovo Edge 71) both are linked to an unmanaged switch.
So the install of FOG ran smoothly (choose to use FOG as DHCP) but I have some issue with the PXE boot. I get to the PXE menu, choose Full Registration (or Quick) and get the following :
What I don’t get, is that the DHCP seems to be working just fine because the lease is granted, I checked the files from the servers and there is an entry for the MAC address of my client. And my client, once loged in on Windows have an IP from the dhcp.
So if anyone as a solution, that’d be cool
-
@Arkhad Welcome to the forums. It’s always good to mention the FOG version you are currently running in every new thread you open. Though I think your issue could happen in all the versions it’s still good to make sure you don’t use an old one…
The message “No DHCP response on interface…” is a bit misleading and I ought to change that at some point. Look a bit further up where it says “Either DHCP failed or we were unable to access 10.0.0.2/fog//index.php for connection testing”. I’d say you are missing the
http://
schema there. Let me guess, you installed FOG 1.4.4 and then put in the latest kernel/initrd by hand? At some point after 1.4.4 we changed that part in the scripts and PHP interface. This is why I guess you use 1.4.4 web interface but newer kernel/init.Can you outline the exact steps you went to install FOG?
-
Thanks for your reply.
Yeah, I installed 1.44.
I downloaded the files using git from https://github.com/fogproject/fogproject.git
Then I ran the install script with an address from the company main network that had Internet access. (So It could download everything that was needed).After, I ran the script again with a local address so it could work on my isolated network.
Then I tried to register my test client and got the same problem although the error messages were slightly different (“Either DHCP failed or we were unable…” was not here)
So I looked on the Internet came across a post on this forum with a similar error messsages where updating the kernel seems to have corrected the issue.Then I used the script from the wiki to manually update the kernel
https://wiki.fogproject.org/wiki/index.php?title=Kernel_UpdateWhat do you mean by “missing the http:// schema” ? Missing as in I didn’t see it or that it’s an error in the conf files ?
-
@arkhad The updated kernels have made some changes to support http vs https support. These new kernels are not directly supported in FOG 1.4.4.
The easiest way to fix is to move to the development branch (i.e. what the developers call RC release). Go back to where you downloaded the git files and run these commands.
cd /root/fogproject git checkout dev-branch git pull cd bin ./installfog.sh
That will give you 1.5.0RC10 or RC11. That will be the latest kernel and inits.
-
@arkhad said in Failed to get an IP via DHCP!:
Then I used the script from the wiki to manually update the kernel
https://wiki.fogproject.org/wiki/index.php?title=Kernel_UpdateThere we go, good guess I had. It’s not much of trouble and we should get that fixed soon enough.
What do you mean by “missing the http:// schema” ? Missing as in I didn’t see it or that it’s an error in the conf files ?
It’s nothing something you can change easily. It’s in the FOG source code and I am sure you don’t want to dig into that just yet. So follow the instructions below.
I am still wondering if you also have an issue with changing the IP address. Are you aware of all the places you need to change the IP when doing this? Read through the following post and make use of Wayne’s script: https://forums.fogproject.org/topic/10315/changing-my-fog-server-to-an-isolated-network
Please let us know which IP is which in the isolated network setup. I see 10.0.0.2 in one picture and 10.0.0.1 in the other one.
It’s a bit of a hassle to move between isolated and internet if you are still new to FOG and don’t know all the details. To get things going now so you get to know FOG and it’s culprits I’d suggest “moving back” to the original 1.4.4 version of FOG for now. For that you just need to reverse the manual kernel upgrade. If you followed the steps outlined in the wiki you should still have the old binaries around. If not you can still download the official 1.4.4 binaires archive on your work PC and transfer to your isolated machine e.g. using a USB key.
Now either
- move the 1.4.4 stuff from
/var/www/html/fog/service/ipxe/old
back to/var/www/html/fog/service/ipxe/
or - extract the archive and move
inits/init.xz
,inits/init_32.xz
,kernels/bzImage
andkernels/bzImage32
to target directory/var/www/html/fog/service/ipxe/
… (overwriting the manually downloaded stuff!)
Now try again, take a picture of the error if you see one and post here again. It’s way easier if we can guide you.
- move the 1.4.4 stuff from
-
Ok so I tried installing the 1.5 which got stuck on “backing up database…”, so I stoped it ran the uninstall script from the wiki and downloaded again the 1.44.
I installed 1.44 again and tried to register a host and it worked this time. So I’m a bit lost as to what was the problem earlier.
One thing did change though, it’s the appearance of the PXE menu, I use to have a black background with orange writing, now it’s white whith blue writing and an image of the fog logo.
EDIT: Well new problem now, when booting from network after choosing boot from hard disk in the PXE menu I get :
Chainloading failed, hit ‘s’ for the iPXE shell
But some things are working because I managed to use a WoL task and create a capture of my host.
https://forums.fogproject.org/topic/11226/chainloading-failed -
@arkhad said in Failed to get an IP via DHCP!:
Well new problem now, when booting from network after choosing boot from hard disk in the PXE menu I get :
Chainloading failed, hit ‘s’ for the iPXE shellPlease open a new thread on this (and again post a picture) as we’d like to keep things as sorted as possible. Easier for other users to follow.
-
@arkhad said in Failed to get an IP via DHCP!:
I installed 1.44 again and tried to register a host and it worked this time.
Because reinstalling fog 1.4.4 replaced the kernel and inits with the correct versions for 1.4.4