Skip to content

Commit

Permalink
README.md: improve documentation, link to custom.toml gist
Browse files Browse the repository at this point in the history
  • Loading branch information
lpenz committed Aug 27, 2023
1 parent f19e40c commit b4bb1bc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# disk-img-tool

**disk-img-tool** can be used to resize, list/get/put files and shell
into raw disk images, including Raspberry Pi OS release.
into raw disk images, including Raspberry Pi OS release and other
Linux releases.


## Usage
Expand All @@ -32,7 +33,7 @@ into raw disk images, including Raspberry Pi OS release.
writing it to the path *dest*.


## Examples
## Examples using the Raspberry Pi OS image

For the sake of having an example, we can download one of the
installation images from the
Expand All @@ -41,6 +42,11 @@ and decompress it with `xz -d raspios-bullseye-arm64.img.xz`. That
leaves us with a *raspios-bullseye-arm64.img* file that we can then
use with the commands below.

In fact, the Raspberry Pi OS supports the injection of a `custom.toml`
file into its installation media which allows us to define the
hostname, initial user with ssh public keys, wlan configuration,
etc. Here's a sample with more documentation: [custom.toml]

Note: most of these need *sudo* to work due to the need to *mount*
directories. We can use the `-v` flag before the image name to ask the
tool to print all commands used.
Expand Down Expand Up @@ -89,10 +95,6 @@ tool to print all commands used.
$ sudo disk-img-tool -v raspio-bullseye-arm64.img put custom.toml /boot/
```

The `custom.toml` file above can actually be used to pre-configure the
Raspberry Pi installation image with a username (instead of the defaul
*rpi*), password, public ssh keys, and set up the wlan and locales.


## Installation

Expand Down Expand Up @@ -169,3 +171,4 @@ disk-img-tool uses the standard python3 infra. To develop and test the module:
[nix]: https://nixos.org/
[flake]: https://nixos.wiki/wiki/Flakes
[`venv`]: https://docs.python.org/3/library/venv.html
[`custom.toml`]: https://gist.github.com/lpenz/ef21bb38a7aa12ebde17fa719a8546b5

0 comments on commit b4bb1bc

Please sign in to comment.