5.9.2.6.1. Generate an Image using an Existing Kickstart File

This example runs in Cooked Mode and uses the mkefidisk kickstart file:

     $ wic create mkefidisk -e core-image-minimal
     Checking basic build environment...
     Done.

     Creating image(s)...

     Info: The new image(s) can be found here:
      /var/tmp/wic/build/mkefidisk-201310230946-sda.direct

     The following build artifacts were used to create the image(s):
      ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/rootfs
      BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0/hddimg
      KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
      NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux

     The image(s) were created using OE kickstart file:
      /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
                        

The previous example shows the easiest way to create an image by running in Cooked Mode and using the -e option with an existing kickstart file. All that is necessary is to specify the image used to generate the artifacts. Your local.conf needs to have the MACHINE variable set to the machine you are using, which is "minnow" in this example.

The output specifies the exact image created as well as where it was created. The output also names the artifacts used and the exact .wks script that was used to generate the image.

Note

You should always verify the details provided in the output to make sure that the image was indeed created exactly as expected.

Continuing with the example, you can now write the image to a USB stick, or whatever media for which you built your image, and boot the resulting media. You can write the image by using bmaptool or dd:

     $ oe-run-native bmaptool copy /var/tmp/wic/build/mkefidisk-201310230946-sda.direct /dev/sdX
                        

or

     $ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct of=/dev/sdX
                        

Note

For more information on how to use the bmaptool to flash a device with an image, see the "Flashing Images Using bmaptool" section.