I would guess init knows nothing about 'user' so it ignores it. Don't
forget this level
is run by busybox which is a cut down clone of the real init program. It
does not handle
all the sophistication that the real init program would have.
I predict if you remove 'user' from your inittab something will happen.
On 19/07/18 11:15, Imran Wali wrote:
Yes, the program executes normally when launched from the shell.
I am sharing with you a minimal example:
I have the following code in /usr/bin/hello:
> #!/bin/ash -e
> echo "Hello World"
> echo "Hello World" > /test.txt
> exit 0
and the inittab file contains:
> ::sysinit:/bin/busybox mount -t proc proc /proc
> ::sysinit:/bin/busybox mount -t tmpfs tmpfs /tmp
> ::sysinit:/bin/busybox --install -s
But the hello program doesn't execute at startup. Could you please
figure out what's wrong here?
ARIES Research Center
*From:* Dr Jonathan Kimmitt <jrrk2(a)cam.ac.uk>
*Sent:* Wednesday, July 18, 2018 6:49:16 PM
*To:* Imran Wali; lowrisc-dev(a)lists.lowrisc.org
*Subject:* Re: [lowrisc-dev] Running programs at Linux Startup
Does the program work when you launch manually from the shell? If not it
is probably an issue with libraries not being linked in,
or reliance on shared libraries which are not present in the boot
The last line of the inittab is where the shell is launched. You could
put your program there instead of /bin/ash, but it's environment will be
If you want a fuller experience, upgrade to the v0.5 release which
allows you to compile on the FPGA and do the usual things (rather slowly).
On 18/07/18 17:37, Imran Wali wrote:
> I am trying to automatically run a user program after Linux startup
on LowRISC v0.3.
> To do so, I have changed the make_root.sh script to incorporate my
program in /usr/bin in the root file system. I have tried a few
methods to launch the program for e.g. modifying the "inittab" file,
and to use /etc/rc.local etc, but nothing seems to work.
> Please share your experiences or ideas how to automatically launch
programs at Linux startup.
> Thanks and regards,
> Imran Wali
> Postdoctoral Researcher
> ARIES Research Center
> Nebrija University