All examples are in the examples-subdirectory of the GENDIST distribution. Two types of examples are available: examples of packages (in subdirectories of examples/packages), and installable examples, which show how the build-system generated by GENDIST works.
You will find a README in each example directory with some more detailed information on how to install and use it.
This is a very simplistic example. It creates a Linux distribution which only contains a shell (/bin/bash) and some support files. This example has no additional prereqs (except for a kernel), so it should work out of the box on every development system. This example is discussed in detail in the tutorial.
HAL91 is an existing single-disk Linux distribution. This example shows how you could use GENDIST to repackage it. HAL91 is currently distributed as a floppy-image, with GENDIST it is just a matter of calling make to create an ISO-image.
IsoLinux will generate an isolinux-based bootable CD-Rom from an existing distribution. It uses the isolinux.bin bootloader which is part of the syslinux-package from H.P.Anvin (see: http://syslinux.zytor.com).
The CD-Rom will contain a huge initial ramdisk created from the directories /bin, /dev, /etc, /home, /lib, /root, /sbin and /var. The CD itself will contain the directories /usr/bin and /usr/lib, so you can mount the CD after booting on /usr. Of course, all of this is configurable.
To build an isolinux-based CD, you need a current version of mkisofs and enough diskspace in the build-directory (normally <path-to-IsoLinux>/build) to hold about twice the size of the CD.
To run the CD, your BIOS must support booting in no-emulation mode and you need a huge amount of RAM. To find out about the first prereq, the best thing is to just try it.
The amount of RAM needed depends on your configuration. The default setup will generate an initial ramdisk about 60MB large (tested with Red-Hat and SuSE), but if your /home-directory is large, it can be much larger.
There is one central configuration file, config.inc, in the root-directory of the IsoLinux-distribution. Read this file carefully and change the configuration variables if necessary. Important variables:
To build an ISO-image, just run
# make iso KERNEL=<path-to-your-kernel>
You can also define the KERNEL-variable in the config.inc file.
The size and number of I-nodes of the initial ramdisk is calculated automatically. This sometimes failes. Building will then stop with
error: no space left on root-disk!
To check if it is a space or an I-node problem run the following commands:
# mount -o loop <path-to-IsoLinux>/build/initrd /mnt # df # umount /mnt
The df-command will give you a hint if it is a space problem.
To increase the size, change the value of RD_SIZE_INC in config.inc. To increase the number of I-nodes, set RD_NODES_INC. Run "make clean" before rebuilding the image.
This example shows how you can use the GENDIST-generated build-system to create you distribution from source. The Busybox-source is just plugged into the system as an additional GENDIST-package. The example uses the pristine-setup feature of Busybox.
To try this example, you basically only need the Busybox-source in addition to the normal development tools (make, compiler, lilo, syslinux etc).