I have a nanoPi NEO running with image: nanopi-neo_ubuntu-core-xenial_3.4.39_20170819.img.zip, however, I cannot get the /etc/rc.local executed. I have tried many suggestions from the Internet, but none of them works. The rc.local works when I type it manually in the terminal, but not executed when booting up.

I have an evaluation board from Microchip, it works. Is there any thing wrong with my nonoPi NEO?

Thank you Dave!Yes, It can be executed alone if I type it manually in command line. For your question about /etc/init.d, yes, I have checked it and find a rc.local file as well. I copied its contents and pasted as follows:

I tried to look into the other rc.local file in /etc/init.d directory instead of the file in /etc. I tried to execute it by typing ./rc.local command, then I got an "Usage: ./rc.local start", then I type ./rc.local start, I got a Warning message, please see the following message. Is the NanoPi NEO disabled the rc.local by its factory default settings somewhere? If yes, why?

My understanding is to leave this as is and then modify the rc.local in /etc/ for your purposes. That warning is common with systemd when you make any changes. Because I change the network parameters several times a day I do a:

I have added in both rc.local files, and it did NOT display when I reboot the system either. Here is the file contents in /etc/rc.local file which I added the 2 lines you suggested.

root@NanoPi-NEO:/etc# cat 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.

Thank you Dave! Here is the result after I ran each rc.local individually. Please note that tty1 does not display anything for my system. I have changed it to ttyS0 instead, the following result is based on ttyS0 which I changed. When I reboot the system, it showed one "rc.local runs" message. I have copied the screenshot for you at the bottom of this reply.