This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

getty-console crushes after pressing ENTER (omapl137)

Hi,

finally I managed to get startet with linux on my omapl137 evm. I am using squashfs as my rootfs. The problem I have is that the console closes or crushes after I press ENTER. Does anyone know what I need to do?

Mount a filesystem. Filesystem autodetection requires /proc.

        -a              Mount all filesystems in fstab
        -r              Read-only mount
        -w              Read-write mount (default)
        -t FSTYPE[,...] Filesystem type(s)
        -O OPT          Mount only filesystems with option OPT (-a only)
-o OPT:
        remount         Remount a mounted filesystem, changing flags
        ro/rw           Same as -r/-w

There are filesystem-specific -o flags.

'tarting pid 867, tty '/dev/console': '/bin/hostname omap-l137evm

Please press Enter to activate this console.
'tarting pid 868, tty '/dev/console': '/sbin/getty -L -n ttyS2 0 vt100

 login: root
' (pid 868) exited. Scheduling for restart.

Please press Enter to activate this console.

 

Regards, Tom

  • Does really nobody have any idea? I really don't know what to do here.

  • Hello Tom,

    I am new here and your post was the first I stumbled upon thinking I may be of some help.

    Now, I am not quite familiar with the board you are using, but from what I understand you are trying to open ports for some sort of peripheral system at the point where the console crashes. You are using the getty command for that. But as the baud rate for it you just put 0. If you don't know what baud rate your device is working with I would recommend trying out a few. you can find some more detailed information here: http://www.vanemery.com/Linux/Serial/serial-console.html

    There is nothing that can go wrong here so nothing to lose, right?

    Also if that is not the problem, I see that you configured your getty command to use an alternate login procedure with the -n. Maybe try to disable the standard login with -l.

    I hope this helps!

    Best regards, Merton

  • Hello Merton,

    thanks for your reply. I changed the baud rate and tried to start getty with -l, but without success. when I changed the getty command to -l the "login:" didn't come up. The process just exited.

    Freeing init memory: 140K
    init started: BusyBox v1.20.2 (2012-11-23 15:17:51 CET)
    Bad inittab entry at line 4
    'tarting pid 866, tty '/dev/console': '/bin/mount -n -a
    'bin/mount: invalid option -- '
    BusyBox v1.20.2 (2012-11-23 15:17:51 CET) multi-call binary.

    Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE

    Mount a filesystem. Filesystem autodetection requires /proc.

            -a              Mount all filesystems in fstab
            -r              Read-only mount
            -w              Read-write mount (default)
            -t FSTYPE[,...] Filesystem type(s)
            -O OPT          Mount only filesystems with option OPT (-a only)
    -o OPT:
            remount         Remount a mounted filesystem, changing flags
            ro/rw           Same as -r/-w

    There are filesystem-specific -o flags.

    'tarting pid 867, tty '/dev/console': '/bin/hostname omap-l137evm

    Please press Enter to activate this console.
    'tarting pid 868, tty '/dev/console': '/sbin/getty -n -l ttyS2 115200 vt100
    ' (pid 868) exited. Scheduling for restart.00

    Please press Enter to activate this console.

     

    I saw that I have an error before it comes to the login: "Bad inittab entry at line 4". Maybe this could be the problem?

    my inittab:

    console::sysinit:/bin/mount -n -a 
    console::sysinit:/bin/hostname omap-l137evm  
    console::askfirst:/sbin/getty -n -l ttyS2 115200 vt100

    my fstab:

    proc    /proc     proc    defaults  0 0
    sysfs   /sys      sysfs   defaults  0 0
    devpts  /dev/pts  devpts  defaults  0 0

     

    Any idea?

    Best Regards, Tom

  • I think first we have to find this error during login

     login: root

    ' (pid 868) exited. Scheduling for restart.

    How can I find the problem?

    regards

  • you are right. the error "bad inittab..." is gone. there was just an ENTER on the fourth line.

    so the login problem remains...

  • Hi

    I looked in the source code and it seems that the process is getting a signal


    1190 while (1) { 1191 pid_t wpid; 1192 struct init_action *a; 1193 1194 /* If signals happen _in_ the wait, they interrupt it, 1195 * bb_signals_recursive_norestart set them up that way 1196 */ 1197 wpid = waitpid(-1, NULL, maybe_WNOHANG); 1198 if (wpid <= 0) 1199 break; 1200 1201 a = mark_terminated(wpid); 1202 if (a) { 1203 message(L_LOG, "process '%s' (pid %d) exited. " 1204 "Scheduling for restart.", 1205 a->command, wpid); 1206 } 1207 /* See if anyone else is waiting to be reaped */ 1208 maybe_WNOHANG = WNOHANG; 1209 }

    or I'm wrong?

  • Or maybe the problem comes from the psswd file.

    content:

    root::0:0:Super-User:/:/bin/sh
    bin:x:1:1:bin:/bin:/bin/sh
    daemon:x:2:2:Daemon:/sbin:/bin/sh
    nobody:x:65534:65534:nobody:/var/lib/nobody:/bin/sh

    I wanted to login as root, where I don't need a password with the empty space in line one.

    Any idea?

    Best regards, Tom

  • Hi guys,

    now I went through the source code of the busybox (Login.c) and found out that the problem comes up when a syslog is going to be done:


     if (pw->pw_uid == 0)
      syslog(LOG_INFO, "root login%s", fromhost);

     

    Is it possible that this problems occurs because of the mounting error from the start? how could I solve this mounting error?

    Best Regards, Tom

  • Hi guys,

    I continued searching and found out that the kernel does not find the fstab file in /etc, but obviously it found the inittab file...

    init started: BusyBox v1.18.4 (2013-01-25 14:27:19 CET)
    'tarting pid 866, tty '/dev/console': 'cat /etc/fstab
    ': No such file or directory
    'tarting pid 867, tty '/dev/console': '/bin/mount -n -a
    'bin/mount: invalid option -- '
    BusyBox v1.18.4 (2013-01-25 14:27:19 CET) multi-call binary.

    Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE

    Mount a filesystem. Filesystem autodetection requires /proc.

    Options:
            -a              Mount all filesystems in fstab
            -r              Read-only mount

    So why? When I mount the filesystem on my linux pc I can read the fstab file.

    Best Regards, Tom

  • Does really nobody knows what I need to do??

     

    I looked into the Login.c file of the busybox and found out that the process crashes when "signal(SIGINT, SIG_DFL);" is going to use.

    Does anybody have an idea what I need to do?

    Regards, Tom