Helper Documentation — live-wrapper 0.7 documentation

# Helper Documentation

## Root Filesystem Helpers

The lwr.vm module provides helpers for calling vmdebootstrap as part of the image creation process.

Directory listing of /live/ filesystem.packages filesystem.packages-remove filesystem.squashfs initrd.img vmlinuz

Note

This module requires that the vmdebootstrap modules be available in the Python path.

class `lwr.vm.` `VMDebootstrap`(distribution, architecture, mirror, cdroot, customise, apt_mirror)
  `run`()

`lwr.vm.` `detect_kernels`(cdroot)

## Bootloader Helpers

The lwr.grub module contains helpers for GRUB 2 including the installation of GRUB files to the cdroot and the generation of the grub.cfg and loopback.cfg files.

`lwr.grub.` `generate_cfg`(bootconfig, submenu=False)

`lwr.grub.` `install_grub`(cdroot, bootconfig)

  Can use cdroot as a relative path inside the actual cdroot. The d-i/ and live/ directories are used directly.

The lwr.isolinux module contains helpers for isolinux including the installation of isolinux files to the cdroot and the generation of the isolinux.cfg files. Directory listing of /isolinux/ advanced.cfg boot.cat hdt.c32 install.cfg isolinux.bin isolinux.cfg ldlinux.c32 libcom32.c32 libutil.c32 live.cfg menu.cfg splash.png stdmenu.cfg vesamenu.c32

`lwr.isolinux.` `generate_cfg`(bootconfig, submenu=False)

`lwr.isolinux.` `install_isolinux`(cdroot, mirror, suite, architecture, bootconfig)

  Download and unpack the correct syslinux-common and isolinux packages for isolinux support. ISOLINUX looks first in boot/isolinux/ then isolinux/ then / This function puts all files into isolinux/

## CD Filesystem Helpers

This module provides helpers for generating the metadata stored in .disk/ on the cdroot.

`lwr.disk.` `get_default_description`(distribution)

`lwr.disk.` `install_disk_info`(cdroot, description, xorriso_args)

  This function creates the .disk/ metadata and installs it into the specified cdroot.

## ISO Creation Helpers

The lwr.xorriso module provides helpers for calling xorriso as part of the image creation process.

Note

This module requires that the vmdebootstrap modules be available in the Python path.

class `lwr.xorriso.` `Xorriso`(image_output, volume_id, isolinux=True, grub=True)

  This class acts as a wrapper for `xorriso` and allows for the command line arguments passed to be built based on the settings given to the main application.

  `build_args`(cdroot)
  `build_image`()

    This will call `xorriso` with the arguments built.

    Note

    `Xorriso.build_args` must have been called before calling `Xorriso.build_image`.

    Warning

    The `xorriso` binary must be present in the current PATH.