RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.65k stars 1.65k forks source link

fix: Adjust execution order to resolve dns issue in user-rename step #805

Closed Dhanus3133 closed 3 weeks ago

Dhanus3133 commented 3 weeks ago

This PR resolves package installation failure during the user-rename step of the export-image stage. The error occurred due to a temporary DNS resolution issue when fetching the userconf-pi package. (Error Actions URL)

Changes Made

Successful Run After Changes: Actions URL

XECDesign commented 3 weeks ago

Seems like something else is going on there. How could you get to the export stage without working DNS in the first place? I believe the initial resolv.conf file is copied from the host.

Dhanus3133 commented 3 weeks ago

Seems like something else is going on there. How could you get to the export stage without working DNS in the first place? I believe the initial resolv.conf file is copied from the host.

curl -sL https://install.raspap.com | bash -s -- --yes --openvpn 1 --restapi 1 --adblock 1 --wireguard 1 --tcp-bbr 1

Before the export-image stage, the previous stages are executed without OpenVPN enabled, which means DNS relies on the host’s configuration. Since OpenVPN isn’t established until the custom stage, enabling it here leads to issues when exporting the image.

In this commit (7ed5a9f5), I’ve disabled OpenVPN flags and thus the export-image stage builds are successful.

XECDesign commented 3 weeks ago

Yeah, if something else leaves things in a broken state, I don't think it's an ordering issue. It's probably best not to change the DNS settings until the very end, as it currently is.