Skip to content

service rc-local.service fails to execute /etc/rc.local #5879

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

Closed
aspymid opened this issue Jan 21, 2024 · 2 comments
Closed

service rc-local.service fails to execute /etc/rc.local #5879

aspymid opened this issue Jan 21, 2024 · 2 comments

Comments

@aspymid
Copy link

aspymid commented Jan 21, 2024

Describe the bug

In a headless installation the rc-local.service will fail to execute the /etc/rc.local file. The failure is as follows:

Jan 21 18:29:16 dclock3 systemd[1]: Starting /etc/rc.local Compatibility...
Jan 21 18:29:16 dclock3 systemd[324]: rc-local.service: Failed to set up standard output: No such device
Jan 21 18:29:16 dclock3 systemd[324]: rc-local.service: Failed at step STDOUT spawning /etc/rc.local: No such device
Jan 21 18:29:16 dclock3 systemd[1]: rc-local.service: Control process exited, code=exited, status=209/STDOUT
Jan 21 18:29:16 dclock3 systemd[1]: rc-local.service: Failed with result 'exit-code'.
Jan 21 18:29:16 dclock3 systemd[1]: Failed to start /etc/rc.local Compatibility.

Work around:
Modify /etc/systemd/system/rc-local.service.d/ttyoutput.conf to read as follows:
[Service]
StandardOutput=journal+console
StandardError=journal+console

instead of:
[Service]
StandardOutput=tty

This bug is also found on raspberry pi 2w and I suspect all the others.

Steps to reproduce the behaviour

The reproduce:

  1. make a fresh installation of raspbian, (a headless installation)
  2. make sure that the servide rc-local.service is enabled.
  3. reboot
  4. get disagnostic of the failure with : journalctl -u rc-local

Device (s)

Raspberry Pi 1 Mod. B+

System

Raspberry Pi reference 2023-12-05
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 446f3e34c8ceb33dfe7bd38578f1cd6b6afe19da, stage4
root@dclock3:# vcgencmd version
Mar 17 2023 10:52:42
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)
root@dclock3:
# uname -a
Linux dclock3 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l GNU/Linux

Logs

No response

Additional context

No response

@aspymid aspymid changed the title service rc-loca.service fails to execute /etc/rc.local service rc-local.service fails to execute /etc/rc.local Jan 21, 2024
@pelwell
Copy link
Contributor

pelwell commented Jan 22, 2024

That's not a kernel problem - please report it here instead: https://github.com/RPi-Distro/repo/issues
I'd transfer the Issue over, but that's not possible between two GitHub organisation.

@pelwell pelwell closed this as completed Jan 22, 2024
@aspymid
Copy link
Author

aspymid commented Jan 22, 2024 via email

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

No branches or pull requests

2 participants