Not able to TFTP boot. Invalid Argument Error


  • Moderator

    @hancocza OK so we now know how you got here.

    Looking at your picture its making a http call to boot.php. You made reference to using https? You are still at the ipxe prompt so something happened with the chain to boot.php



  • @george1421 Oh, got ya. I don’t call it directly. It first goes to default.ipxe and then from there calls the boot.php


  • Moderator

    @hancocza If you are calling boot.php directly from your usb drive then you are not passing any parameters. That is the problem. If you look at the default.ipxe file in /tftpboot of the FOG server you will see what parameters its passing (like mac address, arch, and so on).

    Just to save you time:

    #!ipxe
    cpuid --ext 29 && set arch x86_64 || set arch ${buildarch}
    params
    param mac0 ${net0/mac}
    param arch ${arch}
    param platform ${platform}
    param product ${product}
    param manufacturer ${product}
    param ipxever ${version}
    param filename ${filename}
    param sysuuid ${uuid}
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
    :bootme
    chain http://192.168.5.22/fog/service/ipxe/boot.php##params
    
    

    [edit] just for clarity thats from FOG 1.5.4. I haven’t installed 1.5.5 into production yet.



  • @george1421 Thanks for that, I’ll look at doing that once I get this up and running again. Once it fails, how can I see what params were passed that might be incorrect? Is there a log file stored anywhere?


  • Moderator

    @hancocza If you look at the github site I referenced this is the ipxe script.

    #!ipxe
    isset ${net0/mac} && ifopen net0 && dhcp net0 || goto dhcpnet1
    echo Received DHCP answer on interface net0 && goto proxycheck
    
    :dhcpnet1
    isset ${net1/mac} && ifopen net1 && dhcp net1 || goto dhcpnet2
    echo Received DHCP answer on interface net1 && goto proxycheck
    
    :dhcpnet2
    isset ${net2/mac} && ifopen net2 && dhcp net2 || goto dhcpall
    echo Received DHCP anser on infterface net2 && goto proxycheck
    
    :dhcpall
    dhcp && goto proxycheck || goto dhcperror
    
    :dhcperror
    prompt --key s --timeout 10000 DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
    
    :proxycheck
    isset ${proxydhcp/next-server} && set next-server ${proxydhcp/next-server} || goto nextservercheck
    
    :nextservercheck
    isset ${next-server} && goto netboot || goto setserv
    
    :setserv
    echo -n Please enter tftp server: && read next-server && goto netboot || goto setserv
    
    :netboot
    chain tftp://${next-server}/default.ipxe ||
    prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
    

    It would be a trivial task to remove the dhcp bits and hard code in the IP address of the FOG server. You would have to recompile the ipxe boot loaders, but it would stop you from having to manually do stuff.

    In your case look at the chain line of the ipxe script it called default.ipxe on the fog server and not boot.php directly. the default.ipxe on the fog server picks up several needed parameters that gets passed to boot.php. Without then boot.php gets lost.



  • @george1421 I made a usb using the easy method in this guide: https://wiki.fogproject.org/wiki/index.php?title=USB_Bootable_Media. I made both a uefi usb as well as a bios mbr usb. The mbr one i made using ISO to USB using an iPXE ISO.

    When using the UEFI USB, the screen in the previous post comes up, where i need to enter in the IP address and then the tftp server does the rest. For the BIOS USB, i need to enter the command line and type in the next-server and the filename. It’s messy, but i rarely use the BIOS USBs now. I’ve tried both and they both gave me the invalid argument.


  • Moderator

    @hancocza the default.ipxe that is compiled into the FOG iPXE boot loader is here: https://github.com/FOGProject/fogproject/blob/master/src/ipxe/src/ipxescript

    Also you will need one boot USB for bios based systems and one for UEFI based systems.


  • Moderator

    @hancocza How are you usb booting? Are you loading iPXE onto a usb? If so, what does your boot time iPXE script (default.ipxe) look like. The FOG iPXE kernels have specific parameters captured and sent to the fog server.



  • @Sebastian-Roth Here’s the picture: http://tinypic.com/r/2lsvh9l/9

    I don’t recall doing that for previous upgrades. I’ll try that! Previously i had to go and edit the default.ipxe file to show chain http://xxx.xxx.xxx.xxx/fog/service/ipxe/boot.php instead of chain https://xxx.xxx.xxx.xxx/fog/service/ipxe/boot.php. I really only use the HTTPS setup for the webserver and fogservice client connection.

    As for dnsmasq, when i first put this server into production, I was told that it would not work within our network. They recommended going the USB route. It was fairly simple to setup the USBs so I never really pursued the alternative.


  • Senior Developer

    @hancocza See if you can upload the picture again.

    I use the HTTPS setup switch for the installer.

    Are you aware of the fact that you need to compile iPXE binaries to be used with a HTTPS enabled FOG server:

    cd /path/to/pogproject/utils/FOGiPXE
    ./buildipxe.sh
    

    Now you might use those for USB booting.

    In order to get around the 066 067 DHCP setup (dont have access to the companies DHCP server), i use a ipxe USB key to point to the fog server.

    Ever thought about using dnsmasq?


Log in to reply
 

313
Online

7.1k
Users

14.3k
Topics

135.1k
Posts