[ipxe-devel] iPXE and booting ISOs over the network

Bob Gustafson bobgus at rcn.com
Fri Jun 12 17:23:14 UTC 2020


Here are a few fragments of an ansible playbook file (simple.yml) which 
does part of what you want to do:

If the command lines are puzzling, you can get more information from 
ansible-doc as in:

$ ansible-doc shell     or    $ ansible-doc register    or  $ 
ansible-doc debug

Ansible commands generally are written by different developers and they 
have individualistic naming conventions.

However, Ansible is a decent tool among a collection of fair to middling 
configuration tools.


# ===== http.server

   - name: test running of http.server
     command: pgrep -f http.server
     ignore_errors: yes
     changed_when: false
     register: http_pid # used to restart server if necessary

   - name: start simple http server in background w port 8000
     become: no   # If you do port 80, then need to run as root
#   shell: cd {{ des_path }}; nohup python -m http.server 80 \
     shell: cd {{ des_path }}; nohup python -m http.server \
              --bind 192.168.50.60  &
#            --directory /home/user1/Downloads/Atomic
#     The cd in front of nohup python sets the home directory
     when: http_pid.stdout == ""

   - name: get pid of http.server
     shell: pgrep -f http.server
     ignore_errors: yes
     changed_when: false
     register: http_pid

   - debug:
       var: http_pid.stdout

On 6/12/20 9:48 AM, IT1 Stuart Blake Tener, USNR wrote:
>
> List members,
>
> I have done a number of web searches and am interested in gaining some 
> insights into what choices I have in implementing iPXE to boot ISO 
> files directly (I have read several postings that were 6 to 10 years 
> old in this area but no code was really given just oh I did this, I 
> did that). I had asked in an IRC channel a while ago (they are so 
> useless, people ignoring your question and trying to find a different 
> question you should be asking because that is what they can answer), 
> and got a bunch of discouraging replies. A huge discussion ensued 
> having nothing to do with what I had originally asked, and I abandoned 
> obtaining any help there.
>
> I'd like to setup a server (as a virtual machine for portability, but 
> would be fine starting as a physical server to decrease complication) 
> with a singular purpose of providing iPXE/PXE booting services on my 
> home lab network. I'd like to be able to have a directory or that into 
> which I can plop an ISO file and then have some sort of menu generated 
> on the fly that notices all ISOs in that directory and offers a menu 
> that is presented whence someone boots iPXE/PXE via the network. I'd 
> also like to have a sub-menu of permanent ISO choices with 
> descriptions that can be selected from as well. It is my understanding 
> that iPXE/PXE can do this quite easily, but then I was given a ton of 
> reasons on the IRC why it would not work so I gave up in frustration 
> trying to sort "IRC wheat from IRC chaff".
>
> My thought is to create a private 192.168.100.0/24 network in this 
> environment I propose, and for the server to have TFTP, DNS, and 
> whatever else is requisite installed there within. I think I'd like to 
> use Debian to do it, but am open to whatever distribution people think 
> will make this most easiest.
>
> Thanks in advance and I hope everyone stays safe from looting thugs 
> and healthy from the pandemic.
>
>
> Very Respectfully,
>
> Stuart
>
>
>
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo/ipxe-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20200612/99b79090/attachment.htm>


More information about the ipxe-devel mailing list