Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to create a dynamic PXE-Boot server that will allow me to automate the installation of a large number of devices while uniquely assigning information, such as unique host names and IP addresses, to each device. I have a pretty robust methodology for this, but currently i'm having trouble getting my install targets to download kickstart/preseed files. The device receives an IP Address correctly via my dhcp server, but when it attempts to download the ks file i get a 'failed to download kickstart file'. It is also unable to detect any installation media.
The ks is hosted on a flask server, and using wget to grab it works just fine. As far as i can tell the issue is that, while the dhcp works and the initial pxe config file is acquired, as soon as the actual install starts it is unable to network.
Booting a shell in the failed install and running `ip link` in order to view network devices shows only the LOOPBACK device, and not the p2p1 ethernet device that should show up. Does anyone have any suggestions on this?
here's my pxelinux.cfg/default:
#
#
MENU WIDTH 80
MENU MARGIN 10
MENU PASSWORDMARGIN 3
MENU ROWS 10
MENU TABMSGROW 15
MENU CMDLINEROW 15
MENU ENDROW 24
MENU PASSWORDROW 11
MENU TIMEOUTROW 16
MENU TITLE Pressed Installers
menu color title 1;34;49 #eea0a0ff #cc333355 std
menu color sel 7;37;40 #ff000000 #bb9999aa all
menu color border 30;44 #ffffffff #00000000 std
menu color pwdheader 31;47 #eeff1010 #20ffffff std
menu color hotkey 35;40 #90ffff00 #00000000 std
menu color hotsel 35;40 #90000000 #bb9999aa all
menu color timeout_msg 35;40 #90ffffff #00000000 none
menu color timeout 31;47 #eeff1010 #00000000 none
prompt 0
noescape 1
timeout 5
default vesamenu.c32
Just making sure, but in /etc/dhcp/dhcp.conf, the filename option is definitely pointed to the correct file (like "pxelinux.0")? If somehow it's pointed to the wrong version of pxelinux, then maybe it doesn't have the necessary networking modules loaded? I'm not sure exactly how it works.
Assuming that checks out, then my next guess is to look at the results of "lspci" and maybe "lsusb" when in the failed install.
lsusb isn't an available command in the install shell, but the only thing plugged into the usb port is a keyboard anyways.
lspci gives me a pretty long response. Unfortunately I don't have an easy way to get it in a reasonable format, so I've included a picture with the output here... sorry about that
it does note the presence of a network controller, two ethernet controllers (i guess cause there are two ethernet ports?), and 2 pci bridges to name a few.
I can also confirm that the pxelinux.0 is correctly located and referenced.
To clarify I do not believe this is a pxe-boot issue per se. I am definately getting the pxe-boot screen and I am definitely getting the correct menu options. When attempting to do an automated install with this hardware from a usb i get the same issue where i am unable to access the network during the install process.
Last edited by davelkan; 09-08-2016 at 09:03 AM.
Reason: typo
Two ethernet ports! Okay, first off - my experience with two ethernet ports and PXE booting is that if you are very very very very patient, it may load up the file anyway. After some minutes.
But I am not so patient, so I customized an initrd.pxe file which specifies which ethernet port to use. This works in my case, because I am okay with customizing an initrd for each client. Maybe not in your case, since you want something to automate installation for a bunch of clients.
I'll include my steps to solve the problem anyway:
Step 1) Boot into an install with the same architecture as the target (in my case 686 32-bit vs AMD64 64-bit).
Step 2) Make a copy of /etc/initramfs-tools (the whole directory)
Add the line "BOOT=nfs"
Change the DEVICE line to "DEVICE=eth1"
Note that I had to determine whether to use eth0 or eth1 by trial and error, and/or carefully observing which device got DHCP successfully.
Step 5) copy initrd.pxe.ETH1 to whatever file is served up by the PXE boot.
After doing these steps, the booting system will initially ONLY activate eth1. You won't see it attempt to do DHCP with eth0, only eth1. Later in the boot process, it will bring up the other ethernet device, but this will be after persistent naming rules have been loaded up. Thus, the other ethernet device will probably get assigned something like eth5 or eth6.
Now, I'm just doing network booting of a full OS, rather than an installer of some sort. So, my experience may not be entirely applicable. But perhaps you can fill in the blanks and adapt this to a solution for your situation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.