Fog Menu loop
-
@Rebelman One last thing I forgot earlier. Please open this URL in your browser and post the full output here: http://10.254.1.20/fog/service/ipxe/boot.php?menuAccess=1
-
@Sebastian-Roth
Yes, I only have it booting to one FOG server, the picture shows the UEFI boot screen.For as long as I have had FOG running, I’ve always had to press escape to get into the menu. I’ve never marked it to be hidden, at least not intentionally.
This is the link for the bootmenu.class.php file
BootmenuThis is my menuAccess info you are also wanting.
#!ipxe set fog-ip 10.254.1.20 set fog-webroot fog set boot-url http://${fog-ip}/${fog-webroot} cpuid --ext 29 && set arch x86_64 || set arch i386 goto get_console :console_set colour --rgb 0x00567a 1 || colour --rgb 0x00567a 2 || colour --rgb 0x00567a 4 || cpair --foreground 7 --background 2 2 || goto MENU :alt_console cpair --background 0 1 || cpair --background 1 2 || goto MENU :get_console console --picture http://10.254.1.20/fog/service/ipxe/bg.png --left 100 --right 80 && goto console_set || goto alt_console :MENU menu colour --rgb 0xff0000 0 || cpair --foreground 1 1 || cpair --foreground 0 3 || cpair --foreground 4 4 || item --gap Host is NOT registered! item --gap -- ------------------------------------- item fog.local Boot from hard disk item fog.memtest Run Memtest86+ item fog.reginput Perform Full Host Registration and Inventory item fog.reg Quick Registration and Inventory item fog.deployimage Deploy Image item fog.multijoin Join Multicast Session item fog.sysinfo Client System Information (Compatibility) choose --default fog.local --timeout 0 target && goto ${target} :fog.local sanboot --no-describe --drive 0x80 || goto MENU :fog.memtest kernel memdisk initrd=init.xz iso raw initrd init.xz boot || goto MENU :fog.reginput kernel loglevel=4 initrd=30 root=/dev/ram0 rw ramdisk_size=127000 web=http://10.254.1.20/fog/ consoleblank=0 rootfstype=ext4 storage=10.254.1.20:/images/ storageip=10.254.1.20 loglevel=4 mode=manreg imgfetch 30 boot || goto MENU :fog.reg kernel loglevel=4 initrd=30 root=/dev/ram0 rw ramdisk_size=127000 web=http://10.254.1.20/fog/ consoleblank=0 rootfstype=ext4 storage=10.254.1.20:/images/ storageip=10.254.1.20 loglevel=4 mode=autoreg imgfetch 30 boot || goto MENU :fog.deployimage login params param mac0 ${net0/mac} param arch ${arch} param username ${username} param password ${password} param qihost 1 isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme param sysuuid ${uuid} :fog.multijoin login params param mac0 ${net0/mac} param arch ${arch} param username ${username} param password ${password} param sessionJoin 1 isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme param sysuuid ${uuid} :fog.sysinfo kernel loglevel=4 initrd=30 root=/dev/ram0 rw ramdisk_size=127000 web=http://10.254.1.20/fog/ consoleblank=0 rootfstype=ext4 storage=10.254.1.20:/images/ storageip=10.254.1.20 loglevel=4 mode=sysinfo imgfetch 30 boot || goto MENU :bootme chain -ar http://10.254.1.20/fog/service/ipxe/boot.php##params || goto MENU autoboot
And finally no, I don’t have any other models per say I have different machines I can test, we just bought a batch of computers for a new lab and all are the same model and specs. I can try to upgrade the firmware and see if that makes a difference.
-
@Rebelman Lets take a divide an concur approach here.
Lets assume the upgrade did not go as expected. This will be part 1
- From the linux console change to /var/www
- If there is a fog directory there rename it to fog.old.
- Change to /var/www/html
- If there is a
fog
directory there rename it to fog.old - Change to the directory where you downloaded the fog installer. Depending on which instructions it might be
/root/fogproject
- Change to the bin directory and rerun the fog installer. The fog installer should not ask the questions over again since it should have detected the settings from the previous install. That will rebuild the entire web ui fog directory. Don’t skip the part about updating the database instructions in the linux console. You will need to use a web browser and key in the url listed on the web console.
- Reboot the fog server after the reinstall is done.
Now test the fog menu. You should see the fog menu without having to hit escape. There is no negative impact of doing this step.
-
@Rebelman I am ob the road and can’t post a long answer right now. Looking at the boot.php output you posted I already see that there seems to be an issue with the iPXE code generated. I will have a closer look when I get home tonight.
-
@Rebelman said in Fog Menu loop:
s
What’s the output of mysql statement:
SELECT settingKey,settingValue FROM globalSettings WHERE settingKey IN ('FOG_EFI_BOOT_EXIT_TYPE','FOG_KERNEL_ARGS','FOG_KERNEL_DEBUG','FOG_KERNEL_LOGLEVEL','FOG_KERNEL_RAMDISK_SIZE','FOG_KEYMAP','FOG_KEY_SEQUENCE','FOG_MEMTEST_KERNEL','FOG_PXE_BOOT_IMAGE','FOG_PXE_BOOT_IMAGE_32','FOG_PXE_HIDDENMENU_TIMEOUT','FOG_PXE_MENU_HIDDEN','FOG_PXE_MENU_TIMEOUT','FOG_TFTP_PXE_KERNEL','FOG_TFTP_PXE_KERNEL_32') ORDER BY settingKey;
There should be 15 values returned, and I’m suspecting one of these keys is missing. Please copy and paste the statement into your shell to get the return, then copy and paste the return values into a posting so we can see what’s going on a little easier.
To make things easier to see (and for us to easily view the items more directly) the values in order would be something like:
- FOG_EFI_BOOT_EXIT_TYPE
- FOG_KERNEL_ARGS
- FOG_KERNEL_DEBUG
- FOG_KERNEL_LOGLEVEL
- FOG_KERNEL_RAMDISK_SIZE
- FOG_KEYMAP
- FOG_KEY_SEQUENCE
- FOG_MEMTEST_KERNEL
- FOG_PXE_BOOT_IMAGE
- FOG_PXE_BOOT_IMAGE_32
- FOG_PXE_HIDDENMENU_TIMEOUT
- FOG_PXE_MENU_HIDDEN
- FOG_PXE_MENU_TIMEOUT
- FOG_TFTP_PXE_KERNEL
- FOG_TFTP_PXE_KERNEL_32
I suspect something between 1-12 is actually missing, causing the MENU_TIMEOUT value to to be put in place of the MENU_HIDDEN value (timeout is usually defaulted to 3 - 5 seconds) which is triggering the boot menu to think it is a hidden item.
-
@Rebelman I’m noticing here, that the bzImage is not being generated (specifically it should be trying to get a bzImage32 but it’s blank, leading me more suspicion to my prior posting.)
-
@Tom-Elliott
So I’m getting an error when typing that in on my FOG database -
ERROR 1146 (42S02): Table ‘fog.global’ doesn’t exist -
@Rebelman I updated the query, sorry there shouldn’t have been a space between global and Settings. It should’ve appeared as
globalSettings
-
mysql> SELECT settingKey,settingValue FROM globalSettings WHERE settingKey IN ('FOG_EFI_BOOT_EXIT_TYPE','FOG_KERNEL_ARGS','FOG_KERNEL_DEBUG','FOG_KERNEL_LOGLEVEL','FOG_KERNEL_RAMDISK_SIZE','FOG_KEYMAP','FOG_KEY_SEQUENCE','FOG_MEMTEST_KERNEL','FOG_PXE_BOOT_IMAGE','FOG_PXE_BOOT_IMAGE_32','FOG_PXE_HIDDENMENU_TIMEOUT','FOG_PXE_MENU_HIDDEN','FOG_PXE_MENU_TIMEOUT','FOG_TFTP_PXE_KERNEL','FOG_TFTP_PXE_KERNEL_32') ORDER BY settingKey; +----------------------------+--------------+ | settingKey | settingValue | +----------------------------+--------------+ | FOG_EFI_BOOT_EXIT_TYPE | refind_efi | | FOG_KERNEL_ARGS | | | FOG_KERNEL_DEBUG | | | FOG_KERNEL_LOGLEVEL | 4 | | FOG_KERNEL_RAMDISK_SIZE | 127000 | | FOG_KEY_SEQUENCE | | | FOG_MEMTEST_KERNEL | memtest.bin | | FOG_PXE_BOOT_IMAGE | init.xz | | FOG_PXE_BOOT_IMAGE_32 | init_32.xz | | FOG_PXE_HIDDENMENU_TIMEOUT | 30 | | FOG_PXE_MENU_HIDDEN | 0 | | FOG_PXE_MENU_TIMEOUT | 3 | | FOG_TFTP_PXE_KERNEL | bzImage | | FOG_TFTP_PXE_KERNEL_32 | bzImage32 | +----------------------------+--------------+ 14 rows in set (0.00 sec)```
-
@Rebelman So you’re missing the FOG_KEYMAP value.
Please run:
INSERT INTO fog.globalSettings (settingKey,settingDesc,settingValue,settingCategory) VALUES ('FOG_KEYMAP','This setting defines the keymap used on the client boot image.','','General Settings');
You should have more success in the “hidden” menu issue, as well as no longer have the loop.
-
mysql> SELECT settingKey,settingValue FROM globalSettings WHERE settingKey IN ('FOG_EFI_BOOT_EXIT_TYPE','FOG_KERNEL_ARGS','FOG_KERNEL_DEBUG','FOG_KERNEL_LOGLEVEL','FOG_KERNEL_RAMDISK_SIZE','FOG_KEYMAP','FOG_KEY_SEQUENCE','FOG_MEMTEST_KERNEL','FOG_PXE_BOOT_IMAGE','FOG_PXE_BOOT_IMAGE_32','FOG_PXE_HIDDENMENU_TIMEOUT','FOG_PXE_MENU_HIDDEN','FOG_PXE_MENU_TIMEOUT','FOG_TFTP_PXE_KERNEL','FOG_TFTP_PXE_KERNEL_32') ORDER BY settingKey; +----------------------------+--------------+ | settingKey | settingValue | +----------------------------+--------------+ | FOG_EFI_BOOT_EXIT_TYPE | refind_efi | | FOG_KERNEL_ARGS | | | FOG_KERNEL_DEBUG | | | FOG_KERNEL_LOGLEVEL | 4 | | FOG_KERNEL_RAMDISK_SIZE | 127000 | | FOG_KEYMAP | | | FOG_KEY_SEQUENCE | | | FOG_MEMTEST_KERNEL | memtest.bin | | FOG_PXE_BOOT_IMAGE | init.xz | | FOG_PXE_BOOT_IMAGE_32 | init_32.xz | | FOG_PXE_HIDDENMENU_TIMEOUT | 30 | | FOG_PXE_MENU_HIDDEN | 0 | | FOG_PXE_MENU_TIMEOUT | 3 | | FOG_TFTP_PXE_KERNEL | bzImage | | FOG_TFTP_PXE_KERNEL_32 | bzImage32 | +----------------------------+--------------+ 15 rows in set (0.00 sec)
Here is the return now with that included, I’ve also tried doing a new install on my UEFI machine and it went further into the menu until it crashed on cannot find disk on the system. I had to make a change in my BIOS and I’m now able to successfully install an image onto the machine. Everything completes with no errors.
-
@Rebelman So you’re saying things are working as expected now, and no more having to press ESC to get into the menu and all?
-
@Tom-Elliott Yes, everything is working as expected, I don’t have to press escape to get into the menu, it partclones without any problems and performs a full reg.
-
Great you guys have figured this out!!
-
@Tom-Elliott Would it be possible to prevent from this issue when returning and empty string instead of nothing when the key in
globalSettings
does not exist?! Not sure if that would break things in other places. You know fogmanagercontroller.class and all that way better than I do. -
@Sebastian-Roth the simplest method would be to use individual calls, but that would mean 15 separate queries to the database. The way it runs now, is just one query.
-
@Tom-Elliott Ok, I suppose we just leave it like that as it has been the first time (I know of) this has happened and we were able to figure it out in less than a week. Good enough I reckon.
-
@Sebastian-Roth said in Fog Menu loop:
Would it be possible to prevent from this issue when returning and empty string instead of nothing when the key in globalSettings does not exist?
I don’t know about how fog interacts directly with the database but MSSQL has an ifnull statement where if the field is null (or missing in q joined table) you can return a specific alternate string. It appears that mysql has a similar construct.