Skip to content
Snippets Groups Projects
  • Gatis Paeglis's avatar
    769ae557
    NUC: Use custom image layout · 769ae557
    Gatis Paeglis authored
    
    This patch adds a new image class 'image_dd', by default
    it has an empty boot partition. image_dd_efi extends this
    class to support Intel NUC board. The layout of a generated
    image is a prerequisite for OSTree integarion.
    
    Image generated by 'hddimg' produces rootfs.img (ext3
    filesystem file) and then "live" boots it from initramfs
    by mounting rootfs.img via loop device. For OTA integration
    we need to access contents of rootfs.img already from
    boot loader.
    
    The custom 'image_nuc_efi' layout allow for fully atomic
    updates on EFI based system, by keeping GRUB-EFI binary
    on a dedicated EFI system partition (ESP). OSTree currently
    is not fully atomic on EFI systems, but with this setup
    we use GRUB-BIOS code path in OSTree, which is atomic.
    After EFI firmware has loaded the GRUB-EFI binary, everything
    else is done on rootfs parition.
    
    One limitation from the above scenario is that you would
    need to update /EFI/BOOT/bootx64.efi (GRUB-EFI) binary
    manually. Not sure how common it is to update a boot loader
    binary on a deployed system, but its not impossible.
    
    Change-Id: Ibf2840aecd548000372131c4ded5cffa11ff1b0f
    Reviewed-by: default avatarTeemu Holappa <teemu.holappa@theqtcompany.com>
    769ae557
    History
    NUC: Use custom image layout
    Gatis Paeglis authored
    
    This patch adds a new image class 'image_dd', by default
    it has an empty boot partition. image_dd_efi extends this
    class to support Intel NUC board. The layout of a generated
    image is a prerequisite for OSTree integarion.
    
    Image generated by 'hddimg' produces rootfs.img (ext3
    filesystem file) and then "live" boots it from initramfs
    by mounting rootfs.img via loop device. For OTA integration
    we need to access contents of rootfs.img already from
    boot loader.
    
    The custom 'image_nuc_efi' layout allow for fully atomic
    updates on EFI based system, by keeping GRUB-EFI binary
    on a dedicated EFI system partition (ESP). OSTree currently
    is not fully atomic on EFI systems, but with this setup
    we use GRUB-BIOS code path in OSTree, which is atomic.
    After EFI firmware has loaded the GRUB-EFI binary, everything
    else is done on rootfs parition.
    
    One limitation from the above scenario is that you would
    need to update /EFI/BOOT/bootx64.efi (GRUB-EFI) binary
    manually. Not sure how common it is to update a boot loader
    binary on a deployed system, but its not impossible.
    
    Change-Id: Ibf2840aecd548000372131c4ded5cffa11ff1b0f
    Reviewed-by: default avatarTeemu Holappa <teemu.holappa@theqtcompany.com>