1

I'm trying to provision Ubuntu 16.04 to a soekris net6501 via foreman. The process itself actually now works quite well.

One thing that doesn't quite do what we want is the step after provisioning. The idea is to be able to deploy a new image/OS to the box at any stage, and have it try to PXE boot by default, and move on to local disk if PXE doesn't happen.

So, when foreman is set to build the host PXE booting works fine (after a bit of tweaking and experimentation), but on the first reboot after the provisioning is done the machine just hangs.

PXE-M0F: Exiting Intel Boot Agent.

If I change the BIOS to prefer the local disk all is well. But that's not what I want; some machines will be in a data centre, and waddling there with a laptop to play with the serial console is undesirable.

[edit 1 below]

Snippet from the foreman log:

14:45:38 foreman dhcpd: DHCPDISCOVER from 00:00:24:d2:05:bc via eth1
14:45:38 foreman dhcpd: DHCPOFFER on 192.168.0.4 to 00:00:24:d2:05:bc via eth1
14:45:42 foreman dhcpd: Dynamic and static leases present for 192.168.0.4.
14:45:42 foreman dhcpd: Remove host declaration testkris or remove 192.168.0.4
14:45:42 foreman dhcpd: from the dynamic address pool for 192.168.0.0/23
14:45:42 foreman dhcpd: DHCPREQUEST for 192.168.0.4 (192.168.0.1) from 00:00:24:d2:05:bc via eth1
14:45:42 foreman dhcpd: DHCPACK on 192.168.0.4 to 00:00:24:d2:05:bc via eth1
14:45:43 foreman in.tftpd[15186]: tftp: client does not accept options

And the PXE.cfg for the machine:

SERIAL 0 19200 0
CONSOLE 0
DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
     MENU LABEL (local)
     MENU DEFAULT
     LOCALBOOT 0

[edit 2 below] (output garbled, tried to clean up escape sequences as best as I could):

 Intel(R) Boot Agent GE v1.3.72
 Copyright (C) 1997-2010, Intel Corporation

 Initializing and establishing link...                                          
                                     CLIENT MAC ADDR: 00 00 24 D2 05     BC  
 DHCP..                                                                         
      CLIENT IP: 192.168.0.4  MASK: 255.255.254.0  DHCP IP: 192.168.0.1
 GATEWAY IP: 192.168.0.1 

TFTP.                                                                           
    TFTP.                                                                       
        !PXE entry point found (we hope) at 95D2:0106 via plan AUNDI code segment at 95D2 len 5210UNDI data segment at 8F97 len 63 Getting cached packet  01 02 03My IP address seems to be C0A80004 192.168.0.4ip=192.168.0.4:192.168.0.1:192.168.0.1:255.255.254.0BOOTIF=01-00-00-24-d2-05-bcTFTP prefix: Trying to load: pxelinux.cfg/01-00-00-24-d2-05-bc                   ok
 PXELINUX 4.05 20140113  Copyright (C) 1994-2011 H. Peter Anvin et al
 @lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx^O
PXE Menu                         
          tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
          x (local)                                                  x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          x                                                          x
          mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

                          Press [Tab] to edit options

                         Automatic boot in 1 second...




PXE-M0F: Exiting Intel Boot Agent.

And then it just sits there.

tink
  • 1,031

1 Answers1

0

By trial and error I've learned that using the LOCALBOOT 0 command doesn't work on all hardware.

You need to have different disk boot commands for different hardware. Read more about hardware compatibility problems on syslinux wiki: http://www.syslinux.org/wiki/index.php?title=Hardware_Compatibility#LOCALBOOT

Here are the 3 different "hard disk" boot commands we use, and there is no one command works on all hardware.

KERNEL chain.c32
APPEND hd0

LOCALBOOT 0

LOCALBOOT -1

Also another thing I've experienced that not all syslinux versions work equally well. So try different releases and see which best fit your HW.

Raboo
  • 143