Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-1812

Generic conversion of image to Mender-image



    • Type: Epic
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:


      A tool for taking an existing embedded image (Debian, Ubuntu, Raspbian, etc) and convert it to a Mender image by restructuring partition table and adding necessary files.

      Since we are unlikely to be able to patch U-Boot this way, this depends on U-Boot/UEFI functionality.

      Note that we already have tooling to generate .mender Artifact (the update itself) from file system files (e.g. ext4), but we need to also add the Mender client and appropriate configurations (this might be implemented with mender-artifact cp).

      In general there are two ways users create disk images and root file system images for Debian or Ubuntu today:
      1) Install the OS on a "golden" device, add packages (e.g. apt), configurations, etc. during run-time and then run image conversion and provision the resulting Menderized disk image to other devices (but keep the golden device & image intact for the future). To generate an update, boot the golden device again, add new packages and generate Mender Artifacts using image conversion tool. Deploy those to devices already provisioned with the Menderized disk image.
      2) Package all the applications into deb packages, then use preseed/debbootstrap to create a reproducible disk image and root file system.
      2.1) Use preseed/debbootstrap to generate the "golden" image, and for each build add your app deb packages on top of it (e.g. chroot and apt).
      2.2) Use preseed/debbootstrap to generate all images during each build by changing the deb versions included. This is the "purist" approach.

      Acceptance criteria

      • New CLI tool (suggesting mender-convert)
      • An sdimg is taken as input and it is repartitioned and a new sdimg with Mender integration is output, ready to boot - like the .sdimg produced by our Yocto meta-layer
      • A root file system file (e.g. ext4) is taken as input and Mender binaries and configuration is added in an output Mender Artifact - like the .mender produced by our Yocto meta-layer
      • Required binaries and configurations are input from the local file system (e.g. option takes a directory path with well-defined structure inside)
      • Validation that input is supported with the features we rely on (e.g. has GRUB or UEFI-U-Boot w/ distrobootcmd) and reports appropriate error message if not
      • Short documentation on how to generate disk (provisioning) and rootfs images (updates) for Debian, Ubuntu & Raspbian (e.g. from above, and refer to tools) and adding Mender integration


          Issue Links



              apodogrocki Adam Podogrocki
              a10040 Kristian Amlie
              1 Vote for this issue
              7 Start watching this issue