Update cloud-init scripts and documentation for enhanced DNS management and provisioning steps</message>
<message>Modify the first-boot.sh script to include an additional step for managing screen brightness during the provisioning process. Update user-data.bootstrap to improve DNS configuration by ensuring NetworkManager manages /etc/resolv.conf correctly, and remove obsolete scripts related to systemd-resolved. Enhance documentation to reflect these changes and clarify the setup process for users, improving overall network boot functionality and user experience.
This commit is contained in:
@@ -20,13 +20,13 @@ This document describes how to configure provisioned devices (e.g. Raspberry Pi
|
||||
|
||||
## What to change in cloud-init
|
||||
|
||||
### Option A: user-data.bootstrap (systemd-resolved)
|
||||
### Option A: user-data.bootstrap (uses Option B for RPi OS)
|
||||
|
||||
**File:** `cloud-init/user-data.bootstrap`
|
||||
|
||||
- **manage_resolv_conf: false** — already set; cloud-init must not overwrite resolv.conf.
|
||||
- **systemd-resolved** — runcmd enables/starts resolved and makes `/etc/resolv.conf` a symlink to `stub-resolv.conf`. Resolved gets DNS from NetworkManager (and from the hooks in write_files).
|
||||
- **NetworkManager** — `99-use-resolved.conf` has `dns=systemd-resolved` and `rc-manager=unmanaged` so NM doesn’t write resolv.conf; resolved does.
|
||||
- **NetworkManager** — `99-resolv-dhcp.conf` has `rc-manager=symlink` so NM creates `/etc/resolv.conf` with DHCP DNS. RPi OS does not use systemd-resolved by default.
|
||||
- **runcmd** — removes static resolv.conf and restarts NM so it creates the symlink with DHCP option 6.
|
||||
- **Bootstrap script** — must **not** write `nameserver 8.8.8.8` (or any fixed server) into `/etc/resolv.conf`. Our `bootstrap.sh` no longer does that.
|
||||
|
||||
No extra changes needed if you use `user-data.bootstrap` as-is; just ensure your bootstrap script does not touch resolv.conf.
|
||||
|
||||
Reference in New Issue
Block a user