Fog 0.33b edit PXE menu
-
i feel i should point out that yesterday Tom and I came up with an idea and added it to the advanced.php file.
[CODE]print “set fog-ip “.$FOGCore->getSetting(‘FOG_WEB_HOST’).”\n”;
print “set fog-webroot “.basename($FOGCore->getSetting(‘FOG_WEB_ROOT’)).”\n”;
[/CODE]
have been added so that you may use the ipxe variables “fog-ip” and “fog-webroot” for the creation of menus. here is a usable example that you should be able to paste into your advanced menu setting field without modification.
[CODE]:MENU
menu
item --gap – ---------------- iPXE boot menu ----------------
item ipxedemo ipxe online boot demo
item shell ipxe shell
item return return to previous menu
choose --default return --timeout 5000 target && goto ${target}:ipxedemo
chain http://boot.ipxe.org/demo/boot.php ||
goto MENU:shell
shell ||
goto MENU:return
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
prompt
goto MENUautoboot[/CODE]
-
here is an example of a menu for loading WinPE based ISO disks from a folder named ISO in the root of the web server
[CODE]:MENU
menu
item --gap – ---------------- iPXE boot menu ----------------
item WIN7PE64BIT Boot Windows 7 64 bit iso
item WIN7PE32BIT Boot Windows 7 32 bit iso
item shell ipxe shell
item return return to previous menu
choose --default WIN7PE64BIT --timeout 5000 target && goto ${target}:WIN7PE64BIT
initrd http://${fog-ip}/ISO/Win7PE_x64.ISO
chain memdisk iso raw ||
goto MENU:WIN7PE32BIT
initrd http://${fog-ip}/ISO/Win7PE_x86.ISO
chain memdisk iso raw ||
goto MENU:ipxedemo
chain http://boot.ipxe.org/demo/boot.php ||
goto MENU:shell
shell ||
goto MENU:return
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
prompt
goto MENUautoboot[/CODE]
-
My only regret is that I can only give a post one ‘like’.
-
a bunch of people liked those, so i’ll give you one more just to show more with ipxe
[CODE]
:MENU
menu
item --gap – ---------------- iPXE boot menu ----------------
item ipxedemo ipxe online boot demo
item shell ipxe shell
item return return to previous menu
item hostinfo details about this computer
choose --default return --timeout 5000 target && goto ${target}:ipxedemo
chain http://boot.ipxe.org/demo/boot.php ||
goto MENU:shell
shell ||
goto MENU:return
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
prompt
goto MENU:hostinfo
echo This computer : ||
echo MAC address…${net0/mac} ||
echo IP address…${ip} ||
echo Netmask…${netmask} ||
echo Serial…${serial} ||
echo Asset number…${asset} ||
echo Manufacturer…${manufacturer} ||
echo Product…${product} ||
echo BIOS platform…${platform} ||
echo ||
echo press any key to return to Menu ||
prompt
goto MENUautoboot
[/CODE] -
Could someone do an entry for GParted? The [URL=‘http://www.fogproject.org/wiki/index.php?title=Include_GParted’]Include Gparted[/URL] wiki page is out of date now and I can’t get the ISO to boot properly using the methods above.
I get as far as the GParted grub menu but once I try to boot to gparted, I get pages of
[CODE]modprobe: module unknown not found in modules.dep[/CODE]
followed by a blackscreen.iPXE menu entry below
[CODE]:gparted
initrd http://${fog-ip}/ISO/gparted-live-0.18.0-2-i486.iso
chain memdisk iso raw ||
goto MENU[/CODE]I found this which appears to be the same issue (a memdisk issue) but I am not sure how to implement the fix.
[url]http://gparted-forum.surf4.info/viewtopic.php?id=16884[/url] -
UPDATE; I got it working.
I copied vmlinuz, initrd.img and filesystem.squashfs from gparted into /var/www/fog/gparted/
and then updated my iPXE menu as follows:kernel http://${fog-ip}/fog/gparted/vmlinuz
initrd http://${fog-ip}/fog/gparted/initrd.img
imgargs vmlinuz boot=live config union=aufs noswap noprompt vga=788 fetch=http://${fog-ip}/fog/gparted/filesystem.squashfs
boot[/CODE]All tested and working now.
-
Hi!
To contribute a little, here is my advanced menu:
[CODE]# Chemin de boot de FOG
set boot_url http://${fog-ip}/fog_boot/
set boot_nfs ${fog-ip}:/images/fog_boot/Détection de l’architecture
isset ${arch} && goto skip_arch_detect ||
cpuid --ext 29 && set arch x86_64 || set arch i386
:skip_arch_detect:MENU
menu
item --gap – --------------------- Outils ---------------------
item SystemRescueCD Lancer SystemRescueCD (${arch})
item --gap –
item Debian Installer Debian Stable
item WS2008R2 Installer Windows Server 2008R2
item WS2012R2 Installer Windows Server 2012R2
#item --gap –
#item lubuntu32 Lubuntu 14.04 LTS (32 bits)
item --gap –
item retour Retouner au menu principal
choose --default SystemRescueCD --timeout 10000 target && goto ${target}:SystemRescueCD
initrd ${boot_url}sysrescuecd/initram.igz
kernel ${boot_url}sysrescuecd/rescue_${arch} scandelay=1 dostartx docache nfsboot=${boot_nfs}sysrescuecd/ setkmap=fr
boot
goto MENU:Debian
#set dir ${dir}${menu}-installer/${arch_a}/
imgfree
kernel http://ftp.fr.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux priority=low ${desktop_param} – quiet ${params}
initrd http://ftp.fr.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
boot:WS2008R2
sanboot ${boot_url}discimg/WS2008R2.iso
goto MENU:WS2012R2
sanboot ${boot_url}discimg/WS20128R2.iso
goto MENU:precedent
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
prompt
goto MENUautoboot[/CODE]
-
where must i copy the iso files?
Grezz
-
to whatever location you specified in the menu
-
okay. i saved the iso under var/www/fog/Win7AIO/WindowsAIO.iso. but it doesnt work.
:MENU
menu
item --gap – ---------------- iPXE boot menu ----------------
item WIN7PE64BIT Boot Windows 7 64 bit iso
item WIN7PE32BIT Boot Windows 7 32 bit iso
item shell ipxe shell
item return return to previous menu
choose --default WIN7PE64BIT --timeout 5000 target && goto ${target}:WIN7PE64BIT
initrd var/www/fog/Win7AIO/WindowsAIO.iso
chain memdisk iso raw ||
goto MENU:WIN7PE32BIT
initrd [url]http://${fog-ip}/ISO/Win7PE_x86.ISO[/url]
chain memdisk iso raw ||
goto MENU:ipxedemo
chain [url]http://boot.ipxe.org/demo/boot.php[/url] ||
goto MENU:shell
shell ||
goto MENU:return
chain [url]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac}[/url] ||
prompt
goto MENUautoboot
-
pls help
-
The client doesn’t understand paths on the fog server, only http paths.
:WIN7PE64BIT
initrd var/www/fog/Win7AIO/WindowsAIO.iso
chain memdisk iso raw ||
goto MENUNeeds to be
:WIN7PE64BIT
initrd [URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${fog-ip}/${fog-webroot}[/URL]/Win7AIO/WindowsAIO.iso
chain memdisk iso raw ||
goto MENUOR
:WIN7PE64BIT
initrd [URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${fog-ip}/fog[/URL]/Win7AIO/WindowsAIO.iso
chain memdisk iso raw ||
goto MENUBoth should tell the client to look in the same place, although the first form is preferable.
If this fails check your apache log, it will tell you where i is looking for the iso.
-
okay thx, where i find the apache log?
-
The log location is os dependent,
Debian based Location (normally)
/var/log/apache2
Redhat based Location (normally)
/var/log/httpdthere are 2 logs, access.log and error.log.
The messages you need will probably be in the access log, search for WindowsAIO.iso starting at the end, you should see a status 404, which says not found
You can test by typing the following in to your browser[URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://<fog_ip_address>/fog[/URL]/Win7AIO/WindowsAIO.iso
replacing <fog_ip_address> with your fog server ip.eg
[URL=‘http://$%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://192.168.3.11/fog[/URL]/Win7AIO/WindowsAIO.iso -
my fog ip is 192.168.2.100
is this correct? [URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${fog-ip}/${fog-webroot}[/URL]/Win7AIO/WindowsAIO.iso
or [URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]http://${192.168.2.100}/${fog-webroot}[/URL]/Win7AIO/WindowsAIO.iso
-
the first of those two is correct, assuming that you have that file located in /var/www/fog/Win7AIO/WindowsAIO.iso
[URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]${fog-ip}[/URL] is a variable set to your server’s IP, in your case “fog”
[URL=‘http://%24%7Bfog-ip%7D/$%7Bfog-webroot%7D/service/ipxe/boot.php?mac=$%7Bnet0/mac%7D’]${fog-webroot}[/URL] is a variable set to the root of your fog installation, in your case “192.168.2.100” -
when i type [url]http://192.168.2.100/ISO/Windows8x64.iso[/url] it will start the download…i think it work but in the fog menu it goes direclty back to the menu.
-
if you paste your advanced menu code here, i will help you troubleshoot it
please use the “code” format button when doing so. -
menu
item --gap – ---------------- iPXE boot menu ----------------
item WIN7PE64BIT Boot Windows 7 64 bit iso
item WIN7PE32BIT Boot Windows 7 32 bit iso
item shell ipxe shell
item return return to previous menu
choose --default WIN7PE64BIT --timeout 5000 target && goto ${target}:WIN7PE64BIT
initrd http://${fog-ip}/${fog-webroot}/fog/ISO/Windows8x64.iso
chain memdisk iso raw ||
goto MENU:WIN7PE32BIT
initrd http://${fog-ip}/ISO/Windows8x64.iso
chain memdisk iso raw ||
goto MENU:ipxedemo
chain http://boot.ipxe.org/demo/boot.php ||
goto MENU:shell
shell ||
goto MENU:return
chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
prompt
goto MENUautoboot[/CODE]
apache error.log
[Wed May 28 16:41:23 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:41:28 2014] [error] [client 192.168.2.22] File does not exist: /var/www/ISO/Windows8x64.iso
[Wed May 28 16:41:58 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:42:01 2014] [error] [client 192.168.2.22] File does not exist: /var/www/ISO/Windows8x64.iso
[Wed May 28 16:43:47 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:44:23 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog[url=“/_imported_xf_attachments/0/840_Unbenannt.jpg?:”]Unbenannt.jpg[/url]
-
omg… if the file is @ /var/www/ISO the fog search @ /var/www/fog/ISO
and if the file is at /var/www/fog/ISO the fog search @ /var/www/ISO
[Wed May 28 16:41:23 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:41:28 2014] [error] [client 192.168.2.22] File does not exist: /var/www/ISO/Windows8x64.iso
[Wed May 28 16:41:58 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:42:01 2014] [error] [client 192.168.2.22] File does not exist: /var/www/ISO/Windows8x64.iso
[Wed May 28 16:43:47 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:44:23 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:50:13 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/ISO/Windows8x64.iso
[Wed May 28 16:50:20 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/ISO/Windows8x64.iso
[Wed May 28 16:51:04 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/ISO/Windows8x64.iso
[Wed May 28 16:53:16 2014] [error] [client 192.168.2.22] File does not exist: /var/www/ISO/Windows8x64.iso
[Wed May 28 16:53:19 2014] [error] [client 192.168.2.22] File does not exist: /var/www/ISO/Windows8x64.iso
[Wed May 28 16:55:45 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:58:19 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/fog
[Wed May 28 16:58:23 2014] [error] [client 192.168.2.22] File does not exist: /var/www/fog/ISO/Windows8x64.iso