Advanced Menu with option No Menu
-
I created a Advanced Menu through FOG Configuration -> iPXE Menu Settings -> Advanced Menu Settings
But i only want to be able to access the menu when a host is not registered.But with the option No Menu in General Configuration activated when i try to access the Advanced Menu from the main Menu it boots directly from the Hard Drive.
I’m a noob in php but i think i found the file that needs editing: /var/www/fog/lib/fog/bootmenu.class.php
But i have not found the section that needs editing.
Here is my custom menu:
:MENU menu colour --rgb 0xff0000 0 || cpair --foreground 1 1 || cpair --foreground 0 3 || cpair --foreground 4 4 || item --gap Admin Menu item --gap -- ------------------------------------- item fog.local Starte von Festplatte wenn keine Auswahl... item fog.memtest Memtest86+ item Gparted Gparted Live item fog.sysinfo Client System Information (Kompatibel-Check) item fog.return <- Hauptmenu :fog.local sanboot --no-describe --drive 0x80 || goto MENU :fog.memtest kernel memdisk initrd=memtest.bin iso raw initrd memtest.bin boot || goto MENU :Gparted kernel http://${fog-ip}/html/iso/gparted/live/vmlinuz vmlinuz boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=${fog-ip}/html/iso/gparted/live/filesystem.squashfs initrd http://${fog-ip}/html/iso/gparted/live/initrd.img boot || goto MENU :fog.sysinfo kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=275000 web=http://10.10.0.20/fog/ consoleblank=0 rootfstype=ext4 storage=10.10.0.20:/images/ storageip=10.10.0.20 loglevel=4 mode=sysinfo imgfetch init_32.xz boot || goto MENU :fog.return chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} || prompt goto MENU
-
@kek Sorry for the long delay but I had to find the time to think this through as I have not played with that menu stuff in a while.
But i only want to be able to access the menu when a host is not registered.
If I don’t get you wrong here I think you might just want to use it in a different way to get what you want. Don’t put those options all in an advanced menu section but split it all into separate ones and set Menu Show with to “Not Registered Hosts”. That way only unregistered hosts will see those entries in the menu.
-
@Sebastian-Roth Thank you for your help, sorry for the late reply was very busy in the last weeks.
I managed it with turning on/off the no menu option.