There is no /etc/rc.local after installing L4T R28.1


I would like to execute an initialization script in /etc/rc.local after boot, but I dont see that file after installing L4T R28.1.
Should I use rcX.d folder instead?

Thankx in advance!

I think /etc/rc.local is optional and it is called if it exists.
Just create the script as root, make sure it has execution permission and it should run on next reboot.

After unpacking a sample rootfs for R28.1 I do see “rootfs/etc/rc.local”. If rc.local was missing from “Linux_for_Tegra/rootfs/etc/rc.local”, then it would be missing on the Jetson as well. If the file is present in rootfs, then you should be able to loopback mount the raw image created during the flash and see it there, e.g.:

sudo mount -o loop /where/ever/it/is/Linux_for_Tegra/bootloader/system.img.raw /mnt
cd /mnt/etc
ls rc.local
cd -
sudo umount /mnt

Thanks for the replies!

I have realized that right after flashing jetson there is a rc.local file with script in it sending ip address to host, but after installing jetpack packages from the internet, rc.local gets deleted. I created a rc.local file as suggested, and worked as expected. Thx!

Glad it worked, but it does seem strange JetPack would delete rc.local.