|
1 | 1 | # BuildLiveCD |
2 | 2 |
|
3 | | -This package contains utilities used to create the LiveCD environment. There are |
4 | | -two major scripts in this package: UpdateEnvironment and CompressAndBuildISO. |
5 | | - |
6 | | -* UpdateEnvironment: |
7 | | -This script fetches + compiles the ISOLINUX bootloader and the BusyBox package |
8 | | -that lives in the LiveCD's initrd. It also fetches a copy of GoboLinux' |
9 | | -InitRDScripts project, which is later packaged next to BusyBox in the initrd. |
10 | | -The GoboLinux logo shown when booting the ISO is also handled here. This script |
11 | | -converts the logo from PPM to LSS16 (the actual format understood by ISOLINUX.) |
12 | | - |
13 | | -* CompressAndBuildISO: |
14 | | -This script performs the automated generation of the LiveCD tree. It is divided |
15 | | -in 4 different stages: |
16 | | - |
17 | | - 1. ROLayer: given a list of GoboLinux binary packages and an empty target directory, |
18 | | -this stage creates a new root filesystem tree (including /System/Settings, Aliens, |
19 | | -and the legacy symlinks under /) and uncompresses all packages under /Programs. |
20 | | -The default target directory is `Output/ROLayer`. |
21 | | - |
22 | | - 2. SquashFS: creates a set of squashfs images from the ROLayer. The binary packages |
23 | | -put on each squashfs image are selected according to the contents of the files at |
24 | | -`BuildLiveCD/Data/Packages-List-*`. The generated squashfs files are saved under |
25 | | -`Output/ISO`. |
26 | | - |
27 | | - 3. InitRD: creates an initrd image by merging the InitRDScripts and BusyBox packages |
28 | | -fetched earlier by UpdateEnvironment. The image, a compressed RAM filesystem, is |
29 | | -stored as `Output/ISO/isolinux/initrd` once it's been prepared. |
30 | | - |
31 | | - 4. ISO: this last stage runs mkisofs on Output/ISO (to produce an ISO file) and |
32 | | -makes that ISO file hybrid so it boots when copied to a USB mass storage device. |
33 | | -The output file is saved as `Output/GoboLinux-NoVersion.iso`. |
| 3 | +This package contains utilities used to create the LiveCD environment, consisting of three major scripts: `UpdateEnvironment`, `CompressAndBuildISO` |
| 4 | +as well as `RefreshLiveCD`. |
| 5 | + |
| 6 | +We support two methods of ISO generation: |
| 7 | +The first method generates a new ISO |
| 8 | +from *scratch*, while the second method allows you to iterate upon an *existing* |
| 9 | +ISO. |
| 10 | + |
| 11 | +> [!NOTE] All commands below are supposed to be run as root. |
| 12 | +
|
| 13 | +## Method 1 |
| 14 | + |
| 15 | +* **`UpdateEnvironment`**: This script fetches + compiles the ISOLINUX |
| 16 | + bootloader and the BusyBox package that lives in the LiveCD's initrd. It also |
| 17 | + fetches a copy of GoboLinux' |
| 18 | + [`InitRDScripts`](https://github.com/gobolinux/InitRDScripts) project, which |
| 19 | + is later packaged next to BusyBox in the initrd. The GoboLinux logo shown when |
| 20 | + booting the ISO is also handled here. This script converts the logo from PPM |
| 21 | + to LSS16 (the actual format understood by ISOLINUX.) |
| 22 | + |
| 23 | +* **`CompressAndBuildISO`**: This script performs the automated generation of |
| 24 | + the LiveCD tree. It is divided in 4 different stages: |
| 25 | + |
| 26 | + 1. ***ROLayer:*** given a list of GoboLinux binary packages and an empty |
| 27 | + target directory, this stage creates a new root filesystem tree (including |
| 28 | + `/System/Settings`, Aliens, and the legacy symlinks under `/`) and |
| 29 | + uncompresses all packages under `/Programs`. The default target directory is |
| 30 | + `Output/ROLayer`. |
| 31 | + |
| 32 | + 2. ***SquashFS:*** creates a set of squashfs images from the *ROLayer*. The |
| 33 | + binary packages put on each squashfs image are selected according to the |
| 34 | + contents of the files at `BuildLiveCD/Data/Packages-List-*`. The generated |
| 35 | + squashfs files are saved under `Output/ISO`. |
| 36 | + |
| 37 | + 3. ***InitRD:*** creates an initrd image by merging the `InitRDScripts` and |
| 38 | + `BusyBox` packages fetched earlier by `UpdateEnvironment`. The image, a |
| 39 | + compressed RAM filesystem, is stored as `Output/ISO/isolinux/initrd` once it's |
| 40 | + been prepared. |
| 41 | + |
| 42 | + 4. ***ISO:*** this last stage runs *mkisofs* on `Output/ISO` (to produce an |
| 43 | + ISO file) and makes that ISO file hybrid so it boots when copied to a USB mass |
| 44 | + storage device. The output file is saved as `Output/GoboLinux-NoVersion.iso`. |
| 45 | + |
| 46 | +## Method 2 |
| 47 | + |
| 48 | +* **`RefreshLiveCD`**: This script provides an alternative, more simplistic |
| 49 | + approach by iterating upon an existing ISO as a base. The first time it is |
| 50 | + called, the script extracts all squashfs images from a reference ISO to a |
| 51 | + given work directory. When called a second time, it can take an extra |
| 52 | + argument: a path with a collection of tarballs (GoboLinux packages, in |
| 53 | + *.tar.bz2* format). The script will then update the old versions with the new |
| 54 | + ones and will regenerate an ISO. |
| 55 | + |
| 56 | + > [!IMPORTANT] |
| 57 | + > Ensure that kernel module *loop* is loaded: `sudo modprobe loop`. |
| 58 | + |
| 59 | + *Usage:* |
| 60 | + ``` |
| 61 | + # RefreshLiveCD <ISO_image> <work_dir> (<package_dir>) |
| 62 | + ``` |
| 63 | + |
| 64 | + > [!WARNING] |
| 65 | + > Your currently symlinked kernel *has* to match the one found on the ISO – |
| 66 | + > else initramfs generation will fail! In case of mismatch, you can supply |
| 67 | + > your current/desired kernel via `<package_dir>` as a package. |
0 commit comments