Skip to content

Commit 4df4bbe

Browse files
committed
update readme
Signed-off-by: gbionescu <[email protected]>
1 parent cdcbcf0 commit 4df4bbe

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

README.md

+26-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Rootfs image builder
22

3-
This repo builds an `ext4` or an `initrd` using Docker containers.
3+
This repo builds root filesystem images or initrd images based on Docker containers.
44

55
Note: *some assembly required.*
66

7-
## Prerequisites
7+
Images are generated by:
8+
1. Pulling a base image from Docker Hub.
9+
2. Installing systemd or any other init system. Alpine uses OpenRC while Amazon Linux and Ubuntu use systemd.
10+
3. Installs sshd and other utilities to make the image usable.
11+
4. Sets `root:root` as the default user and password.
12+
5. Packs the docker container into a rootfs/initrd image.
13+
14+
See the [releases](https://github.com/gbionescu/build-rootfs/releases) page for pre-built images and kernel.
815

9-
Your user needs to be able to run `docker`.
16+
## Prerequisites
1017

11-
If not, run scripts with sudo: `sudo build-rootfs.sh`.
18+
Have `docker` installed.
1219

1320
## Building a rootfs
1421

@@ -20,10 +27,10 @@ Simply run:
2027

2128
Where `rootfs-type` is one of the root filesystem generators that starts with `type-`.
2229

23-
For example, to generate an `Ubuntu 21.04` rootfs, run:
30+
For example, to generate an `alpine` rootfs, run:
2431

2532
```bash
26-
./build-rootfs.sh ubuntu21.04
33+
./build-rootfs.sh alpine
2734
```
2835

2936
Notes:
@@ -68,7 +75,19 @@ twice because systemd needs to be initialized.
6875

6976
Just add a new folder with the 3 files described above
7077

78+
### Tests
79+
80+
Currently the built-in tests build the rootfs for all the types and run them with QEMU.
81+
82+
Tests poll the serial console output for the `login:` prompt.
83+
84+
To run the tests, simply run:
85+
86+
```bash
87+
./tests/test-all.sh
88+
```
89+
7190
## Troubleshooting
7291

7392
- Need a larger image? Change `init-rootfs.sh`.
74-
93+
- Need to install more packages? Change `inside-container.sh`.

0 commit comments

Comments
 (0)