Can I deploy a simple buildroot image with FOGProject?


  • Hi,

    I’ve been trying to work out how to use FOGProject as the imaging endpoint of our continuous integration system.

    We currently build buildroot images for all our devices which are then manually loaded onto the disk (and auto-expand the filesystem, setting config from the network on first boot). I have managed to get the clients to load the PXE boot menu and run Ubuntu ISOs but when I try to load our custom buildroot image it seems to want to load the whole image into memory and run it rather than run an imager and image the disk from the network.

    I have searched a lot but just keep coming across how to build FOS (which is buildroot-derived, too) rather than image the target disk.

    Is there somewhere that lists the steps to convert a buildroot output (image or partitions) ready for FOGProject to deploy without going through a write/register/upload cycle?

    Cheers,
    Tudor.

  • Moderator

    @tudor said in Can I deploy a simple buildroot image with FOGProject?:

    Having to copy the image to a machine and back again would be an extra unneccesary step since we already have the image ready to go.

    Yeah I can see what you mean. Understood.

    If you want to use FOG for this (e.g. because you like the multicast feature) you will need to start investigating the image format and see if you can make it work. We are open to help you find the right track but it’s up to you to actually figure it out.

    FOG supports so called RAW image type with uses partclone.dd not (plain) dd. While I have used both extensively I never tried to deploy an image with dd that was created with partclone.dd or vice versa. Don’t think it’ll work but I am not sure. If it doesn’t then you might hack the bash script doing the deployment to just use dd (code reference).

  • Moderator

    @tudor See that FOG has its own imaging format so unless you can convert your image into that format I don’t think FOG (as a whole ecosystem) is the right tool for you.

    Now with that said, you might be able to use bits of it, or tweak it a bit to fit your needs. I’ve worked on a few projects that use buildroot but haven’t done what you are doing just yet since everything I worked on ran out of memory, so this might be guessing a bit. So take it as YMMV. When you build a buildroot OS you create the kernel (for x86 its typically bzImage) and the initrd. That initrd can be created in several final forms. If you use the cpio format, I believe that is a format that can be spooled to media. It should be an uncompressed image format. So what you would need to do is have FOS Linux use cpio to lay that image into the target OS, at least that is what I’m thinking. The initrd would need to be complete in this form that has both the kernel and the initrd in a single cpio file that is ready for media.


  • Thanks for your reply. 🙂

    @sebastian-roth said in [Can I deploy a simple buildroot image with FOGProject?]

    Why don’t you want to go the normal route of capturing and deploying an image?

    Because this is the last step in a continuous integration system. Having to copy the image to a machine and back again would be an extra unneccesary step since we already have the image ready to go. It could also create problems, for example, in that the size of the image could change which we don’t want to do.

    Currently there is no official way of converting existing OS images mostly because capturing an image is the most straightforward way to go about it.

    Maybe, I just don’t see that as more straightforward than dd’ing a known image to a device across a network. I could PXE boot a minimal image to do this but I thought since FOGProject already has an imaging tool, fixing my image to match the tool would be easier and have more smarts (like broadcast).

  • Moderator

    @tudor said in Can I deploy a simple buildroot image with FOGProject?:

    FOGProject to deploy without going through a write/register/upload cycle?

    Why don’t you want to go the normal route of capturing and deploying an image?

    Currently there is no official way of converting existing OS images mostly because capturing an image is the most straightforward way to go about it.

260
Online

9.5k
Users

15.9k
Topics

147.5k
Posts