Question

I am developing an application in beaglebone. I want to add start up scripts to my Beaglebone but I can not find /etc/inittab. I am using the image : Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.06.18.img.xz

I think in the previous versions of image there is /etc/initab but for the new distributions I could not find the inittab :/

I want to apply this : Automatic login on Angstrom Linux but I can not because there is no /etc/inittab.

Where is the inittab in new distributions.

When I write uname -r it gives: 3.2.23

Regards

Was it helpful?

Solution

inittab has been replaced by systemd

This is how I did it for the serial console. You can probably adapt it easily for tty1 by replacing "serial-getty@..." by "getty@...", but I haven't tested it.

cp /lib/systemd/system/serial-getty@.service /etc/systemd/system/autologin@.service
rm /etc/systemd/system/getty.target.wants/serial-getty@ttyO0.service
ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyO0.service

Create the following script file in any location (/home/root/autologin.sh in my case)

#!/bin/sh
exec /bin/login -f root

Make it executable

chmod a+x autologin.sh

Edit /etc/systemd/system/autologin@.service and update the ExecStart command by adding the -n (Do not prompt the user for a login name) and -l (Invoke the specified login_program instead of /bin/login) options.

ExecStart=-/sbin/agetty -n -l /home/root/autologin.sh -s %I 115200
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top