LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-06-2016, 02:40 PM   #1
davelkan
LQ Newbie
 
Registered: Sep 2016
Posts: 4

Rep: Reputation: Disabled
PXE-Boot fails to download ks file


Hi,

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

label Ubuntu 14.04.5 (Ubuntu 14.04.5)
menu label Ubuntu 14.04.5 (Ubuntu 14.04.5)
linux ubuntu/vmlinuz root=/dev/sda ksdevice=p2p1 file=http://<ip_omitted>:5000/preseed ks=http://<ip_omitted>:5000/ks quiet --
initrd ubuntu/initrd.gz

Last edited by davelkan; 09-07-2016 at 09:06 AM. Reason: adding details
 
Old 09-07-2016, 11:54 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.
 
Old 09-08-2016, 09:03 AM   #3
davelkan
LQ Newbie
 
Registered: Sep 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi Isaac thanks for your time!

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
 
Old 09-08-2016, 09:07 AM   #4
davelkan
LQ Newbie
 
Registered: Sep 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
It's possible you may be pulling on the right thread about it not properly loading networking modules though.
 
Old 09-08-2016, 10:00 AM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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)

Step 3) edit MYCOPY/initramfs-tools/initramfs.conf

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 4) mkinitramfs -d MYCOPY/initramfs-tools -o initrd.pxe.ETH1

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PXE diskless boot fails on ethernet configuration yotamhc Linux - Server 4 10-14-2018 11:09 PM
pxe boot "PXE-T01 file not found" ssharma_02 Linux - Networking 16 05-18-2011 03:21 PM
Fedora diskless workstation - boot via PXE always fails kbs1 Linux - Server 12 05-15-2010 08:35 AM
Help please! Installing Slackware 12.2 by PXE boot fails! beyond291 Slackware 4 01-15-2009 08:21 AM
mount NFS fails on successful PXE boot ale99 Linux - Networking 0 11-03-2008 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration