SYNOPSIS
========
-| mic create SUBCOMMAND <ksfile> [OPTION]
-| mic chroot [OPTION] <imgfile>
-| mic convert [OPTION] <imgfile> <format>
+| mic [GLOBAL-OPTS] create SUBCOMMAND <ksfile> [OPTION]
+| mic [GLOBAL-OPTS] chroot [OPTION] <imgfile>
DESCRIPTION
===========
The tools `mic` is used to create and manipulate images for Linux distributions.
-It is composed of three subcommand: `create`, `convert`, `chroot`.
+It is composed of two subcommand: `create`, `chroot`.
USAGE
=====
This command is used to create various images, including loop.
Usage:
-
- | mic create(cr) SUBCOMMAND <ksfile> [OPTION]
+ | mic [GLOBAL-OPTS] create(cr) SUBCOMMAND <ksfile> [OPTION]
Subcommands:
- | help(?) give detailed help on a specific sub-command
+ | auto auto detect image type from magic header
| fs create fs image, which is also chroot directory
| loop create loop image, including multi-partitions
+ | qcow create qcow image
Options:
Examples:
| mic chroot loop.img
- | mic chroot tizen.iso
- | mic ch -s tizenfs tizen.usbimg
-
-convert
--------
-This command is used for converting an image to another format.
-
-Usage:
-
- | mic convert(cv) <imagefile> <destformat>
-
-Options:
-
- -h, --help show the help message
- -S, --shell launch interactive shell before packing the new image in the converting
-
-Examples:
-
-
Advanced Usage
==============
MIC offers three major functions:
- creating an image with different format
-- converting an image to another format
- chrooting into an image
Getting help
* mic --help
* mic create --help
- * mic help create
* mic create loop --help
- * mic create help loop
Image formulation support
-------------------------
* For a configuration with multiple partitions, which is specified in the kickstartfile, mic will generate multiple loop images
* And multiple loop images can be packed into a single archive file
-- Raw
-
- * “raw” format means something like hard disk dumping
- * Including partition table and all the partitions
- * The image is bootable directly
-
-- Livecd
-
- * Mainly used for an ia32 build, it can be burned to CD or usbstick, which can be booted into a live system or installation UI
-
- fs
* “fs” means file-system
* mic can install all the Tizen files to the specified directory, which can be used directly as chroot env
+- qcow
+
Create
------
::
- mic create(cr) SUBCOMMAND <ksfile> [OPTION]
+ mic [GLOBAL-OPTS] create(cr) SUBCOMMAND <ksfile> [OPTION]
- Sub-commands, to specify image format, include:
::
- help(?) give detailed help on a specific sub-command
+ auto auto detect image type from magic header
fs create fs image, which is also a chroot directory
loop create loop image, including multi-partitions
+ qcow create qcow image
- <ksfile>:
--pack-to=PACK_TO Pack the images together into the specified achive,
extension supported: .zip, .tar, .tar.gz, .tar.bz2,
etc. by default, .tar will be used
+ --runtime=RUNTIME_MODE
+ Sets runtime mode, the default is bootstrap mode, valid
+ values: "bootstrap". "bootstrap" means mic uses one
+ tizen chroot environment to create image.
--copy-kernel Copy kernel files from image /boot directory to the
image output directory.
-
+ --install-pkgs INSTALL_PKGS Specify what type of packages to be
+ installed, valid: source, debuginfo, debugsource
+ --check-pkgs=CHECK_PKGS
+ Check if given packages would be installed,
+ packages should be separated by comma
+ --tmpfs Setup tmpdir as tmpfs to accelerate, experimental feature,
+ use it if you have more than 4G memory
+ --strict-mode Abort creation of image, if there are some errors
+ during rpm installation
+
- Other options:
::
- --runtime=RUNTIME_MODE
- Sets runtime mode, the default is bootstrap mode, valid
- values: "bootstrap". "bootstrap" means mic uses one
- tizen chroot environment to create image.
- --compress-image=COMPRESS_IMAGE (for loop & raw)
+ --compress-image=COMPRESS_IMAGE (for loop)
Sets the disk image compression. Note: The available
values might depend on the used filesystem type.
--compress-disk-image=COMPRESS_IMAGE
Same with --compress-image
--shrink (for loop)
Whether to shrink loop images to minimal size
- --generate-bmap (for raw)
- Generate the block map file
-
+ --include-src (for fs)
+ Generate a image with source rpms included
- Examples:
::
::
mic ch loop.img
- mic ch tizen.iso
- mic ch -s tizenfs tizen.usbimg
-
-Convert
--------
-This command is used for converting an image to another format.
-
-
-- Usage:
-
-::
-
- mic convert(cv) <imagefile> <destformat>
-
-- Options:
-
-::
-
- -h, --help Show this help message and exit
- -S, --shell Launch shell before packaging the converted image
-
-- Examples:
-
-::
-
- mic cv tizen.usbimg livecd
Getting Start
-------------
parser.set_defaults(alias="cr")
subparsers = parser.add_subparsers(title='Subcommands', dest='subcommand')
+ auto_parser = subparsers.add_parser('auto', parents=[parent_parser], help='auto detect image type from magic header')
+
fs_parser = subparsers.add_parser('fs', parents=[parent_parser],
- help='auto detect image type from magic header')
+ help='create fs image')
fs_parser.add_argument("--include-src", dest = "include_src",action = "store_true",
default = False, help = "Generate a image with source rpms included")
- auto_parser = subparsers.add_parser('auto', parents=[parent_parser], help='create fs image')
loop_parser = subparsers.add_parser('loop', parents=[parent_parser], help='create loop image')
loop_parser.add_argument("--compress-disk-image", dest="compress_image",