You are not logged in.

#1 2017-12-20 03:04:02

Goran
Member
Registered: 2012-01-24
Posts: 92

Need clarification relating to PXE network installation instructions

I'm trying to follow this guide: https://wiki.archlinux.org/index.php/PXE

My network setup is fairly simple:

(A)---------------(Router)----------------(B)

I would like B to boot over the network, by getting the relevant iso from A.

From what I understand, PXE can be used to do exactly that, and that's what the instructions on the arch wiki basically outline, but they don't really go into detail about configuring the home router properly: I assume that I would need to disable dhcp on the router, so that it doesn't conflict with the dhcp service that I would start on A. Also, the address of the router is 192.168.0.1, which is the same address that I'm supposed to manually set for A (according to the instructions), so I don't know if I would need to change the router address as well, or if maybe I could use a different address for A ... ?

I'm also not sure what this would imply for internet access during the procedure - I hope there's a way to set this up where it would be maintained throughout, so that I can troubleshoot without having to first revert the network to a previous state.

Another thing I would like to clear up: Assuming that I wanted B to boot a non-arch iso (a 32-bit ubuntu live usb iso, for example), would the procedure still be basically the same? I mean, could I just mount the live usb onto /mnt/archiso, instead of the arch iso, or would I need to change something in the configuration as well?

Any information you can provide, relating to this, or where I could maybe find proper guidance (if not here) - It would be really appreciated.

Thank you.

Offline

#2 2017-12-20 08:51:30

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

You don't need to disable your router's dhcp service. You can either configure your router's dhcp server to direct pxe requests to A (if it's dnsmasq see server address parameter for "dhcp-boot" and "pxe-service" options) or setup dnsmasq's proxy DHCP server on A (read the tip in dnsmasq#PXE_server).

The procedure for different isos will require to change the bootloader (PXELINUX) configuration.

If you want a permanent PXE solution, dnsmasq as TFTP and DHCP-proxy server + PXELINUX + some webserver would be the most simple option.

Offline

#3 2017-12-20 19:19:15

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

nl6720 wrote:

You can either configure your router's dhcp server to direct pxe requests to A (if it's dnsmasq see server address parameter for "dhcp-boot" and "pxe-service" options)

I'm using a typical home router, so the ability to configure dhcp on that router doesn't really extend beyond "enable/disable".

or setup dnsmasq's proxy DHCP server on A (read the tip in dnsmasq#PXE_server).

If that can work, that would be great!

If you could confirm that I understand correctly: I can skip the part under PXE#Network, because A already has a working IP (192.168.0.2) which was previously provided by the router, and then I can just use the following dnsmasq config:

port=0
interface=enp3s0
bind-dynamic
dhcp-range=192.168.0.1,proxy
dhcp-boot=/arch/boot/syslinux/lpxelinux.0
dhcp-option-force=209,boot/syslinux/archiso.cfg
dhcp-option-force=210,/arch/
dhcp-option-force=66,192.168.0.2
enable-tftp
tftp-root=/mnt/archiso

With that, I should be able to follow the rest of the instructions as they stand, and everything should work properly?

The procedure for different isos will require to change the bootloader (PXELINUX) configuration.

I'm not really sure about all the details involved in that. To begin with, the ubuntu live usb distribution doesn't have a boot/syslinux directory with all the files being referenced in the above dnsmasq configuration, so I'm guessing I would need to change the dnsmasq config as well, and the syslinux files would have to come from somewhere else?

Ideally, I would be able to just mount any bootable usb stick somewhere on A, and have B boot that over the network. Is there a way to configure something that generic?

If you want a permanent PXE solution, dnsmasq as TFTP and DHCP-proxy server + PXELINUX + some webserver would be the most simple option.

I don't need anything permanent. I just want to restore a very old machine, which can't really boot any other way (at least for now). If I can get it to boot initially, over the network, I assume I can make a floppy disk with plop, and then just boot with that in the future.

Offline

#4 2017-12-21 09:04:50

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

Goran wrote:

If you could confirm that I understand correctly: I can skip the part under PXE#Network, because A already has a working IP (192.168.0.2) which was previously provided by the router, and then I can just use the following dnsmasq config:

port=0
interface=enp3s0
bind-dynamic
dhcp-range=192.168.0.1,proxy
dhcp-boot=/arch/boot/syslinux/lpxelinux.0
dhcp-option-force=209,boot/syslinux/archiso.cfg
dhcp-option-force=210,/arch/
dhcp-option-force=66,192.168.0.2
enable-tftp
tftp-root=/mnt/archiso

With that, I should be able to follow the rest of the instructions as they stand, and everything should work properly?

Try it an see. If "dhcp-boot" doesn't work, try replacing it with "pxe-service" (see dnsmasq(8) man page for usage).

Goran wrote:

To begin with, the ubuntu live usb distribution doesn't have a boot/syslinux directory with all the files being referenced in the above dnsmasq configuration, so I'm guessing I would need to change the dnsmasq config as well, and the syslinux files would have to come from somewhere else?

Sorry, no idea.

Goran wrote:

Ideally, I would be able to just mount any bootable usb stick somewhere on A, and have B boot that over the network. Is there a way to configure something that generic?

Unlikely. Some configuration will need to adjusted, as you can see there are Arch Linux specific things in dnsmasq's "dhcp-boot" and "dhcp-option-force" options.

Offline

#5 2017-12-23 05:10:57

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

It didn't work.

I also tried following more specific/fitting instructions I found here: https://n0dy.com/blog/2014/09/14/networ … roxy-mode/

That didn't work either, but I'm not sure if the problem is with the server, or if it's something with the client.

The client is an old (early 2000s) machine, and its bios has an "INT18 Device (Network)" boot option, which I've set as the top boot priority. I assume that even if there was something mis-configured on the server, the client should still get as far as sending a DHCP request for the initial IP, and that this request should be received by both the router (which should provide the address), and the server (which should provide all the other, pxe-related stuff).

However, watching traffic on the server, via tcpdump, shows no DHCP packets ...

Is it possible that, even though the network boot options exists in the client bios, the actual ethernet controller doesn't support it?

The client is an "hp pavilion 771n". I can't really find any specific information about any of the internals. Looking on the inside, I can't even see an obvious ethernet chip - There's just a small metal housing labeled FOXCONN, that houses the ethernet port, and two usb ports.

Offline

#6 2017-12-23 08:12:10

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

The instructions from that site should more or less work, it uses "pxe-service" unlike the wiki PXE article because it seems that for some reason "dhcp-boot" doesn't work with dhcp proxy.

Goran wrote:

That didn't work either, but I'm not sure if the problem is with the server, or if it's something with the client.

Add "log-dhcp" to dnsmasq configuration, then you'll see everything that is sent to the client in the journal. Also if you have a firewall on the server you need to open some ports: UDP 67, 68, 4011 for DHCP+PXE; UDP 69 for TFTP; and TCP 80 for HTTP.

Goran wrote:

Is it possible that, even though the network boot options exists in the client bios, the actual ethernet controller doesn't support it?

PXE is quite ancient, so I don't think that should happen.
What did you see on the client when it booted? When PXE boot fails there usually is some error message.

Also post your current dnsmasq configuration.

Offline

#7 2017-12-23 17:16:03

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

Adding "log-dhcp" didn't change anything.

There's no firewall on the server.

There are no errors on the client when it boots. I just get this:

Copyright (C) 1984-2001, Award Software, Inc.

Copyright 2001 by Hewlett Packard company Rev. 3.04

Intel(R) Pentium(R) 4 2000Mhz Processor

Memory Test: 524288K OK

Award Plug and Play BIOS Extension v1.0a
Initialize Plug and Play Cards ...
PNP Init Completed

Detecting Primary Master    ... ST380020A
Detecting Primary Slave     ... None
Detecting Secondary Master  ... None
Detecting Secondary Slave   ... None


Press F1 to enter SETUP
02/09/2002-SiS650-P4S-LA

My current dnsmasq config:

# DNS Options
port=0
# DHCP Options
dhcp-range=192.168.1.1,proxy,255.255.255.0
dhcp-option=vendor:PXEClient,6,2b
dhcp-no-override
pxe-service=X86PC, "Boot from network", lpxelinux
log-dhcp
# TFTP Options
enable-tftp
tftp-root=/srv/tftp/archlinux-iso

EDIT*

Note that I changed the router settings to match the example, so you can disregard the IP addresses I mentioned in my earlier posts: The network is now 192.168.1.0/24, where the router is 192.168.1.1, and the server is 192.168.1.3

So, the dhcp-range value should be correct (I also tried the one he used - 192.168.1.136 - but that didn't work either).

I don't think it's a dnsmasq config issue, because it can't do anything without receiving DHCP request packets anyway, and that's not happening (according to tcpdump). So, everything seems to be pointing to a client issue.

Last edited by Goran (2017-12-23 17:27:32)

Offline

#8 2017-12-23 17:44:25

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

If the dnsmasq log didn't show anything then the client didn't connect (or dnsmasq.service was not started smile ).
I think that it should show something when trying to PXE boot and failing, you can try looking in the BIOS for more boot related stuff.

Or maybe pxe-service will not work with it, try directly connecting (if possible) A & B and use the instructions with dhcp-boot on wiki https://wiki.archlinux.org/index.php/PXE .

Also does it even support x86_64?

Last edited by nl6720 (2017-12-23 17:45:10)

Offline

#9 2017-12-23 18:28:25

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

The only thing the dnsmasq log shows is:

Dec 23 13:17:24 arch systemd[1]: Starting A lightweight DHCP and caching DNS server...
Dec 23 13:17:24 arch dnsmasq[17715]: dnsmasq: syntax check OK.
Dec 23 13:17:24 arch systemd[1]: Started A lightweight DHCP and caching DNS server.
Dec 23 13:17:24 arch dnsmasq[17716]: started, version 2.78 DNS disabled
Dec 23 13:17:24 arch dnsmasq[17716]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Dec 23 13:17:24 arch dnsmasq[17716]: DBus support enabled: connected to system bus
Dec 23 13:17:24 arch dnsmasq-dhcp[17716]: DHCP, proxy on subnet 192.168.1.1
Dec 23 13:17:24 arch dnsmasq-tftp[17716]: TFTP root is /srv/tftp/archlinux-iso

At least we can be sure that the service actually started smile

nl6720 wrote:

I think that it should show something when trying to PXE boot and failing, you can try looking in the BIOS for more boot related stuff.

One would think so, but it doesn't. The BIOS doesn't have any additional options relating to network booting - "INT18 Device (Network)" is the only thing, and I've set it at the top of the boot priority list.

Or maybe pxe-service will not work with it, try directly connecting (if possible) A & B and use the instructions with dhcp-boot on wiki

But even if that was true, if the client actually tried to initiate a network boot, that should result in a DHCP request that would be answered by the router, and also detected by tcpdump on the server ... Right?

The fact that neither of this is happening, and that the client doesn't actually throw a PXE error of any sort, seems to indicate that the client is not actually trying to initiate a network boot.

If that's true, I don't think that a direct connection would work any better ... Is there a way to confirm that the client is actually doing what it's supposed to do?

Also does it even support x86_64?

No, the client is a 32bit machine, but I'm using a 32 bit arch iso (archlinux-2017.12.01-i686.iso), so I think that should work the same (all the same files are there, and the structure seems the same).

Offline

#10 2017-12-23 18:57:48

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

Goran wrote:

But even if that was true, if the client actually tried to initiate a network boot, that should result in a DHCP request that would be answered by the router, and also detected by tcpdump on the server ... Right?

The fact that neither of this is happening, and that the client doesn't actually throw a PXE error of any sort, seems to indicate that the client is not actually trying to initiate a network boot.

If that's true, I don't think that a direct connection would work any better ... Is there a way to confirm that the client is actually doing what it's supposed to do?

I don't know about tcpdump, but it should show up in dnsmasq log (it does for my pxe server).

About direct connection, I was just guessing that maybe using dhcp-boot will work.

Do you have some other PCs to test the pxe booting to see if it works?

Offline

#11 2017-12-23 21:50:54

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

nl6720 wrote:

About direct connection, I was just guessing that maybe using dhcp-boot will work.

I was guessing too. I mean, I don't know, there's a lot of server configuration combinations that one could try, hoping that maybe one of them would work, but if the client doesn't actually attempt to start the process, by sending that initial DHCP request, then the details of server configuration are irrelevant.

There's a lot that would indicate a problem on the client, as I noted in previous posts. Also, looking at the client's ethernet port, the orange activity LED is constantly off, through the whole boot process.

So, it seems pretty clear that it's doing nothing, but I don't know why.

Do you have some other PCs to test the pxe booting to see if it works?

Unfortunately, no.

Offline

#12 2017-12-24 08:59:05

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

To test PXE you can use a VM with a bridged network connection (that's how I did it).

Since we're guessing ... I searched for "INT18 Device (Network)" and found this. Does your BIOS have any "boot ROM" options?

Is PXE the only hope? Is there no operating system on the HDD?

Offline

#13 2017-12-24 16:59:57

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

nl6720 wrote:

To test PXE you can use a VM with a bridged network connection (that's how I did it).

Yeah, that's a good idea. If I can ever resolve the client issues, that could help me troubleshoot server issues (assuming there are any).

Since we're guessing ... I searched for "INT18 Device (Network)" and found this. Does your BIOS have any "boot ROM" options?

I found that too, and no, there are no "boot ROM" options.

Is PXE the only hope? Is there no operating system on the HDD?

Well, I don't know if it's the only hope. I'm just trying it because I couldn't get anything else to work.

The HDD has an old version of ubuntu, but it's also broken; I can get to the grub menu, but trying to actually boot ubuntu results in a bunch of disk errors.

The cd-rom drive died a long time ago, so I can't use a live cd.

The BIOS has options to boot from "USB ZIP" or "USB FDD", but those are not synonyms for "USB HDD" (which the bios doesn't support), so I can't just use a usb stick. There was some hope that maybe if I formatted the usb stick in a special way, it could potentially work, but it became a very complicated issue, and I couldn't make any progress, as you can see in this thread: https://bbs.archlinux.org/viewtopic.php?id=231282

Offline

#14 2017-12-24 19:17:23

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 596

Re: Need clarification relating to PXE network installation instructions

Sorry, I'm out of ideas.

Offline

#15 2017-12-24 19:38:33

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

No problem. I really appreciate the time and effort you spent in trying to help me, so thank you!

I think my best bet at this point would be to buy a usb floppy disk drive, which I could then hopefully use to make a boot floppy, and then use that floppy to get the machine into a proper working state.

Offline

#16 2017-12-24 20:48:29

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: Need clarification relating to PXE network installation instructions

It's been over a decade, but i do remember a case where a pxe client only booted if a bootp server was present.
Dhcp servers are supposed to provide bootp functionality, but this client could only deal with responses from a genuine bootp server.

Maybe you are facing a similar issue ?


https://en.wikipedia.org/wiki/Bootstrap_Protocol


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#17 2017-12-24 21:39:21

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: Need clarification relating to PXE network installation instructions

I don't think it's an issue with the server:

If I understand the general PXE process correctly, the client is supposed to initiate the whole procedure, by making the initial dhcp request on boot. I believe that this request should be detectable on the network, irrespective of the pxe/bootp server. In other words, if I run "tcpdump -i any" on any computer on that network, I should be able to see that initial dhcp request from the client, even if there's nothing on the network that could satisfy that request.

The fact that this doesn't happen, and that the client doesn't show any kind of pxe-related error on boot, and that the orange activity LED on the client's ethernet port remains turned off throughout the boot process ... This seems to confirm that the client is not even trying to initiate a network boot.

Last edited by Goran (2017-12-24 21:40:08)

Offline

Board footer

Powered by FluxBB