PBX booting ?

Discussion in 'Computing and Networks' started by Mathematics!, Apr 8, 2010.

  1. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    Ok , have seen in my bios the option to enable PBX network booting.
    So I turned it on. But what do I have to do to get this to work?

    I mean it's turned on in the bios. I have another server that has ftp service running on it.

    Do I need to install special software on this server ?
    How do I tell the client where the boot file is located on this server.
    Is their a special format that I must have for my boot file ?

    Curious if anybody got this stuff to work ?

  2. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    I've not used a PXE setup in years...

    As far as I remember, you have to create a bootable floppy disk for the machine you wish to boot, then save an image of that disk on a tftp server running on the machine that's handling dhcp.
    (tftp = trivial ftp, a cut-down version of FTP).

    The boot image file has to be advertised in the bootp/dhcp server config, so when the machine that's booting gets it's IP address it's also told what file to use to boot up.

    Just has a dig, this is an example dhcp.conf file for a pxe boot setup:

    Code ( (Unknown Language)):
    1. [FONT=monospace]ddns-update-style interim;[/FONT]
    2.  [FONT=monospace] subnet netmask {[/FONT]
    3.  [FONT=monospace] range;[/FONT]
    4.  [FONT=monospace] default-lease-time 3600;[/FONT]
    5.  [FONT=monospace] max-lease-time 4800;[/FONT]
    6.  [FONT=monospace] option routers;[/FONT]
    7.  [FONT=monospace] option domain-name-servers;[/FONT]
    8.  [FONT=monospace] option subnet-mask;[/FONT]
    9.  [FONT=monospace] option domain-name "llama.net";[/FONT]
    10.  [FONT=monospace] option time-offset -8;[/FONT]
    11.  [FONT=monospace] }[/FONT]
    13.  [FONT=monospace] host llama0 {[/FONT]
    14.  [FONT=monospace] hardware ethernet 04:4B:80:80:80:03;[/FONT]
    15.  [FONT=monospace] fixed-address;[/FONT]
    16.  [FONT=monospace] option host-name "llama0";[/FONT]
    17.  [FONT=monospace] filename "pxelinux.0";[/FONT]
    18.  [FONT=monospace] }[/FONT]
    That obviously needs adjusting to match your network and the actual DHCP server in use.
    The first block is the general network/dhcp config, the second block is the config for one specific client machine, matched by it's mac address. In that example, the client would load the image file 'pxelinux.0'.

    The boot files would typically go in the /tftpboot dircetory on the server.

    The boot floppy (image) has to be set up so it either just boots into dos, or loads the main operating system from an FTP server.
  3. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    Ok , I got you
    But say I have a linux distro live cd like knoppix.
    Does it matter what file format for PBX booting.

    Like in your example it is a .0 file extension but can I use a .iso
    Or is this strictly the boot code and not the actually whole cd file format

    If it is not the whole iso file format then I am sure I can find some extractor tools to extract the boot code from the cd/dvd image.

    Thanks for the code snippet I am probably going to use/modify it.
    Curious what Os was the server on . Windows , Linux , Unix ,....etc ??

    Thanks again
  4. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    The PXE system appears to emulate booting from a floppy disk, as far as I am aware the disk image has to then load the final operating system.

    That config file is from an old Redhat/Fedora/Centos type linux system.

    I'm going to have a play, see if I can get it going myself. I've been meaning to set a system up for testing for a while but never got around to it..

    OK, that pxelinux.0 file is actually a bootloader which then has a config file telling it which file to feed to the machine that is booting.
    Last edited: Apr 9, 2010
  5. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    Ok , so the pxelinux.0 file is a bootloader file on the tftp server which when the client gets assigned an ip from the DHCP. It also uses this pxelinux.0 file to boot the os and the os is contained on the servers harddrive but the pxelinux.0 bootloader file contains the information on where the os image is on the harddrive. So the Bios throws the pxelinux.0 file into memory starting at 0x7c00 jmps to it then this small bootloader contains the info on where the os image is loads that and jmps to it.

    I am just curious if that is what is happening then how do you tell the bootloader program where the os image is?

    Anyway my other question was
    I came across some options on my NIC card that I am curious about.
    WakeONLAN they say you send a magic packet to wake up your computer ,...etc

    I am just wondering if I turn this on what I have to send to my nic to get the computer to wake up.
    And weather I can use this magic packet stuff to not only wake up my computer but turn it on from a remote place?

  6. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    There is a config file on the server that tells pxelinux what bootable file is sent to each client.

    The wake-up sequence is something like the machine's own IP address or mac address, sent to it 16 times?
    As it has to be directed to that specific lan adapter & without any handshake etc., I don't know if it would be possible to send it from outside the local subnet.
  7. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    Ok , cool and I found out that wake on lan can turn a computer on from it being completely off. On the Lan and even over the internet if you use port forwarding this is the site if your interested

    They allow you to set the port but default looks like 7.

    Anyway I am wondering if it would work if I used wake on lan to turn on the computer remotely and then used PXE to load the machine with an Os
    That would be cool.

    Unfortunately I don't have the resources/time to set it up now.

    But if your doing something like this let me know how it turns out

    Thanks for the help.
    When I get the time I will try it my self and get back to you ... won't be for a while.

  8. rjenkins

    AAC Fanatic!

    Nov 6, 2005

    I *think* wake-on-lan can only bring a machine out of sleep mode, it's got to have been booted up then have gone into standby.

    Bur, I'm not certain either way.
  9. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    That's not what I have been reading but if thats the case then it really isn't that cool.

    My link seems to portray it as you can turn on your computer from it being completely off.

    Either way I have just found that in my bios you can set times on when the computer should turn it self on. Which is kind of a cool feature to have.
  10. retched

    AAC Fanatic!

    Dec 5, 2009
    Lan cards with the option, can "press the power button" for you. If the motherboard and bios support it, the wake-on-lan device is powered from the motherboard even thought the computer is shut down (this includes sleep, hiberate, and shut-down) The nic card looks for a packet of special construct, that can be sent from internet or lan, to power the computer back up.

    Typically wake-on-lan is preset before power off to save the state of the PC to RAM or harddrive (dependent on level of sleep or shut-down) This is what the speed of "waking" depends on.
  11. Oliver14

    New Member

    Mar 12, 2012
    Maybe you will find some necessary information about booting problems on a fresh PBX page: windowspbxguru.com. There you can find not just useful guides for programmers but also for users and others. Detailed descriptions about how to build, install PBXs and many useful tips, articles are written here in a very friendly way. If you're interested in it, visit it.