Update provisioning documentation and scripts for improved Proxmox deployment</message>
<message>Add a new step-by-step guide for deploying the CM4 eMMC provisioning service on a new Proxmox instance, enhancing clarity for users. Update existing documentation to reflect changes in network configuration options, including the introduction of LAN subnet settings for DHCP and TFTP. Modify cloud-init scripts to ensure proper management of DNS settings and improve the handling of network interfaces. Additionally, enhance the toggle script for network boot to dynamically read the LAN gateway from configuration files, streamlining the setup process and improving user experience.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# How to edit cloud-init files on the device before capturing the image
|
||||
# How to edit cloud-init files on the device or on an image file
|
||||
|
||||
The cloud-init **NoCloud** files live on the **boot partition**. On the running device they are at:
|
||||
|
||||
@@ -77,6 +77,34 @@ They are owned by **root** and need **sudo** to edit.
|
||||
|
||||
---
|
||||
|
||||
## Method 3: Edit on an image file (.img or .img.xz)
|
||||
|
||||
To edit cloud-init **inside a disk image** (e.g. `gnss-bootstrap-20260223-215010.img.xz`) without booting the device:
|
||||
|
||||
1. **Run the helper script** (requires `sudo` for loop device and mount):
|
||||
|
||||
```bash
|
||||
cd /path/to/reTerminal-DM4
|
||||
./emmc-provisioning/scripts/edit-cloudinit-on-image.sh gnss-bootstrap-20260223-215010.img.xz
|
||||
```
|
||||
|
||||
2. The script will:
|
||||
- Decompress the `.img.xz` (if needed; allow ~3GB free space and a minute or two)
|
||||
- Attach the image with `losetup` and mount the **boot** (FAT32) partition
|
||||
- Open your `$EDITOR` (or `nano`) on `user-data`, `meta-data`, and `network-config`
|
||||
- After you save and exit, unmount and recompress, **overwriting** the original `.img.xz`
|
||||
|
||||
3. **Back up the image** before running if you want to keep the original:
|
||||
```bash
|
||||
cp gnss-bootstrap-20260223-215010.img.xz gnss-bootstrap-20260223-215010.img.xz.bak
|
||||
```
|
||||
|
||||
4. **Options:**
|
||||
- `--no-recompress` — Leave the image decompressed after editing (do not overwrite the `.img.xz`).
|
||||
- `--replace-with-repo` — Copy `user-data`, `meta-data`, and `network-config` from `emmc-provisioning/cloud-init/` into the image before opening the editor (useful to start from repo templates).
|
||||
|
||||
---
|
||||
|
||||
## What to edit (typical)
|
||||
|
||||
- **meta-data**
|
||||
|
||||
Reference in New Issue
Block a user