Hello, I have zero experience with Ubuntu/Debian preseed but you need to identify exactly at which stage you loose IP connection. My bet would be when the installer attempts to reconfigure network? Perhaps there is some log on virtual console 2 or higher where you can see this.
FYI Preseed default finish (or any "finish" template kind) is only used in cloud environment. In PXE it won't be used I think. At least in Red Hat OS (there is post scriplet in kickstart for this). Now, I can comment only on Red Hats since this is my primary OS. We ship the default kickstart configured in a way that if the subnet associated with the host is set to DHCP mode, it will configure the primary device for DHCP. Otherwise, it will do static configuration. I assume it's the same for Debians. For docs about kickstart you can go to: http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#network (or RHEL docs as well for enterprise versions). Now it is important to understand that "network" kickstart option re-configures network, but for PXE installations network needs to be pre-initialized before Anaconda loads up. This is done by init ram disk via kernel command line options. Again, by default we configure DHCP or Static according to subnet setting. You can see this in PXELinux template when doing PXE. For iPXE you can see this in iPXE template ("Preseed default iPXE"). As you can see, iPXE IP address, gateway and DNS is passed into the installer which will re-use these to start Linux network stack. So there are two phases, in your case the 2nd one perhaps fails. Check your "Preseed default" template Preview option to see it. Again, I suggest you to set things up without Foreman first to understand how things work. I won't be able to help from screenshots, I don't do Ubuntu provisioning much. On Wed, Oct 11, 2017 at 1:13 PM, Craig Parker <[email protected]> wrote: > Hi Lukas, and thanks so much for your reply. I really appreciate the time > and effort you put into this. > > Unfortunately I've been really busy with operational tasks today and haven't > had any time to devote to this at all. What's happening though is this: > > - I boot the target machine (currently just an Ubuntu VM) with the generic > bootdisk option > - The machine boots, gets an IP address off our existing DHCP infrastructure, > and contacts Foreman to look for a machine configured with its MAC > - The machine finds a corresponding MAC address registered in Foreman, and > proceeds to build via the templates outlined at the GitHub bootdisk page: > "Preseed default iPXE", > "Preseed default", and > "Preseed default finish" > > I haven't modified any of these templates at this stage while I try to > understand the process. > At some stage fairly early on in the build though, it seems I lose my IP > address, and the build subsequently fails, as it can't download any required > files. By this stage I can't find my VM on the network anymore either. > > I hope I've explained this ok. Does this make sense? > > Thanks for your comments regarding setting a DHCP option inside the preseed > or kickstart file. I suspect that's all I may need to do perhaps. Sorry for > the possibly stupid question, but would you be able to give me any guidance > on how to set DHCP inside the preseed file (which one?) and / or inside the > RHEL kickstart file in Foreman? > > I should have a bit more time for this tomorrow and am more than happy to > provide screenshots / error messages / log files as necessary - I just don't > want to bomb you right now with potentially unnecessary extra stuff. > > Thanks again for your help, Craig > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. -- Later, Lukas @lzap Zapletal -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
