LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-03-2016, 06:56 AM   #1
cbeke
LQ Newbie
 
Registered: May 2016
Posts: 2

Rep: Reputation: Disabled
Exclamation rc.local failing on Debian Jessie


Hi,

I'm having issues with an rc.local file in a Debian Jessie based RootFS.

The error I get during boot (which I can read via a USB to UART cable) is the following:

Code:
[FAILED] Failed to start /etc/rc.local Compatibility.
See 'systemctl status rc-local.service' for details.
I can't login to the device, so I have no way of running systemctl status on this.

Any ideas?

Kind regards,

Chris
 
Old 05-03-2016, 09:28 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
rc.local on RHEL7 (which also does Systemd like your Debian version) says:

Code:
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.

touch /var/lock/subsys/local
 
Old 05-03-2016, 09:54 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Looking at /usr/lib/systemd/system/rc-local.service I see it contains:

Code:
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
[Unit]
Description=/etc/rc.d/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.d/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.d/rc.local start
TimeoutSec=0
RemainAfterExit=yes
That along with the rc.local contents shows (On RHEL7 at least) it doesn't run rc.local unless you make it executable. I don't know if this is the same on Debian Jessie but suspect it is.

On RHEL7 rc.local is /etc/rc.d/rc.local and /etc/rc.local is a symbolic link to the one in rc.d.

Last edited by MensaWater; 05-03-2016 at 09:56 AM.
 
Old 05-03-2016, 11:04 AM   #4
cbeke
LQ Newbie
 
Registered: May 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi MensaWater,

We're aware that you preferably want to use separate services, but we're short on time and we wanna keep it like this for now.

Bit more background:

/etc/rc.local is a custom bash script (permissions set to 755) that's triggered by the /usr/lib/systemd/system/rc-local.service script, which we altered to look like this:

Code:
[Unit]
Description=/etc/rc.local Compatibility 
ConditionFileIsExecutable=/etc/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0 
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
This runs fine on one of our other machines, but somehow when this is ran on boot, it doesn't work.

We get the login prompt via the UART debug line, but not via normal USB slave screen connection (beagle bone).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Jessie boot cd failing to boot on a Poweredge R905 Jasambo Debian 5 06-15-2015 04:38 PM
[SOLVED] Blackscreen installing Debian Jessie upgrading from Debian Wheezy ismaeltxu Linux - Newbie 2 05-11-2015 01:47 AM
Debian's new Art Theme (Jessie aka Debian 8.x). jens Debian 2 11-11-2014 02:48 AM
LXer: Ubuntu 14.04 vs. Debian 7.3 vs. Debian Jessie Preview LXer Syndicated Linux News 0 01-27-2014 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration