RPi-Distro / pi-gen

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

Running in chroot, ignoring command 'start' during stage2/02-net-tweaks #657

Closed Mawiguk0 closed 1 year ago

Mawiguk0 commented 1 year ago

Log Output:

[13:01:27] End /root/mypi/stage2/02-net-tweaks/00-packages
[13:01:27] Begin /root/mypi/stage2/02-net-tweaks/01-run.sh
'files/wpa_supplicant.conf' -> '/root/my-pi/work/my-pi/stage2/rootfs/etc/wpa_supplicant/wpa_supplicant.conf'
Running in chroot, ignoring command 'start'

The config file is pretty plain

# Config used to build my-pi images for RPi3 and RPi4

IMG_NAME="my-pi"
RELEASE="bullseye"
LOCALE_DEFAULT="de_DE.UTF-8"
TIMEZONE_DEFAULT="Europe/London"
FIRST_USER_NAME="redacted"
#FIRST_USER_PASS="redacted"
FIRST_USER_PASS="redacted"
STAGE_LIST="stage0 stage1 stage2"
DEPLOY_COMPRESSION=none

TARGET_HOSTNAME=my-pi
KEYBOARD_KEYMAP="de"
DISABLE_FIRST_BOOT_USER_RENAME=1

WPA_ESSID="redacted"
WPA_PASSWORD="redacted"
WPA_COUNTRY="de"

It fails during this execution in stage2/02-net-tweaks/01-run.sh line: 11-15

if [ -v WPA_COUNTRY ]; then
        on_chroot <<- EOF
                SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}"
        EOF
fi

Reproduce:

clone and build pi-gen

Mawiguk0 commented 1 year ago

@XECDesign just pinging you up because of your activity in this repo. Do you know who to ask or ping for this issue?

XECDesign commented 1 year ago

Hey, no it's alright you've pinged the right person. It's just that I haven't gotten around to taking a proper look at this yet. It sounds like raspi-config returns false when it shouldn't.

XECDesign commented 1 year ago

Does it work now if you change WPA_COUNTRY="de" to WPA_COUNTRY="DE"?

Mawiguk0 commented 1 year ago

Same behavior with WPA_COUNTRY="DE" and WPA_COUNTRY="GB" or WPA_COUNTRY="en"

I just ran the build process with WPA_COUNTRY not set to anything by commenting it. The build is running just fine without that.

Mawiguk0 commented 1 year ago

I guess this issue from raspi-config is relating to this behavior: raspi-config issue 160

XECDesign commented 1 year ago

Nope that issue is unrelated.

Is this a clean build or are you continuing a previous one?

I recently uploaded a new raspi-config which fixed the issue for me.

I’ll double check when I get a chance.

Mawiguk0 commented 1 year ago

We can close this issue i guess^^

I just Raspberry Pi OS without any issues on a new build machine...

Thanks for sticking with me @XECDesign ! :)

Mawiguk0 commented 1 year ago

Closed.

Morrigan-Ship commented 1 year ago

same problem systemctl not work chroot

XECDesign commented 1 year ago

same problem systemctl not work chroot

It's not meant to.