Dear Sir
I got some problem about rc.local service
I find out that I cannot use this service after install cuda toolkit
This service will be ok without cuda toolkit
nvidia@tegra-ubuntu:~$ systemctl status rc-local
● rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset:
Drop-In: /lib/systemd/system/rc-local.service.d
└─debian.conf
Active: inactive (dead)
Condition: start condition failed at Wed 2017-12-06 05:43:06 UTC; 4min 3s ago
ConditionFileIsExecutable=/etc/rc.local was not met
Dec 06 05:43:06 tegra-ubuntu systemd[1]: Stopped /etc/rc.local Compatibility.
As I know, ubuntu16.04 starts to use systemd to replace init.d so that there is no rc.local under /etc.
So you problem sounds like:
After you install jetpack3.1, you create a rc.local file under /etc and it works fine. However, after you install cuda toolkit (through jetpack?), rc.local fails to start permanently, right?
Could you describe what did you do between these two cases?
Since I cannot reproduce this on my device, I think maybe you need to provide steps to reproduce issue in detail.
No, it works for me. I am using command line flash.sh though.
There are several simple things which might cause this to fail. It could be something very simple like file permissions (rc.local permissions or any of the files used with systemctl).
@yi.chen, what are the file permissions of (“ls -ld …”):
What is the content of your “/lib/systemd/system/rc-local.service.d/debian.conf”?
@yi.chen, do you still have your old flash image file in “Linux_for_Tegra/bootloader/system.img.raw”? The significance of this is that it will show file permissions prior to extra package install…if something is off in those file permissions or content mentioned above, then this can be compared to a loopback mounted system.img.raw…differences could be attributed to extra packages instead of the flash itself.
I am looking at a fresh JetPack 3.1 install. The “Linux_for_Tegra/rootfs/etc/rc.local” is there, and the system.img.raw file has this. The actual Jetson, after package install, no longer has this file. It looks like part of the process of sending the IP address to the JetPack/host is responsible for breaking this.
You can put this in to replace the file (it should have nothing but comments after JetPack is done), or just “sudo touch /etc/rc.local”:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
From what I can tell JetPack wants rc.local to cause the Jetson to send its IP address to JetPack via temporary file “/tmp/jetpack.log”. Most likely after this first boot is done the temp IP address code is removed…only it has a bug and it doesn’t remove the code…it removes the entire file. The file needs to be left in place. It is a JetPack 3.1 bug (and perhaps other versions, I have not looked).
When I flash on command line the file is there. I just flashed a TX2 with JetPack 3.1 and added a few packages, e.g., CUDA. The file is indeed missing. rc.local has content which is obviously designed to get a freshly rebooted Jetson to give its IP address to JetPack for package installs, and JetPack did indeed automatically get the address correctly. My guess is that JetPack then removes this content, but does it incorrectly…removing the entire file instead of just the code.
If I look at the loopback image from system.img.raw I see that rc.local is there…thus it had been there after the flash. The content should be this:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
touch /tmp/jetpack.log
echo "starting script to send ip to host" >> /tmp/jetpack.log
/home/nvidia/report_ip_to_host.sh &
echo "started script to send ip to host" >> /tmp/jetpack.log
exit 0