Live DVD

From LinuxMCE
Revision as of 03:30, 29 February 2012 by L3mce (Talk | contribs)

Jump to: navigation, search

This wiki attempts to explain the live DVD creation techniques used to produce a universally installable DVD in lmcemaster.sh


Directory Structure

You will note the script creates 3 temporary folders.

$ISODIR is the file structure of the DVD itself. This contains the casper/ubiquity bits, the sqashed file system, bootloader and preseed data. The only files placed here should relate to the operations of the DVD itself. [[1]]

$WORKDIR is the work in progress, that is to say the file structure that will be installed on the target machine from the dvd. This root directory is where we put things, and manipulate them for the most part instead of the host. There are some catch-22s which require us to manipulate the host image prior to its being copied to this directory.

$DDDIR is the chrooted host directory structure we are building the DVD to install from. This file structure is ALSO the host environment on the DVD which lmce exists over top of. This expects a DD image, which is then loop mounted to a temporary directory for manipulation. As little change as possible should be made to this directory. If you destroy/move things around in here, those changes persist, making it difficult or impossible to create more than one DVD from a single image.

The WORKDIR directory will serve as the host environment on the live DVD over which ubiquity is run. The WORKDIR is also the file system which will be installed on the hard drive, and become /target on the DVD after it is installed to the drive. Post operation can occur via the d-i preseed/late_command in the preseed.cfg file. The DDDIR and WORKDIR look identical on the DVD save the addition of the /target directory on the DDDIR, which contains the mounted WORKDIR. Chroot operations can occur to that /target directory as well.


Generated Files

We create a few files throughout this process. This explains what and why.

interfaces.temp This file sets two nics as dhcp so as to find internet when needed, as when it is needed, it is needed. This file is used twice. The chrooted environment needs internet and presumes there are two nics, and doesn't know which one it is on. The post installer needs internet prior to DCE nic configuration and presumes the same. If there is only one nic avail, this still works, though it is hacky and I do not like it.

isolinux.cfg this is the boot configuration for isolinux. This sets up the menu, and specifies boot options etc as well as layout options and the preseed file. Colors are in hex format, preceded by an alpha level ATRRGGBB where AT=Alpha Transparency RR=Red GG=Green BB=Blue. (example FFFC9306)

preseed.cfg There are a LOT of possible options for this menu. I am currently only disabling language packs, performing autoconfig for the dvd host (not the target mind you), and performing the post-install (note, late_command not currently working).

postinst.sh is the post installer. This is designed to be run from the preseed post, which chroots into the /target directory and performs the post install before rebooting. It is currently being run on reboot, which will itself need to be rebooted when finished. Should it be run chrooted, the mysqld commands must be unhashed for version control.

README.diskdefines Defines the architecture, diskname etc.

_________________________________________________________________________________________________________________


Moved upstart jobs

I am also moving and rewriting the following files for various reasons/conflicts from /etc/init.d, and using the opportunity to run a couple of commands on boot. I will probably add more to this list as the enormous list of things running for LMCE slow down the operation of the DVD. These files are moved to /root/new-installer/lmcemaster/runners

nis - ypbind server fails and takes forever to do so. Painful.

0start_avwizard - we need to do some work before we try that.

linuxmce - absent avwizard, linuxmce will attempt to run.


The Move

The move is the process of creating the required subdirectories in the WORKDIR, and copying over most of the DDDIR. The majority of the move is done with rsync in the /etc folder. cp is used for the home directory to capture hidden files. Then install specific files are removed. During this time, the initrd.gz, vmlinuz, vesamenu32, and isolinux.bin files are created or moved. The plymouth theme is also created at this and the initramfs is generated, and the process is then repeated and updated with the -u option as the shutdown screen from the original was persisting after the make.

The Squash

Both the WORKDIR and the DDDIR file systems are squashed. The file system, again, is the base of the target image. The working DDDIR file system is the FS the DVD is running, and that which casper takes its cues from as to how to implement the backend to the WORKDIR target. Ubiquity is the front end with the KDE installer which installs the root system for kubuntu, using the casper ghosting. Again... key pieces that you want on the target that are specific to our system should go in the work directory.

(more to follow)