Skip to content

Commit 0d1ab99

Browse files
committed
README.md: refactor
cleans up README.md, generates it from README.md.in with `make README.md` to easily include help output of each script
1 parent 65b9796 commit 0d1ab99

4 files changed

Lines changed: 318 additions & 32 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md linguist-generated=true

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ COMPRESSOR_THREADS:=2
3434

3535
all:
3636

37+
README.md: README.md.in build-x86-images.sh mklive.sh mkrootfs.sh mkplatformfs.sh mkimage.sh mknet.sh
38+
printf '<!-- DO NOT EDIT, generated by make README.md -->\n\n' > README.md
39+
cat README.md.in >> README.md
40+
for script in build-x86-images mklive mkrootfs mkplatformfs mkimage mknet; do \
41+
printf '### %s.sh\n\n```\n' "$${script}" >> README.md ; \
42+
"./$${script}.sh" -h >> README.md ; \
43+
printf '```\n\n' >> README.md ; \
44+
done
45+
3746
checksum: dist
3847
cd distdir-$(DATECODE)/ && sha256 * > sha256sum.txt
3948

README.md

Lines changed: 218 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md.in

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# The Void Linux live image/rootfs generator and installer
2+
3+
## Overview
4+
5+
This repository contains several utilities:
6+
7+
* [*mklive.sh*](#mklivesh) - The Void Linux live image generator for x86
8+
* [*build-x86-images.sh*](#build-x86-imagessh) - Wrapper script to generate bootable
9+
and installable live images for x86
10+
* [*mkrootfs.sh*](#mkrootfssh) - The Void Linux rootfs generator for all platforms
11+
* [*mkplatformfs.sh*](#mkplatformfssh) - The Void Linux filesystem tool to produce
12+
a rootfs for a particular platform
13+
* [*mkimage.sh*](#mkimagesh) - The Void Linux image generator for ARM platforms
14+
* [*mknet.sh*](#mknetsh) - Script to generate netboot tarballs for Void
15+
* *installer.sh* - The Void Linux el-cheapo installer for x86
16+
* *release.sh* - interacts with GitHub CI to generate and sign images for releases
17+
18+
### Workflow
19+
20+
#### Generating x86 live ISOs
21+
22+
To generate a live ISO like the officially-published ones, use
23+
[*build-x86-images.sh*](#build-x86-imagessh). To generate a more basic live ISO
24+
(which does not include things like `void-installer`), use [*mklive.sh*](#mklivesh).
25+
26+
#### Generating ROOTFS tarballs
27+
28+
ROOTFS tarballs contain a basic Void Linux root filesystem without a kernel.
29+
These can be useful for doing a [chroot install](https://docs.voidlinux.org/installation/guides/chroot.html)
30+
or for [chroots and containers](https://docs.voidlinux.org/config/containers-and-vms/chroot.html).
31+
32+
Use [*mkrootfs.sh*](#mkrootfssh) to generate a Void Linux ROOTFS.
33+
34+
#### Generating platform-specific tarballs
35+
36+
Platform-specific ROOTFS tarballs, or PLATFORMFS tarballs, contain a basic Void
37+
Linux root filesystem including a kernel. These are commonly used for bootstrapping
38+
ARM systems or other environments that require platform-specific kernels, like
39+
Raspberry Pis.
40+
41+
First create a ROOTFS for the desired architecture, then use
42+
[*mkplatformfs.sh*](#mkplatformfssh) to generate a Void Linux PLATFORMFS.
43+
44+
#### Generating ARM images
45+
46+
Platform-specific filesystem images contain a basic filesystem layout (`/` and
47+
`/boot` partitions), ready to be copied to the target drive with `dd`. despite
48+
the naming, they are not traditional "live" images like those available on x86
49+
platforms, and do not need installation like live ISOs.
50+
51+
To generate these images, first create a PLATFORMFS for the desired platform,
52+
then use [*mkimage.sh*](#mkimagesh) to generate the image.
53+
54+
## Dependencies
55+
56+
Note that void-mklive is not guaranteed to work on distributions other than Void
57+
Linux, or in containers.
58+
59+
* Compression type for the initramfs image (by default: liblz4 for lz4, xz)
60+
* xbps>=0.45
61+
* qemu-user-static binaries (for mkrootfs)
62+
* bash
63+
64+
## Kernel Command-line Parameters
65+
66+
`void-mklive`-based live images support several kernel command-line arguments
67+
that can change the behavior of the live system:
68+
69+
- `live.autologin` will skip the initial login screen on `tty1`.
70+
- `live.user` will change the username of the non-root user from the default
71+
`anon`. The password remains `voidlinux`.
72+
- `live.shell` sets the default shell for the non-root user in the live environment.
73+
- `live.accessibility` enables accessibility features like the console screenreader
74+
`espeakup` in the live environment.
75+
- `console` can be set to `ttyS0`, `hvc0`, or `hvsi0` to enable `agetty` on that
76+
serial console.
77+
- `locale.LANG` will set the `LANG` environment variable. Defaults to `en_US.UTF-8`.
78+
- `vconsole.keymap` will set the console keymap. Defaults to `us`.
79+
80+
### Examples:
81+
82+
- `live.autologin live.user=foo live.shell=/bin/bash` would create the user `foo`
83+
with the default shell `/bin/bash` on boot, and log them in automatically on `tty1`
84+
- `live.shell=/bin/bash` would set the default shell for the `anon` user to `/bin/bash`
85+
- `console=ttyS0 vconsole.keymap=cf` would enable `ttyS0` and set the keymap in
86+
the console to `cf`
87+
- `locale.LANG=fr_CA.UTF-8` would set the live system's language to `fr_CA.UTF-8`
88+
89+
## Usage
90+

0 commit comments

Comments
 (0)