navigation, content, portlets

Ultima LiveCD Scripts

Template:Cleanup

The Ultima LiveCD Scripts are, as their name suggests, a set of bash scripts which build the Ultima Linux LiveCD. Unlike other programs such as linux-live, these scripts are specific to Ultima Linux, although they share a similar implementation and hypothetically should be portable to other distributions as well. The scripts are included under the cdset/ directory in the Ultima Linux source.

In Ultima Linux 8.3 and earlier releases, these were known informally as the ultima-scripts, but in Ultima Linux 8.4 and newer releases, this refers to the entire distribution build system.

Contents

Pre-requisites

To build an Ultima Linux LiveCD, you need:

  • The latest version of the Ultima-scripts, available from the Ultima homepage.
  • A complete Ultima Linux package set for the edition (x86 or AMD64) you want to build.
  • A relatively fast computer with at least 2GB disk space (approximately 10GB recommended to build LiveDVD).

NOTE: You can build an x86 LiveCD on an AMD64 system, so long as you have the right package set available.

Usage

The main script is called make-livecd, and MUST be run as root (like the SlackBuild scripts). It is usually called with several environment variables set, as described below.

Before the scripts can be used, they must be copied to a temporary directory – you cannot run make-livecd in the cdset/ directory! Assuming you downloaded the scripts to /tmp/ultimalinux/cdset, you can use:

root@localhost:~# cd /tmp/ultimalinux
root@localhost:/tmp/ultimalinux# mkdir z ; cd z ; lndir ../cdset .

You can then proceed with building the LiveCD. For example, if you’re building an x86 Server LiveCD from /tmp/ultimalinux/x86:

root@localhost:/tmp/ultimalinux/z# ARCH=i486 EDITION=Server PKGSET=../x86 ./make-livecd

Environment Variables

Name Valid options Description
ARCH i486 (default)
x86_64
Which target architecture the CD will be built for. Accepts same values as SlackBuild scripts.
EDITION Desktop (default)
Server
DVD
Determines the set of packages installed to CD based on tagfiles in the appropriate directory (tagfiles-desktop/, etc.) DVD (introduced in Ultima Linux 8.3) is a special option which builds a much larger DVD image and allows i.e. dual-edition x86/AMD64 discs.
PKGSET any valid UNIX path Location of Ultima Linux package sets. This must be a complete package set since you cannot i.e. change CD-ROMs during the LiveCD build.
USERNAME any valid username Which user the LiveCD should be chmod'd to after the build has finished. Optional.

Dual-Edition DVD

Starting in Ultima Linux 8.3, a LiveDVD edition is available containing both x86 and AMD64 versions of the operating system. This can be accomplished with a custom LiveDVD as well (or possibly even a CD, so long as there is sufficient space available), but requires some manual changes to function correctly.

Try the following procedure to build a LiveDVD:

  1. Build the AMD64 Edition LiveDVD first, using ARCH=x86_64 EDITION=DVD.
  2. Rename the AMD64 LiveCD/ directory to LiveDVD/.
  3. In your newly-created LiveDVD/ directory:
    • Rename isolinux/rootfs.img to isolinux/rootfs64.img.
    • Rename isolinux/vmlinuz to isolinux/vmlinu64 (no z).
    • Rename isolinux/scsi to isolinux/scsi64.
    • Make a new x86_64/ directory.
    • Move squashfs.img and compat32.img to x86_64/.
  4. Build the x86 Edition LiveDVD, using ARCH=i486 EDITION=DVD.
  5. Copy all files from LiveCD/ to LiveDVD/, overwriting when necessary.
  6. In your LiveDVD/ directory:
    • Make a new i486/ directory (NOT i386!).
    • Move squashfs.img to i486/.
    • Edit isolinux/isolinux.cfg. Duplicate every kernel boot option, but add 64 after the label and in the kernel/initrd lines where appropriate.
  7. Enjoy your new dual-edition LiveDVD!

NOTE: Make sure you have a really, really big hard disk. You’ll likely need at least 20GB for this one, and the more the better. Absolutely not for the faint of heart and/or CPU power!

Disk Compression

Ultima Linux 8.2 and newer use SquashFS to shrink the installation within the disk limit; previous versions used cloop. Generally a LiveCD installation takes up approximately half the space of a standard desktop installation.

When the LiveCD starts up, the first thing it loads is an initrd (“initial ramdisk”) image containing a small set of system utilities – usually Busybox for space reasons – and a script, called linuxrc, which searches for the LiveCD disc and mounts the SquashFS images. Because the CD-ROM is read-only, it uses UnionFS to “merge” these files with a RAM disk (see Wikipedia for a general explanation of how this works).

Customization

Most of the code in make-livecd is fairly self-explanatory and commented. Check there first before attempting to contact the developers for help.

There are several main subdirectories of cdset/ worth noting:

  • files/ contains the basic LiveCD structure (_LiveCD.tar.bz2), as well as various text files such as the LiveCD’s built-in help messages, splash screen, etc.
  • installer-bin/ contains the sources for various build dependencies – Busybox, etc. – and various other programs needed for the (deprecated) make-cd-set script and Slackware installer.
  • kernels/ contains various gzip’d Linux kernels. These MUST be updated whenever a new kernel is built! See kernel/install-kernel.SlackBuild in the Ultima source directory to build these.
  • tagfiles-*/ contain the Slackware-format “tagfiles” which determine which packages are installed and which are not. Package names followed by ADD are installed, while those followed by SKP are not.

Notes/caveats

  • The make-cd-set script, which is used to build the “old-style” Slackware installer, has been deprecated and is pretty much undocumented.
  • There are probably bugs, and lots of them. Report anything you might find to the Ultima Linux developers.
  • You need to have X11, Python, GTK+ 2 (with PyGTK, and all dependencies) and the Wolvix Control Panel if you want to provide “LiveCD install” mode. Unless, of course, you want to write your own installation script (if you do, please let us know!)
  • Booting from other media – flash drives, etc. – is officially unsupported, and will likely continue to remain so until/unless there is sufficient user demand. Currently we have no plans to change this – flash drives currently seem too slow and unreliable, and not to mention lack sufficient vendor support from PC manufacturers, for this sort of use...