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=None, cdroot='/tmp/')[source]
run()[source]
lwr.vm.detect_kernels(cdroot)[source]

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.

class lwr.grub.GrubConfig(cdroot)[source]

Helper class that creates a Grub 2 configuration based on a vmdebootstrap squashfs output directory.

detect()[source]
generate_cfg()[source]
generate_di_cfg(kernel, ramdisk)[source]
lwr.grub.install_grub(cdroot)[source]

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

lwr.grub.update_grub(cdroot, kernel, ramdisk)[source]

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

class lwr.isolinux.ISOLINUXConfig(cdroot)[source]

Helper class that creates an ISOLINUX configuration based on a vmdebootstrap squashfs output directory.

detect()[source]
generate_cfg()[source]
generate_di_cfg(kernel, ramdisk, gtk=False)[source]
lwr.isolinux.install_isolinux(cdroot, mirror, suite, architecture)[source]

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/

lwr.isolinux.move_files(src, dest)[source]
lwr.isolinux.prepare_download(destdir, mirror, suite, architecture)[source]
lwr.isolinux.update_isolinux(cdroot, kernel, ramdisk)[source]

CD Filesystem Helpers

This module provides helpers for generating the metadata stored in .disk/ on the cdroot. Directory listing of /.disk/ -r–r–r– 1 0 0 29 Sep 8 2015 [ 194732 00] archive_trace -r–r–r– 1 0 0 5 Sep 8 2015 [ 194733 00] base_components -r–r–r– 1 0 0 0 Sep 8 2015 [ 907 00] base_installable -r–r–r– 1 0 0 5 Sep 8 2015 [ 194734 00] cd_type -r–r–r– 1 0 0 89 Sep 8 2015 [ 194735 00] info -r–r–r– 1 0 0 49 Sep 8 2015 [ 194736 00] udeb_include

lwr.disk.install_disk_info(cdroot)[source]

This function creates the .disk/info 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, isolinux=True, grub=True)[source]

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)[source]
build_image()[source]

This will call xorriso with the arguments built.

Warning

The xorriso binary must be present in the current PATH.

Table Of Contents

Previous topic

Developer Documentation

This Page