Changing FOG menu in 1.2.0
-
Today I finally upgraded from v0.32 to v1.2.0 (I had to run all of the installs one by one!) and noticed that our boot menu has reverted. No big drama, but I can’t seem to find where to change it. There is no pxelinux.cfg folder any more, so I’m confused.
I was able to find the boot menu image in /var/www/fog/service/ipxe and change it, and that works fine, but I can’t find the rest. Where is this, and is it in the Wiki, because I wasn’t able to find anything.
-
I’ve asked the same thing. they will revert you to the “advanced” menu where you can indeed set menu choices, but that’s not really what I want.
There is atm no good way of setting up the default menu with ipxe -
why would you need to run all of the installs one by one? you can upgrade directly from 0.32 to 1.2.0
we no longer use pxelinux.0 or the pxelinux.cfg folder. if you haven’t done so, you need to change your dhcp server to point to undionly.kpxe instead of pxelinux.0
the boot menu is generated dynamically when it is requested. if you want to add options to your boot menu, i recommend using the advanced boot menu in the boot settings
[url]http://www.fogproject.org/wiki/index.php/Advanced_Boot_Menu_Configuration_options[/url] -
[quote=“Junkhacker, post: 35214, member: 21583”]why would you need to run all of the installs one by one? you can upgrade directly from 0.32 to 1.2.0
we no longer use pxelinux.0 or the pxelinux.cfg folder. if you haven’t done so, you need to change your dhcp server to point to undionly.kpxe instead of pxelinux.0
the boot menu is generated dynamically when it is requested. if you want to add options to your boot menu, i recommend using the advanced boot menu in the boot settings
[url]http://www.fogproject.org/wiki/index.php/Advanced_Boot_Menu_Configuration_options[/url][/quote]I tried going from 0.32 to 1.2.0, but when I went to update the schema, I got a LOT of database errors. So I tried updating to 1.0 then 1.2, but same deal, so in the end I had to go to 1.1.2 and go to 1.2. No biggie, but a bit frustrating. I’m thankful VMware has their snapshot feature!
EDIT: So I just looked at the advanced menu option, and that seems to do what I’m after, but is there a way I can make the advanced menu the default menu? There are some options we’d like students to have access to (e.g. a custom ISO that can do one-click backups of data) and it needs to be quick and simple to access.
-
[quote=“Grayda, post: 35292, member: 10496”]I tried going from 0.32 to 1.2.0, but when I went to update the schema, I got a LOT of database errors. So I tried updating to 1.0 then 1.2, but same deal, so in the end I had to go to 1.1.2 and go to 1.2. No biggie, but a bit frustrating. I’m thankful VMware has their snapshot feature! [/quote]
[COLOR=#000000]Not sure why but this issues occurs due the SQL pasword not being the same in (/lib/fog/Config.class.php) as in the pre-existing MySQL database. One way to correct it is to change in that php file and then reload the update schema.[/COLOR]
-
at this time, modifying the first boot menu is not easy. which is why we created the advanced boot menu.
if you must modify the first menu, it is written in php and is a combination of /fog/service/ipxe/boot.php and /fog/lib/fog/BootMenu.class.php -
[quote=“Junkhacker, post: 35307, member: 21583”]at this time, modifying the first boot menu is not easy. which is why we created the advanced boot menu.
if you must modify the first menu, it is written in php and is a combination of /fog/service/ipxe/boot.php and /fog/lib/fog/BootMenu.class.php[/quote]Thanks for the pointers, JunkHacker. Using that info, I’ve managed to create my own boot menu. For those of you playing along at home, do this:
[LIST=1]
[]Replace bootmenu.php with this: [url]http://pastebin.com/7rEXm7Ka[/url] (two extra lines, one line removed. calls new CustomBootMenu instead of BootMenu)
[]Make two new files in the /service/ipxe folder. One called CustomBootMenu.php (the contents is exactly the same as the BootMenu.class.php file, but replace the contents of the “printDefault” function with one that simply loads your custommenu.php) and a file called custommenu.php which contains your iPXE script (see [url]http://www.fogproject.org/wiki/index.php/Advanced_Boot_Menu_Configuration_options[/url] for a demo)
[/LIST]
This is a little more complete than my previous solution, which didn’t start tasks at all (hey, I was still learning :)) so now this menu option works for us – it allows us to set up our own menu in custommenu.php, AND lets us actually FOG machines! -
The reason why 1.2.0 direct upgrades seem to fail from 1.x.x to 1.2.0 is because 1.2.0 actually fixed some installer issues with the database things.
Even in 0.32 the upgrade path still required one to edit the config file if you set a mysql password. Add to that, the fact you had two config files to edit. You had /opt/fog/service/etc/config.php and /var/www/fog/commons/config.php
In 1.1.2 (i think) i moved the config.php to it’s own class file located in /var/www/fog/lib/fog/Config.class.php
In 1.1.2 however, the installer was still having issues with passworded mysql databases. The FOG Team tried, during our move over from 1.0.0 rom 0.32, fixing a method to allow the password to be written into the now singular config file. This password was more related to the snmysqlpass field which is, in storage nodes, the database password for the fogstorage user. As the password didn’t seem to work right for the ftp user or the db user, we tried to use this field to set and hold the information for the ftp as this is more often the problem in 0.32. Then, finally I was able to fix the problem properly. The only problem I couldn’t fix were previously configured .fogsettings files. So, the fix, before you upgrade, is to edit the snmysqlpass with either blank or your mysql password. Run your installfog.sh file and all should work properly. And the upside is you won’t have to do this every time. If you already upgraded, edit the /var/www/fog/lib/fog/Config.class.php and enter either your blank or mysql password as needed. Edit the .fogsettings information as well.
While editing the .fogsettings file will not fix issues automatically, it will help you in the future when you need to update/upgrade fog again.