FOG 1.5.0 RC9 - How to have a computer boot stright to multicase session?
-
@wayne-workman
YOU ARE THE MAN! -
Now… how do I bypass the username/password (or how to have it automatically enter it for the client) and skip registration? I’m just trying to image these guys so I can get ready to sell them.
-
@cheisler8504 I know there’s a way - it’s not the same as the old way. @Sebastian-Roth @george1421 @x23piracy @THEMCV @Psycholiquid @JJ-Fullmer Ideas?
-
Alright… I was actually able to get past the login portion and it skipped the registration automatically somehow. Here is my code…
params
param mac0 ${net0/mac}
param arch ${arch}
param username user
param password user
param sessionJoin 1
isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
isset ${net2/mac} && param mac2 ${net2/mac} || goto bootmeNow, it is requesting the name of the multicast name. I tried changing the following but it did not work.
param sessionJoin 1
to
param sessionJoin cast“cast” is the name of the session
-
did some snooping around and I did happen to find this set of code:
{ $Send['joinsession'] = array( 'cpuid --ext 29 && set arch x86_64 || set arch i386', 'echo -n Please enter the session name to join > ', 'read sessname', 'params', 'param mac0 ${net0/mac}', 'param arch ${arch}', 'param platform ${platform}', 'param sessname ${sessname}', 'isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme', 'isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme', ':bootme', "chain -ar $this->_booturl/ipxe/boot.php##params", ); $this->_parseMe($Send); }
Found this in bootmenu.class.php
Not sure if there is anything in there that might help.
Maybe change/add ‘param sessname ${sessname}’, to the fog.multi? -
@cheisler8504 I don’t think that will help you.
The problem is that ‘joinsession’ will always try to ‘read sessname’ which is what the prompt is, essentially.
Quick ‘hack’ would be to edit that file directly, make it look more like
{ $Send['joinsession'] = array( 'cpuid --ext 29 && set arch x86_64 || set arch i386', 'params', 'set sessname sessionname', 'param mac0 ${net0/mac}', 'param arch ${arch}', 'param platform ${platform}', 'param sessname ${sessname}', 'isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme', 'isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme', ':bootme', "chain -ar $this->_booturl/ipxe/boot.php##params", ); $this->_parseMe($Send); }
And that will probably work, but will obviously be overwritten with an update.
As you can see, you have to hardcode the session name here, since (I’m not 100% certain) I don’t think the chained parameters (found in fog.multi) can be used to fill in the parameter in bootmenu.php
My best bet would be some kind of kernel parameter to set this value like that, I seem to recall something like that from some time ago, but don’t remember the specifics.
-
@cheisler8504 said in FOG 1.5.0 RC9 - How to have a computer boot stright to multicase session?:
Now… how do I bypass the username/password (or how to have it automatically enter it for the client) and skip registration? I’m just trying to image these guys so I can get ready to sell them.
Wait, where does mutlicasting come into the picture here? If you are imaging to resell (like a computer remanufacturer) then just use the ‘Deploy Image’ command from the FOG iPXE menu. That will push an image to the computer without needing to register it. You can even embed the user name and password (as you discovered) to make the system just deploy after selecting an image.
If you are trying to join a session you might want to create a custom fog iPXE menu similar to this:
:fog.turbojoin param sessname <insert_session_name_here> param username <fog> param password <password> param sessionJoin 1 param mac0 ${net0/mac} param arch ${arch} param platform ${platform} isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme boot || goto MENU
Understand I have not tested this only attempted to reverse engineer how the iPXE menus work.
-
I did not know it would be that easy to create a menu item that easily.
The whole multicast reason is so that it will image all the laptop at the same time at the same speed. ~1Gbps or 100Mbps.
-
@cheisler8504 There is a bit of a misunderstanding in your plan.
With multicasting the whole lot moves at the speed of the slowest system. So if you are imaging 6 i5 quad core computers with ssd disks and 1 Pentium 4 with a slow disk the whole lot will run at the speed of the Pentium 4. The heavy lifting (the most work done) is by the target computers to decompress and move the image to the local hard drive. Since there is only one data stream the 5 faster systems will pause until the slow ones catch up.
How many systems do you envision you need to image per day? With my production environment I can push a single 25GB image to a target computer is about 4.5 minutes. By using a 2 port network LAG and a SSD drive in the FOG server I can image 4 systems in about 5 minutes with 4 unicast streams. If I would increase the LAG to 4 ports I can do 8 in about 5 minutes. Understand my production environment is all virtualized but I did physical server testing a while ago. I can saturate a single 1GbE link imaging 2 systems using unicast at the same time. After the second system the overall throughput dropped dramatically.
While I went off topic a bit I would start with your goal, how many systems do you need to image per 8 hr shift to see if it really warrants using multicasting over unicast image deployment. Now if you needed to image an entire class room of 30 computers between classes, I would say yes muticasting is the way to go.
-
@cheisler8504 said in FOG 1.5.0 RC9 - How to have a computer boot stright to multicase session?:
I did not know it would be that easy to create a menu item that easily.
There is a little bit more that is required, but if you go into the fog configuration and then into the ipxe menu configuration you can create new iPXE boot menu entries. The one I provided should be pretty close to what you needed.
-
See all of these laptops are EXACTLY the same. They actually are dog slow Core2Duo laptops that I got for nothing (120x @ $5ea.) So i’m my limit is actually table space and the extra 16port gigabit switch I had. So, I can do about 15 at a time.
The goal is to hook them up and let them go to town so that I can spend time with my family instead of fiddling around with the laptops. Though, the fam has been helping me with setting all the bios settings.
-
@cheisler8504 said:
The goal is to hook them up and let them go to town so that I can spend time with my family instead of fiddling around with the laptops. Though, the fam has been helping me with setting all the bios settings.
Nice! This is exactly what multicast is for, sou you’re definitely on the right track with this and I am pretty sure we can make this work together. Though there is still at least one hurdle that comes to my mind. You need to create the multicast session to be able to join the computers to that. FOG is made to create multicast sessions for groups of computers that are registered within FOG. So from here there are two streets you can follow. One going down the general way of how FOG works:
- hook up 15 of those machines to the switch and make sure they all PXE boot
- goto the web UI -> FOG Configuration -> iPXE Menu Configuration -> fog.reg and mark the checkbox “Default Item” -> Save Changes
- Prepare the multicast session: web UI -> Image Management -> Multicast Image (from the menu on the left side) -> Session Name: cast (or whatever you like), the rest should be clear. Make sure you have a proper image selected that has been uploaded and deployed to at least one host before to make sure this is alright!
- go back to FOG Configuration -> iPXE Menu Configuration -> fog.multijoin and change the Parameters to:
params param mac0 ${net0/mac} param arch ${arch} param sessname cast isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
- See that when
sessname
is set to a fixed value (cast
) andlogin
is removed, so it should join the clients into the session without any user interaction. - After saving the Parameters for fog.multijoin go back to that in the web UI and check the “Default Item” checkbox but don’t click the button to save the changes yet.
- Bootup all 15 machines and watch them do the quick registration (that was selected as default boot) - when all of them got past the FOG menu and do the registration now click save to default to the fog.multijoin menu item for when the machines come up after registering and rebooting
- watch the machines join the multicast session and do the cloning
-
@sebastian-roth I would tend to think that since you can set a boot menu item to show only for registered hosts, or only for non-registered hosts, or for all hosts, that there could be multiple default items.
If that were the case, you could have a default item for quick registration that only shows for non-registered hosts, and another for multicast that only shows for registered hosts.
-
This post is deleted! -
@wayne-workman said in FOG 1.5.0 RC9 - How to have a computer boot stright to multicase session?:
@cheisler8504 You can probably set the multijoin boot entry to be the default item, and modify the ipxe script for this item to set a valid user/pass. See the picture below.
This is inside of FOG Configuration -> Ipxe menu item settings.
Hello, I have the same request, but I can’t access the picture that you upload, can you please upload it again?
-
@kennethjnvega This post if from 2017. I don’t know who typically maintains pictures for quite that long.
Normally the forums would have had this available, but a few months ago there was an issue and we lost the public accessible data. The posts exist, but the pictures do not from that time.
-
@tom-elliott Thank you very much for your prompt response, and is there any way to do what is said in the post? Given that, in what we are testing we have around 20 computers to clone, and the idea is to select everything automatically, does this include not having to enter the username and password or the cloning session?
-
@kennethjnvega Have you tried the items within this post that aren’t relying on a picture?
Something like from this link:
https://forums.fogproject.org/topic/10868/fog-1-5-0-rc9-how-to-have-a-computer-boot-stright-to-multicase-session/8?_=1615817300537# -
@tom-elliott Thank you very much Tom, from reading so much, I did not notice that answer, this is what I was looking for, I thank you very much for your time.