Export captured images into Bootable USB
vtl.victor last edited by
Hi FOG Comunity !!
First of all, thank to FOG developers, its community and anyone who collaborates with this huge and wonderfull project. Second … sorry for my English, its a bit robotic.
I have a very simple question (or not …): I use FOG to capture and later to deploy on other machines without OS. My problem is there are certain number of machines that are not accessible by network, and they will never be (it’s a shame really).
That is why in those cases I would like some way that those “img” files of each partition of each disk captured with FOG server, could be “assembled” in some way to create a bootable USB and install them “on-site”.
I do not know if this will found useful to another people, but to me would be colossally useful.
And thats all !
All the best,
Sebastian Roth Moderator last edited by Sebastian Roth
@vtl.victor I am not saying it’s impossible to do. It just needs work and we don’t seem to find the time to work on this. Your quickest way to achieve what you want is capture/deploy an image at your FOG network site. Don’t let the deployed host boot into the OS (add kernel parameter
shutdown=1to that host). Then boot that same host up with Clonezilla (for example) and for taking a backup that can be deployed at an offline site on USB - no FOG server needed there - just the Clonezilla boot media and image on portable drive. (cross references: 1, 2, 3)
If that’s not what you want you need to dive into the details. Just quoting Junkhacker’s postfrom another topic here:
FOG image capture and deploy are multi-step processes. each are several commands that rely on scripts and programs in the FOG OS (FOS) and change based on what options you have selected. FOG images are not designed to be used stand alone. Using FOG images without a FOG server will require steps that were expected to be automated and there really isn’t a quick way around it.
So if you or anyone else is keen, you want to start looking at the commands to do this here:
- Clear old partition table: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh#L2012
- Apply new partition table: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh#L2041
- Loop to do the restore: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh#L2376
- Finally call partclone deploy the image files one by one: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh#L760
- Restore UUID information: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/partition-funcs.sh#L25
- Possibly more things I have missed…
And that’s just the simple case without resizing partitions!
It’s all open source, it’s all yours!
vtl.victor last edited by
@sebastian-roth Hi !!
First thanks for your reply !!
I think for me will be very difficult to do this tbh hehehe
But I have an idea… FOG uses partclone (it’s one of your options) to make the img from each HD partitions… and to deploy in another marchine.
For this reason when you deploy a captured host, FOG server “send” a list of partclone commands to deploy this capture on the new host… maybe it’s possible to export this command lines into sh batch command line ??
The only think you will need is put in a USB your partclone files, partclone software and executing the sh line commands with the files path…
Will be possible ??
Or FOG server use partclone and make “another stuff” in this files that will be impossible to restore this “FOG captures” in a new host without FOG deply method ?
I hope I have explained myself well.
All the best,
Sebastian Roth Moderator last edited by
@vtl.victor I remember this question has been asked in the forums a couple of times. While it should be possible it’s a lot of work to re-write the FOS engine to work without a FOG server. No one ever found the time to dive into this. So it’s your chance to get your hands dirty and give it a try.