2

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

Community
  • 1
  • 1
user1336117
  • 451
  • 3
  • 8
  • 17
  • Auto-Login Answer: http://stackoverflow.com/questions/10282981/automatic-login-on-angstrom-linux Automatically Start Application Answer: http://stackoverflow.com/questions/14149477/auto-start-program-at-login-in-angstrom-on-beagleboard – Samuel Jan 04 '13 at 00:34

1 Answers1

2

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
MathieuLescure
  • 694
  • 6
  • 15