Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System | Separate first boot configurations from regular boot procedures. #2791

Closed
FredericGuilbault opened this issue May 12, 2019 · 7 comments

Comments

@FredericGuilbault
Copy link
Contributor

It's just to let you know that im working on this.

https://github.com/FredericGuilbault/DietPi/tree/improvement/Seperate_first_boot

@MichaIng
Copy link
Owner

@FredericGuilbault
I was already thinking about the same. It should be even possible to move first run update and installs (when AUTO_SETUP_AUTOMATED=1 chosen) all into a systemd unit so that it runs before first login: #2520

It's just the following things that need to be taken care off:

  • Everything that does not need network and network pre-configuration (/etc/network/interface, applying chosen settings from dietpi.txt) needs to be done before the network interfaces are brought up (Before=network-pre.target).
  • Then bringing network interfaces up including the workarounds for some devices, especially on Jessie where it is not 100% reliable (After=network.target). Waiting for/reading back online status and running time sync etc. DietPi-Update could then be run automatically + the first run steps that are currently part of DietPi-Software or even chosen automated software installs.

@MichaIng MichaIng changed the title Seperate first boot configurations from reguliar boot procedures. System | Seperate first boot configurations from regular boot procedures. May 12, 2019
@MichaIng MichaIng changed the title System | Seperate first boot configurations from regular boot procedures. System | Separate first boot configurations from regular boot procedures. May 12, 2019
@FredericGuilbault
Copy link
Contributor Author

FredericGuilbault commented May 14, 2019

In dietpi/boot line 62

#----------------------------------------------------------------
# WiFi Country | Additional fallback for (older kernel?) devices that fail with wpa_supplicant.conf https://github.com/MichaIng/DietPi/issues/838
command -v iw &> /dev/null && iw reg set "$(grep -m1 '^[[:blank:]]*CONFIG_WIFI_COUNTRY_CODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')" &
#----------------------------------------------------------------

IDK much about wifi,Does it really need to check if the country code exist at each boot ?

@MichaIng
Copy link
Owner

@FredericGuilbault
As you can read from the link, it sets the country code as some devices (SBC/kernel/network combination) does not seem to apply the related setting from wpa_supplicant.conf correctly.

We could recheck this with the devices reported. Since it was an RPi, perhaps one of the many kernel/firmware updates meanwhile fixed this.

The same applies for some other WiFi workarounds (ifup/ifdown). The networking service (re)start is currently indeed required on Jessie systems, but the manual ifup/ifdown could be rechecked.

@FredericGuilbault
Copy link
Contributor Author

Does it have to apply the settings over and over at each reboot ?

@MichaIng
Copy link
Owner

@FredericGuilbault
Which settings you mean? Those not inside the first run functions yes, but some review would not hurt.

@Fourdee
Copy link
Collaborator

Fourdee commented May 20, 2019

@FredericGuilbault

Does it have to apply the settings over and over at each reboot ?

Yes, as not all WiFi chipsets support the options set in wpa_supplicant.conf, last time I checked.

@MichaIng MichaIng added this to the v6.25 milestone Jun 4, 2019
@MichaIng
Copy link
Owner

MichaIng commented Jun 4, 2019

Related PR: #2833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants