You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+116-4Lines changed: 116 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,22 +36,132 @@ earthly +build
36
36
earthly +build --version=1.0.0
37
37
```
38
38
39
+
### Install via Debian Package (Ubuntu/Debian)
40
+
41
+
For Ubuntu and Debian systems, you can build and install OS Image Composer as a Debian package. This method provides a cleaner installation with proper package management.
42
+
43
+
#### Build the Debian Package
44
+
45
+
Use the Earthly `+deb` target to create a `.deb` package:
46
+
47
+
```bash
48
+
# Build with default parameters (version 1.0.0, amd64)
49
+
earthly +deb
50
+
51
+
# Build with custom version and architecture
52
+
earthly +deb --VERSION=1.2.0 --ARCH=amd64
53
+
54
+
# Build for ARM64
55
+
earthly +deb --VERSION=1.0.0 --ARCH=arm64
56
+
```
57
+
58
+
The package will be created in the `dist/` directory as `os-image-composer_<VERSION>_<ARCH>.deb`.
59
+
60
+
#### Install the Package
61
+
62
+
```bash
63
+
# Install using apt (recommended - automatically resolves and installs dependencies)
64
+
sudo apt install <PATH TO FILE>/os-image-composer_1.0.0_amd64.deb
65
+
66
+
# Or using dpkg (requires manual dependency installation)
**Note:** Using `apt install` is strongly recommended as it automatically handles all dependencies. If you use `dpkg -i` and encounter dependency errors, run `sudo apt-get install -f` to fix them.
77
+
78
+
#### Verify Installation
79
+
80
+
```bash
81
+
# Check if package is installed
82
+
dpkg -l | grep os-image-composer
83
+
84
+
# View installed files
85
+
dpkg -L os-image-composer
86
+
87
+
# Verify the binary works
88
+
os-image-composer version
89
+
```
90
+
91
+
#### Package Contents
92
+
93
+
The Debian package installs the following files:
94
+
95
+
***Binary:**`/usr/local/bin/os-image-composer` - Main executable
96
+
***Configuration:**`/etc/os-image-composer/` - Default configuration and OS variant configs
97
+
-`/etc/os-image-composer/config.yml` - Global configuration with system paths
98
+
-`/etc/os-image-composer/config/` - OS variant configuration files
After installation via the Debian package, you can use `os-image-composer` directly from any directory. The configuration is pre-set to use system paths, and you can reference the example templates from `/usr/share/os-image-composer/examples/`.
104
+
105
+
#### Package Dependencies
106
+
107
+
The Debian package automatically installs the following runtime dependencies:
108
+
109
+
**Required Dependencies:**
110
+
*`bash` - Shell for script execution
111
+
*`coreutils` - Core GNU utilities
112
+
*`unzip` - Archive extraction utility
113
+
*`dosfstools` - FAT filesystem utilities
114
+
*`xorriso` - ISO image creation tool
115
+
*`grub-common` - Bootloader utilities
116
+
117
+
**Recommended Dependencies (installed if available):**
118
+
*`mmdebstrap` - Debian bootstrap tool (preferred, version 1.4.3+ required)
119
+
*`debootstrap` - Alternative Debian bootstrap tool
120
+
121
+
**Important:**`mmdebstrap` version 0.8.x (included in Ubuntu 22.04) has known issues. For Ubuntu 22.04 users, you must install `mmdebstrap` version 1.4.3+ manually as described in the [prerequisite documentation](./docs/tutorial/prerequisite.md#mmdebstrap).
122
+
123
+
#### Uninstall the Package
124
+
125
+
```bash
126
+
# Remove package (keeps configuration files)
127
+
sudo dpkg -r os-image-composer
128
+
129
+
# Remove package and configuration files
130
+
sudo dpkg --purge os-image-composer
131
+
```
132
+
39
133
### Install the Prerequisites for Composing an Image
40
134
41
-
Before you compose an operating system image with the OS Image Composer tool, follow the [instructions to install two prerequisites](./docs/tutorial/prerequisite.md):
135
+
Before you compose an operating system image with the OS Image Composer tool, you need to install additional prerequisites:
42
136
43
-
*`ukify`, which combines components -- typically a kernel, an initrd, and a UEFI boot stub -- to create a signed Unified Kernel Image (UKI), which is a PE binary that firmware executes to start an embedded Linux kernel.
137
+
**Required Tools:**
44
138
45
-
*`mmdebstrap`, which downloads, unpacks, and installs Debian packages to initialize a chroot.
139
+
***`ukify`** - Combines kernel, initrd, and UEFI boot stub to create signed Unified Kernel Images (UKI)
140
+
***Ubuntu 23.04+**: Available via `sudo apt install systemd-ukify`
141
+
***Ubuntu 22.04 and earlier**: Must be installed manually from systemd source
142
+
* See [detailed ukify installation instructions](./docs/tutorial/prerequisite.md#ukify)
143
+
144
+
***`mmdebstrap`** - Downloads and installs Debian packages to initialize a chroot
145
+
***Ubuntu 23.04+**: Automatically installed with the Debian package (version 1.4.3+)
146
+
***Ubuntu 22.04**: The version in Ubuntu 22.04 repositories (0.8.x) has known bugs and will not work
147
+
***Required:** Manually install version 1.4.3+ following [mmdebstrap installation instructions](./docs/tutorial/prerequisite.md#mmdebstrap)
148
+
***Alternative**: Can use `debootstrap` for Debian-based images
149
+
150
+
**Note:** If you installed os-image-composer via the Debian package, `mmdebstrap` may already be installed. You still need to install `ukify` separately following the instructions above.
46
151
47
152
### Compose or Validate an Image
48
153
49
-
Now you're ready to compose an image from a built-in template or validate a template.
154
+
Now you're ready to compose an image from a built-in template or validate a template.
**Note:** When installed via the Debian package, the default configuration is located at `/etc/os-image-composer/config.yml` and is pre-configured with system paths.
0 commit comments