0

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

4 Answers 4

6

This simple answer took me hours to find. For those of you who don't have /etc/inittab the following worked for me. In

/etc/systemd/system/getty.target.wants/serial-getty@ttyO2.service

change the line

ExecStart=-/sbin/getty 115200 %I

to

 ExecStart=-/sbin/getty -a USERNAME 115200 %I

I partially figured this out on my own from reading about getty in /etc/inittab, which led me to ExecStart on my system, and a quick google search led me to https://unix.stackexchange.com/questions/42359/how-can-i-autologin-to-desktop-with-systemd which gave me the auto-login syntax of /sbin/getty.

5
  • Nice solution! But are you sure you don't have an inittab equivalent anywhere? Thank you so much for sharing this! Mar 22, 2013 at 10:25
  • No systems with usage of systemd have no inittab. inittab comes from sysvinit.
    – silvio
    Apr 16, 2013 at 19:31
  • Next questions please provide more information about your system :-)
    – silvio
    Apr 16, 2013 at 19:32
  • There is no /etc/inittab file or folder on my system. I have a BeagleBoard xM revC1. Version information that is displayed after reboot: "Angstrom v2012.01-core - Kernel 3.0.17+". Output from cat /proc/version: "Linux version 3.0.17+ (koen@dominion) (gcc version 4.5.4 20111126 (prerelease) (GCC) )".
    – Samuel
    Apr 17, 2013 at 13:37
  • No need to rant about liking or disliking a particular OS.
    – Christian
    Mar 5, 2014 at 14:04
3

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.

2
  • I am running Angstrom v2012.01-core - Kernel 3.0.17+ and don't have an /etc/inittab file. Been researching this for about half an hour and haven't found a solution. I guess it's impossible for those of us who don't have an /etc/inittab file.
    – Samuel
    Jan 3, 2013 at 21:21
  • Hi Samuel, If you don't have the inittab this solution will not work for you. Sorry that I can't help you that much. Though, I am sure there is another equivalent file for startup automation. If you solved this please let me know. Feb 1, 2013 at 10:33
0

My answer is more linux-generic. Without a start of a getty-process you doesn't have a passwort login. Look at

/etc/inittab

starts here a *getty-process? Remove this line and restart your device.

3
  • That's what I'm looking at mainly. This is the line I have in inittab: 1:2345:respawn:/sbin/getty 38400 tty1 Apr 23, 2012 at 15:06
  • if you remove this line and your distribution is busybox based you should get a "Press enter for console"-like message on next restart of your angstrom based system.
    – silvio
    Apr 23, 2012 at 15:12
  • I don't have an /etc/inittab file, running: Angstrom v2012.01-core - Kernel 3.0.17+.
    – Samuel
    Jan 3, 2013 at 20:46
0
1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1

change tty1 for your system configuration, ex) ttyO0, ttyS1, etc..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.