iPXE discussion forum
Network Unreachable Error - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Network Unreachable Error (/showthread.php?tid=10127)



Network Unreachable Error - abkap02 - 2017-07-07 20:09

Hi,

I'm trying to make use of iPXE to set up a diskless Ubuntu 16.04.2 Xenial Xerus boot via VirtualBox virtualization application. I have been able to successfully set up the server with Ubuntu Server 16.04.2 operating system using dnsmasq and nfs-kernel-server services running on it and when I make use of the preset PXE boot environment of the client virtual machine on VirtualBox everything works fine.

But when I'm trying to make ipxe.iso myself with an embedded script for amd64 machines as on http://ipxe.org/appnote/ubuntu_live which is:
#!ipxe

set server_ip 192.168.1.50
set nfs_path /tftpboot/ubuntu-14.04.1-desktop-amd64
kernel nfs://${server_ip}${nfs_path}/casper/vmlinuz.efi || read void
initrd nfs://${server_ip}${nfs_path}/casper/initrd.lz || read void
imgargs vmlinuz.efi initrd=initrd.lz root=/dev/nfs boot=casper netboot=nfs nfsroot=${server_ip}:${nfs_path} ip=dhcp splash quiet -- || read void
boot || read void

to be used to boot the client machine, it gives me a Network Unreachable error.

I'm using a bridged network configuration for my VirtualBox server with a static IP address and it does not require port forwarding in that mode.

Someone please lemme know what I must be missing or doing wrong here?

Thanks!


RE: Network Unreachable Error - NiKiZe - 2017-07-08 08:43

If you use that script as embeded you will need to add network configuration as well.

iPXE without embeded script will automatically run http://ipxe.org/cmd/autoboot

which is essentially running dhcp for each interface and trying to chain filename provided by dhcp. If no response or no filename was given then it moves on to the next interface.

With embed the script just runs, so as described on http://ipxe.org/embed you probably will want to add dhcp at the top of the embeded script.


Another note about iPXE errors is that they always gives an url to ipxe.org which when possible gives hints to what is wrong, always read that link, and always post that link when there is issues.


RE: Network Unreachable Error - abkap02 - 2017-07-08 23:44

Hi NiKize,

Thanks for your reply, I appreciate it. I resolved my issue by embedding the following script to my ipxe.iso build:

#!ipxe

dhcp
chain http://<server ip>/script.ipxe

And then configuring script.ipxe as:

#!ipxe

set server_ip <server ip>
set http_path /ubuntu
kernel http://${server_ip}${http_path}/vmlinuz.efi || read void
initrd http://${server_ip}${http_path}/initrd.lz || read void
imgargs vmlinuz.efi initrd=initrd.lz root=/dev/nfs boot=casper netboot=nfs nfsroot=${server_ip}:/nfsroot ip=dhcp splash quiet -- || read void
boot || read void

Besides I also had to download Apache2 on my server to provide vmlinuz.efi and initrd.lz during PXE boot.

My bad, it did give me some ipxe.org/22...... something url during the Network Unreachable error but the page did not provide any useful information on resolving the issue. Just the standard verbiage about making use of the latest version of ipxe and getting back to same page in 24 hours to check for any updates.


RE: Network Unreachable Error - NiKiZe - 2017-07-09 00:07

To have NFS support in iPXE it needs to be enabled at compile time with DOWNLOAD_PROTO_NFS But you already said that the same script worked so I assumed you already had this working? If so I'm not quite sure why you needed Apache, but yes http transfers are recommended, any http server should work, with only a few gotchas.

What was that ipxe.org/22 exactly? To help others it would be great if the page could be extended with useful information for other users.

Also the links to the source code on that page often gives lot's of information. Especially if there is only one link.

Missing NFS support is quite informative already: http://ipxe.org/3c092003
Maybe what you got was http://ipxe.org/280a6011


RE: Network Unreachable Error - abkap02 - 2017-07-09 02:16

Yes I had enabled NFS support during compile time because initially I was getting this "Operation Not Supported" error which was caused due to the same reason so I went through fixing it earlier.

And, I'm sorry it was not ipxe.org/22.... but ipxe.org/280a6011 page for "Network Unreachable" error. My bad, I didn't take a screenshot when I was getting that error and remembered it as 22.......