linuxauthenticationbeagleboardangstrom-linux

Automatic login on Angstrom Linux


What is a clean way to obtain Angstrom Linux to boot up and open the shell without asking to log in?


Solution

  • I found a nice way to achieve it. This works for me with Angstrom (on a Beagleboard xM Rev C4).

    1. Make sure agetty is installed (/sbin/agetty is the standard location). It should be included in every Linux Angstrom image.

    2. Create a script file in any location, for example /home/root/autologin.sh. Edit it and add the following:

      #!/bin/sh
      exec /bin/login -f root
      
    3. Make it executable with the command

      chmod a+x autologin.sh
      
    4. Edit the file /etc/inittab. Comment out (by adding a “#” at the beginning) the following line

      1:2345:respawn:/sbin/getty 38400 tty1
      

    and add the following line:

        1:2345:respawn:/sbin/agetty -l /home/root/autologin.sh -n 38400 tty1 linux
    

    Hope this helps out there.