-
Notifications
You must be signed in to change notification settings - Fork 1
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
Default "fast boot" setting is confusing and causes services to be unreliable #24
Comments
Internally, there was quite a bit of back and forth about this and this is what was decided in the end. I haven't seen any complaints before this. When booting with fast boot disabled and without a network connection, the systems waits for dhcp to timeout before continuing. This significantly increases boot time and there is no good workaround. It's really not ideal either way. We could configure things such that dhcpcd tells systemd when the system is online and services which are required to be online don't start until that happens. However, many of the services which require being online don't specify that in their systemd units. Worse still, many services are still provided by sysvinit scripts, which results in circular dependencies. There's going to have to be some compromises until Debian fully migrates to properly configured systemd units. I don't think it really helps you, but jessie lite defaults to having fast boot disabled. If you don't need a desktop, maybe that's a better starting point for you. |
Thanks for the info!
I can see how this would be annoying too, though (maybe because it's bitten me) I'd still value working over potential random failure. I don't know what's visible on the screen at this time, but if the last thing is "Waiting for DHCP..." or something similar, it would be really obvious why the boot is slow and easy to resolve? The problem with the current mechanism is that it's hard to understand what's going on (at least, for a noob like me; I spent so many hours Googling without finding an explanation... it was also hard to know whether it was a Pi-specific problem, a postfix-specific problem or more general issue).
I'm too much of a noob to really understand this; but if this means that it'll be better in future as a result of something that's already happening, that's definitely positive :)
I didn't realise these was such a thing; so I might take a look. The only part of the desktop I really want is a actually just a (decent) fullscreen kiosk-mode browser; but sadly the only option for that (ChromiumOS) seems to come with other compromises (a really cut-back version of Linux). The fix I have for now works and is in my setup script (which I'll always run, because it removes the pi user, changes SSH ports, etc.) so I might just stick with this. I don't expect anything to change as a result of this post (especially now knowing about the timeout delay when no network connected) but maybe it'll show up in Google results for others hit by the same issue and save them some time :-) |
@DanTup You can script @XECDesign I guess it would be nice if all the new raspi-config features got documented which would help prevent confusion like this, or at least give somewhere to point people to for further info. |
@lurch Hmmm, I'm confused - on my system, raspi-config seems to be a shell script. It has a bunch of script implemented at the end (for example, I've scripted expanding the filesystem) but not everything. Yet, I can see that's a C file and it does support more... What's the deal? :/ |
Apologies for the confusion.
sudo raspi-config nonint do_wait_for_network Slow |
Aha! So I went back and looked in the script to see why I thought it wasn't complete...
I guess I overlooked the |
Yes, the documentation needs to be updated and I've added that to the todo list. |
Probably for backwards-compatibility reasons... |
FWIW, it seems like slow boot doesn't solve all issues. Last time my Pi rebooted, I ended up with the same issue - postfix unable to resolve DNS: Dec 3 13:23:51 raspberrypi postfix/smtp[4787]: A08DA200FE: to=, orig_to=root@XXXXXXX, relay=none, delay=19803, delays=19803/0.06/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=aspmx.l.google.com type=MX: Host not found, try again) I don't know whether this means slow boot isn't working correctly though :( |
I feel like if we haven't done it since 2016, it's probably not happening. |
This is really weird. I don't know about 2016, but current systemd has For systems using
(raspi-config's 'slow wait for network connection' changes the way |
dhcpcd was already switched to NetworkManager when we moved to Raspberry Pi OS Bookworm https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/ |
@nickolay Since the bookworm release, the landscape has changed significantly. While I haven't done any extensive testing to verify that this is the case, I would expect things to work out of the box as documented by systemd. What issues do you believe need to be reconsidered? Since we no longer use dhcpcd, this issue is just not relevant anymore, so if there are other reproducible issues related to |
Sorry, I did my research on a bullseye system, and got confused by the fact that raspi-config's |
I don't know if this is the right place for this and I don't think this will be changed, but I wanted to provide feedback in any case. I've spent many hours yesterday evening and most of today trying to figure out why I had services randomly failing at startup - they appeared to be starting during the DHCP process when there was no DNS (postfix takes a copy of /etc/resolv.conf into its chroot during the DHCP process which results in a broken postfix that can't resolve any DNS).
I eventually stumbled upon this magic setting:
And suddenly everything was explained!
Since I can't script raspi-config, I've taken the code from here and added it to my setup script. This has fixed both postfix, and all of the other DNS-related errors that fill syslog on a default Raspian install.
I understand that people want faster boots, but to me it seems a little crazy to have a faster boot at the expense of working services and filling syslog with errors at boot. Maybe I'm the first person to spend > 10 hours debugging before finding this setting; maybe I'm not. It's frustrating in any case. I think the default should be the safe option, and if people want faster boots, they're probably already making tweaks and they can change this (and understand the implications).
The text was updated successfully, but these errors were encountered: