Deploying images from USB
-
[quote=“Jørn Pettersen, post: 42539, member: 28650”]As I’ve understand it, when choosing something in the startup menu on a client, you actually tell the server what to do at the next reboot?[/quote]
No, not usually. There are a couple of tasks (especially if that particular host is not registered yet) that you can run from the PXE menu, like register the host or quick imaging. That “task” is then run straight away. BUT usually all tasks are being scheduled via the webinterface. The clients are then woken up via WOL and run that scheduled task without any further user interaction (no PXE menu but booting straight into FOG an run the task). But this is only important for you if you use FOG in a network scenario as well.[quote=“Jørn Pettersen, post: 42539, member: 28650”]Tom, where can I change the image format? If I do so, do I need a newer version of fog to deploy this image again? And last, since you are using partclone to do the imaging, is it possible to deploy this image with another image tool that also use partclone?[/quote]
I am still new to FOG so I don’t know for sure but AFAIK image format can only be set in the database. So you’d need to install phpmyadmin or similar tools to do this. Tom, please correct me if that’s not true.I reckon that you could deploy that image using clonezilla for example. But it would need some kind of shell script too I’d say. Up to you if you want to dive into clonezilla or changing FOG for your needs.
-
right now a imageFormat flag of “2” can only be set in the database directly, by command line or a tool like phpmyadmin. having the images split is useful for offline backup and file transfers, but not really for storing the data on multiple disks. all of the image files must be in the same location at the start of the imaging process, or it will fail. fog images should be deployable using clonezilla with the right command line syntax, as fog images are just compressed partclone images.
-
Thank you for all helpful tips, it really helps me on the way to accomplish what I need. Uncle Frank, I did what you suggested and ended up with a bootable usb stick and as you said ended up with command line. But it seems like usb controllers are removed from the kernel or the init file. Is this correct? Any suggestions how to add this again?
I will start to edit the files needed to make fog image the computer for the stick, but is it fog.download I must edit? Could someone please describe a bit what files are involved when I want to image a computer? (If someone has already made a description of how rings work and the files involved please someone tip me. I´m really interested in getting t know the system ) I guess the file that involves imaging the computer need a path to where the image is stored, so I will try to implement usb detection and mount that usb stick and make a list if all available images where the user could choose from and then send the path to fog.
-
I just heard about FOG not supporting USB-storage to prevent trouble if someone left a stick in one of the clients by accident (see Junkhackers comment here: [url]http://fogproject.org/forum/threads/request-for-help-or-maybe-just-answers.12476/#post-42596[/url]). So you’d have to build your own kernel. Let me know if you need assistence with that. See some instructions here: [url]http://fogproject.org/wiki/index.php?title=Building_a_Custom_Kernel[/url] or even better here: [url]http://fogproject.org/wiki/index.php/Build_TomElliott_Kernel[/url]
Within the init.xz file you want to study those files:
[CODE]/bin/fog.download
/bin/fog.checkin
/usr/share/fog/lib/funcs.sh[/CODE]FOG mounts /images via NFS from the server. Change this to mount your USB-Stick. But there probably is quite some work to be done in fog.checkin too, I’d say. Forgot about that at first, sorry.
One more thing I just remembered. You probably will have to change your boot parameters sooner or later too to match things for your scenario. See how you go and let me know if I can help you.
-
i really think it would be easier to create a clonezilla usb boot stick, and copy your image to it, instead of trying to rewrite the fog stuff
-
[quote=“Junkhacker, post: 42613, member: 21583”]i really think it would be easier to create a clonezilla usb boot stick, and copy your image to it, instead of trying to rewrite the fog stuff[/quote]
You could be right there. Somehow I got drawn away by the idea of being able to make FOG do local restore… Maybe it’s just easier to use clonezilla. -
Could always just haul around hard drives with the right images on them already… Way faster than imaging!
-
Yes I agree with you Junkhacker after the last response from Uncle Frank it seems like a bigger job than expected. Tried to search a bit around this but did not find anything about a conversion or something of images made in fog and then deployed using clonezilla. Do you know anything about this? I tried to just copy the image from fog to clonezilla, but that did not work. Clonezilla has more files in their image folder that fog has and the naming is different.
Sorry for all my questions… But I really need a working solution up and running. All the help are very much appreciated! -
I see your point Wayne. And for 99% of the time we use an image server. But sometimes we need to do an quick imaging of a computer without having a server around and then we need to have a offline method to do the imaging. Have also thought about having a virtual box setup locally on a laptop with a fog server to run in these situations.
-
[quote=“Jørn Pettersen, post: 42619, member: 28650”]I see your point Wayne. And for 99% of the time we use an image server. But sometimes we need to do an quick imaging of a computer without having a server around and then we need to have a offline method to do the imaging. Have also thought about having a virtual box setup locally on a laptop with a fog server to run in these situations.[/quote]
But even then, if your production hardware is similar enough (just a few models), you could have ready-to-go hard drives in your bag/work van to install in those broke down systems.
And you could totally set up FOG on a laptop, and have it dish out DHCP and the works. You would need a cross-over cable in order to not use a switch. It’d work fine.
But, that’s an inefficient method. I’d personally just have hard drives ready to stick in, myself.
-
I had installed Ubuntu and Fog on a 64GB stick and made it a bootable server for when I go to remote sites. I use a computer to boot the USB stick(makes a temporary server) and the rest get rebooted so that they can get their info from the fog server it works ok but really need a USB3.0 stick 2.0 takes about 3 times longer than normal.
-
to use clonezilla with fog images, you will need to set up the partitions manually, such as by using gparted. then use the command line to write the image to the partition. this is more or less what you’ll need to tell it
[CODE]gunzip -d -c < $file | partclone.restore --ignore_crc -O $disk -N -f[/CODE][quote=“Jørn Pettersen, post: 42619, member: 28650”]Have also thought about having a virtual box setup locally on a laptop with a fog server to run in these situations.[/quote]
people have done this as well, and it works -
Probably you could also capture one image using clonezilla from that particular kind of client just to have a template of clonezilla files ready. Then swap ‘sdaX.<fstype>-ptcl-img.gz.aa’ files with those you got from fog. From what I could find out they should be in the correct format (partclone packed with gzip) already. You just need to rename them properly. Give it a try…