[RPi4] Wait for Network

  • Hey Team,


    I am running the lastest build 12.0.2 on a rpi 4 2gb. I am dealing with an issue where the toggle for wait for Network before booting in the Libreelec settings is not working.


    I can only boot with Ethernet cable plugged in. Is there any way around this? Or anyway edit files on the SD card so that I can boot to Kodi successfully.

  • I have fuzzy recall that the setting is fixed/working in the LE13 nightlies, so perhaps put one on a spare SD card and see (first).

    There is no way to configure networking from the SD card.

  • the toggle for wait for Network before booting in the Libreelec settings is not working.

    What means for you that "not working"? Because if I remember correctly, that option have a timeout value. So if it set only a few second to wait, when expired, the LE will continue to boot even without network connection.

  • So if it set only a few second to wait, when expired, the LE will continue to boot even without network connection.

    That's normally true, but when you enable the wireguard.service you add hard "after ntp" and "before kodi" dependencies to the boot sequence and because there is no valid network connection the ntp check never completes and thus the Kodi service which makes the wait-for-network check is never reached.

    The only way I think you can workaround this, is to stop/disable/mask the embedded Kodi startup systemd service (which runs an embedded shell script) and replace it with a modified service and script that's enabled/run from from somewhere on /storage; with the modified script containing logic to start wireguard before Kodi only when a valid network connection has been established. You basically need to extend the wait-for-network logic to include wireguard.

  • So long story short, I do use wireguard, which means I never got the timeout :(

    And instead of waiting for your reply I tried loads of different settings to see if I could effect the boot procedure and now it wont boot at all. The last setting I changed was to do with USB internet sharing. Is there anyway to disable this?

    I could wipe the USB card and start again, it is possible, but I have a lot of scripts in lost+found that I would like to recover. Any ideas?

  • Sorry this go beyond my knowledge:)

    For my problem of WireGuard timeout I found the solution in this Thread

    maybe if you are able to access to the storage partition from another device you can modify systemd file

    In my case : RP3, I can read the sd card and modify config files which helped :)


    Hope you will find someone that can help you

  • Perfect if you find your solution.

    the file I was talking about is located in the STORAGE partition - in my case it's not the LIBRELEC one

    /Volumes/STORAGE/.config/system.d/wireguard.service