iPXE discussion forum
iPXE HTTP boot using PHP - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: iPXE HTTP boot using PHP (/showthread.php?tid=21102)

iPXE HTTP boot using PHP - darkoni - 2019-11-18 00:02


* I am trying to load Fedora 30 over http, so I ran a php server

$ php -S

* I put an ipxe.usb on a usb stick

$ wget http://boot.ipxe.org/ipxe.usb
$ dd if=bin/ipxe.usb of=/dev/sdb

* then booted up virtualbox from the usb stick

* manually typed to iPXE

iPXE> chain

* I got an output from the php server:

[Sun Nov 17 19:16:10 2019] [200]: /boot.php
[Sun Nov 17 19:16:10 2019] [200]: /Fedora30/pxeboot/vmlinuz
[Sun Nov 17 19:16:10 2019] [200]: /Fedora30/pxeboot/initrd.img
[Sun Nov 17 19:16:28 2019] [200]: /Fedora30/install.img/.treeinfo

* and then it all stoped - as i do not have the file .treeinfo

* content of boot.php is:


set base

kernel ${base}/pxeboot/vmlinuz stage2=${base}/install.img
initrd ${base}/pxeboot/initrd.img


# end of boot.php

* Fedora files are downloaded from archives.fedoraproject.org

$ wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Workstation/x86_64/os/images/boot.iso
$ wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Workstation/x86_64/os/images/efiboot.img
$ wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Workstation/x86_64/os/images/install.img
$ wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Workstation/x86_64/os/images/macboot.img

$ mkdir -p pxeboot
$ cd pxeboot

$ wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Workstation/x86_64/os/images/pxeboot/initrd.img
$ wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Workstation/x86_64/os/images/pxeboot/vmlinuz

$ tree
├── boot.iso
├── efiboot.img
├── install.img
├── macboot.img
├── pxeboot
├── initrd.img
   └── vmlinuz

* I probably downloaded something wrong as the boot process is not all clear to me

* please, can someone help me get the iPXE boot to work

Many thanks!


RE: iPXE HTTP boot using PHP - darkoni - 2019-11-19 23:16

Hi everyone !

If you take a look for the chain command


you can see

chain http://boot.ipxe.org/demo/boot.php

and you can download content of http://boot.ipxe.org/demo/boot.php to see what is inside Smile


kernel vmlinuz-3.16.0-rc4 bootfile=http://boot.ipxe.org/demo/boot.php fastboot initrd=initrd.img
initrd initrd.img

and you can also try to see if there is any content on


There is !!! Also for Fedora :-)



prompt -k 0x197e -t 2000 Press F12 to install Fedora... || exit

set base http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/images

kernel ${base}/pxeboot/vmlinuz stage2=${base}/install.img
initrd ${base}/pxeboot/initrd.img

Then I wget the mentioned files to my local machine

wget ${base}/pxeboot/vmlinuz
wget ${base}/install.img
wget ${base}/pxeboot/initrd.img

and rewrite boot.php


set base
kernel ${base}/vmlinuz inst.stage2=${base}/install.img
initrd ${base}/initrd.img

And everything works !!!

Filesystem is loaded from install.img !!!

It works !!!

PS: why is there no mention of the argument inst.stage2 in documentation ?


If you just write the argument stage2= - it doesn't work...

Please, can you mention the argument inst.stage2 in the documentation ?

PPS: tommorow I will try to run Fedora 30 Live in this way, so stay in touch :-)


RE: iPXE HTTP boot using PHP - cckp - 2019-11-20 06:18

(2019-11-19 23:16)darkoni Wrote:  ... mention the argument inst.stage2 in the documentation ?

each system has it's own kernel parameter, why bother mention one?