FAQ:Build a Live ISO
From rPath Wiki
| FAQ | ||
| Question: How can I build a Live ISO image of my appliance to put on portable or network media? | ||
|
Answer: As part of appliance development, use the rBuilder build type to choose the type of image to create. The Demo CD build type creates a LiveDistro image, which is an ISO that can be placed on portable media (such as a CD, DVD, or USB device) or on a network share, serving as a bootable complete installation of the appliance or derivative distribution. The following sections describe some considerations to make when building an image for this purpose.
Pre-Build Considerations
Before creating the group for your image, yconsider some important factors with respect to image size, compression, and filesystem preferences.
Carefully plan the content of your image, considering the size of your target media. While there may be a very large collection of software components on the image, size constraints of the desired media, especially CD or DVD, limits what may be included in the image.
rBuilder Online creates compressed zisofs images, allowing for more content in the image. The gzip compression behavior is controlled by a checkbox in the rBuilder Online interface, and it is checked by default. In most cases, developers should leave this option checked to keep the image compressed.
Choosing a Live Filesystem Method
By default, Live ISO (Demo CD) images created with rBuilder Online use initscripts to determine if the root filesystem is read-only at boot time, and to carry out certain actions if the filesystem is determined to be read-only. Among these actions are the creating a temporary filesystem, copying the Live ISO content from the disc or ISO to the ramdisk, and bind-mounting of certain directories, such as /tmp, /home, and /var to the root filesystem thereby facilitating write access. Currently, this method does not allow for additional application installation, as the entire root filesystem is not writable. Also, be aware that this method uses the ramdisk for storing all files regardless of changes, and can be memory-intensive as a result.
The alternative to the default method is to add the UnionFS package from livecd.rpath.org@rpl:1 to your Live ISO group. UnionFS is a filesystem kernel module used by many popular live disc Linux distributions; it allows mounted filesystems to be merged. This enables, for example, a read-only root to be merged with a writable ramdisk to make the entire root filesystem writable. Implementing UnionFS in your Live ISO group will allow applications to run without modification, and make installation of additional applications possible. UnionFS only stores changes between filesystems, which helps to greatly reduce memory requirements.
Use of UnionFS is not without caveats and limitations, however. UnionFS is an external kernel module, which means it is not an official part of the Linux project. Additionally, UnionFS does not currently build on x86_64. An x86 Live ISO will function on an x86_64 system without x86_64-specific features.
Live ISO Restrictions
Note the following restrictions pertaining to building Live ISO images:
- You cannot currently build Live ISO images with full x86_64 support
- The
group-coreincluded in your image group must be version/conary.rpath.com@rpl:devel//1/1.0.1-0.7-10or greater to produce a functional Live ISO image.
Build the ISO
Use typical appliance development procedures to create a group to represent the appliance or derivative distribution for the Live ISO, either at rBuilder Online or on a local rBuilder Appliance.
After assembling and successfully cooking the group, create a build as a Demo CD from the cooked group. If desired, download the ISO and test it prior to releasing it for public consumption (see Testing the Image).
When the build is complete, create a release in rBuilder that includes that image and any others you wish to publish in a single release. The release makes the image download available to the public.
Testing the Image
Besides placing a new Demo CD/Live ISO image on portable media for testing, another option is using the QEMU application as detailed at rBuilder:Test Images with QEMU.
