From da87cb5ff5ef045eb8bb401847f0d8e07c2e2264 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Thu, 3 May 2018 20:45:15 +0000 Subject: [PATCH] Copy freestanding initrds in image mode Copy freestand initrd files when cbm is run in image mode. Note the initrd installation call happens prior to kernel install. This is done as failure to install/update an initrd is fatal and if kernel install happens before initrd install then an installed kernel could exist with a configuration file referencing initrds that won't be available. --- src/bootman/update.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootman/update.c b/src/bootman/update.c index 2eddc96..64ada63 100644 --- a/src/bootman/update.c +++ b/src/bootman/update.c @@ -201,6 +201,11 @@ static bool boot_manager_update_image(BootManager *self) } LOG_SUCCESS("update_image: Bootloader update successful"); + if (!boot_manager_copy_initrd_freestanding(self)) { + LOG_ERROR("Failed to copying freestanding initrd"); + return false; + } + /* Go ahead and install the kernels */ for (uint16_t i = 0; i < kernels->len; i++) { const Kernel *k = nc_array_get(kernels, i);