Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
soc:2009:pravin:journal:pxekniferomomatic [2009/06/04 10:22] less1 |
soc:2009:pravin:journal:pxekniferomomatic [2009/06/04 10:26] less1 |
||
---|---|---|---|
Line 15: | Line 15: | ||
I have modified it to compile with embedded image by modifying above code with | I have modified it to compile with embedded image by modifying above code with | ||
<code> | <code> | ||
- | make -C '$dir' EMBEDDED_IMAGE=./pxeDHCP.gpxe '$target' | + | make -C '$dir' EMBEDDED_IMAGE=./pxeDHCP.gpxe,./pxeSTATIC.gpxe '$target' |
</code> | </code> | ||
Line 37: | Line 37: | ||
echo "PxeKnife booting cancelled, using local disk instead.." | echo "PxeKnife booting cancelled, using local disk instead.." | ||
</code> | </code> | ||
+ | and //./pxeSTATIC.gpxe// contains following script. | ||
+ | <code> | ||
+ | #!gpxe | ||
+ | echo "As you dont have DHCP, you need to give details about network configuration" | ||
+ | echo "Soon, you will be presented with interface to provide details about network configuration" | ||
+ | echo "Please provide, IP address, Netmask, Gateway and Router" | ||
+ | ifopen net0 | ||
+ | set net0/ip 10.0.2.15 | ||
+ | set net0/netmask 255.255.255.0 | ||
+ | set net0/gateway 10.0.2.2 | ||
+ | set net0/dns 10.0.2.3 | ||
+ | sleep 3 | ||
+ | config | ||
+ | set 209:string pxelinux.cfg/default | ||
+ | set 210:string http://www.alien.doesntexist.org/pxeknife/ | ||
+ | echo "Here we go" | ||
+ | chain http://www.alien.doesntexist.org/pxeknife/pxelinux.0 | ||
+ | echo "PxeKnife booting cancelled, using local disk instead.." | ||
+ | </code> | ||
+ | |||
+ | |||
The code is hosted at url [[http://www.alien.doesntexist.org/pxeknife/PHP/gpxe_generation/]] | The code is hosted at url [[http://www.alien.doesntexist.org/pxeknife/PHP/gpxe_generation/]] | ||
- | ===== Problems ===== | + | ===== Problems (solved) ===== |
When I boot using qemu with following command | When I boot using qemu with following command | ||
Line 70: | Line 91: | ||
When DHCP fails, static will pick up and continue execution. | When DHCP fails, static will pick up and continue execution. | ||
- | ==== Problem ==== | + | ==== Problem (solved) ==== |
Second script is not getting executed. | Second script is not getting executed. | ||
I had to load the second script from first script using imgload | I had to load the second script from first script using imgload | ||
Line 95: | Line 116: | ||
<code> | <code> | ||
- | rc = 0; | + | rc = 0; |
done: | done: | ||
- | /* Re-register image and return */ | + | /* Re-register image and return */ |
- | register_image ( image ); /* commented so that next one will be executed -- pravin */ | + | register_image ( image ); /* commented so that next one will be executed -- pravin */ |
- | return rc; | + | return rc; |
} | } | ||
</code> | </code> | ||