1

while trying to create my Debian Wheezy image for a FriendlyARM mini210s ARM single board computer, I am bumping into this issue.

I have opened a terminal via serial sudo screen /dev/cu.usbserial 115200 and that my current output:

[    3.398751] apple 0003:05AC:0220.0003: input: USB HID v1.11 Device [Apple, Inc Apple Keyboard] on usb-s5p-ehci-1.4.2/input1
INIT: version 2.88 booting
INIT: Entering runlevel: 2
INIT: Id "X1" respawning too fast: disabled for 5 minutes

Debian GNU/Linux 7 FriendlyARM ttySAC0

FriendlyARM login: root      <======= entered root and hit return
Unable to determine your tty name.    <===== THE ISSUE

Debian GNU/Linux 7 FriendlyARM ttySAC0

FriendlyARM login: 

INIT: Id "6" respawning too fast: disabled for 5 minutes
INIT: Id "5" respawning too fast: disabled for 5 minutes
INIT: Id "4" respawning too fast: disabled for 5 minutes
INIT: Id "3" respawning too fast: disabled for 5 minutes
INIT: Id "2" respawning too fast: disabled for 5 minutes
INIT: Id "X1" respawning too fast: disabled for 5 minutes
INIT: Id "5" respawning too fast: disabled for 5 minutes
INIT: Id "2" respawning too fast: disabled for 5 minutes
INIT: Id "6" respawning too fast: disabled for 5 minutes
INIT: Id "4" respawning too fast: disabled for 5 minutes
INIT: Id "3" respawning too fast: disabled for 5 minutes

On the touchscreen, I have a message saying:

"login: PAM Failure, aborting: Critical error - immediate abort"

Can someone help me decrypt what this is tell me?

How I created my rootfs

sudo debootstrap --arch=armel --foreign wheezy rootfs/ http://ftp.us.debian.org/debian

echo "proc /proc proc none 0 0" >> rootfs/etc/fstab
echo "mini210s-anybots"
echo "mini210s-anybots" > rootfs/etc/hostname 
mkdir -p rootfs/usr/share/man/man1/
mknod rootfs/dev/console c 5 1
mknod rootfs/dev/tty1 c 4 1
mknod dev/ttySAC0 c 204 64     <==== the serial port

then I created an image with yaffs2utils and booted on my FriendlyARM (I describe the process here, it's a bit long).

I copied the inittab from a functioning Debian Squeeze image, which contains these lines

T1:2345:respawn:/sbin/getty 115200 ttySAC0      <=== terminal on serial port RS232 
X1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6

I am most certainly missing a couple of steps.

UPDATE Added missing devices

Apparently I need to configure some devices. I inspired myself from this post

mknod -m 0600 ./rootfs/dev/console  c 5 1
mknod -m 0660 ./rootfs/dev/full     c 1 7
mknod -m 0640 ./rootfs/dev/kmem     c 1 2
mknod -m 0660 ./rootfs/dev/loop0    b 7 0
mknod -m 0640 ./rootfs/dev/mem      c 1 1
mknod -m 0666 ./rootfs/dev/null     c 1 3
mknod -m 0640 ./rootfs/dev/port     c 1 4
mknod -m 0666 ./rootfs/dev/random   c 1 8
mknod -m 0660 ./rootfs/dev/tty      c 5 0
mknod -m 0666 ./rootfs/dev/urandom  c 1 9
mknod -m 0666 ./rootfs/dev/zero     c 1 5

mknod -m 0660 ./rootfs/dev/tty0     c 5 0
mknod -m 0660 ./rootfs/dev/tty1     c 5 1
mknod -m 0660 ./rootfs/dev/tty2     c 5 2
mknod -m 0660 ./rootfs/dev/tty3     c 5 3
mknod -m 0660 ./rootfs/dev/tty4     c 5 4
mknod -m 0660 ./rootfs/dev/tty5     c 5 5

... but still experiencing the issue.

now addding these

mknod -m 0660 ./rootfs/dev/ram0 b 1 0
mknod -m 0660 ./rootfs/dev/ram1 b 1 1
mknod -m 0660 ./rootfs/dev/ram2 b 1 2
mknod -m 0660 ./rootfs/dev/ram3 b 1 3
mknod -m 0660 ./rootfs/dev/ram4 b 1 4
mknod -m 0660 ./rootfs/dev/ram5 b 1 5
mknod -m 0660 ./rootfs/dev/ram6 b 1 6
mknod -m 0660 ./rootfs/dev/ram7 b 1 7
mknod -m 0660 ./rootfs/dev/ram8 b 1 8
mknod -m 0660 ./rootfs/dev/ram9 b 1 9
mknod -m 0660 ./rootfs/dev/ram10 b 1 10
mknod -m 0660 ./rootfs/dev/ram11 b 1 11
mknod -m 0660 ./rootfs/dev/ram12 b 1 12
mknod -m 0660 ./rootfs/dev/ram13 b 1 13
mknod -m 0660 ./rootfs/dev/ram14 b 1 14
mknod -m 0660 ./rootfs/dev/ram15 b 1 15

My new rootfs/dev

root@ubuntu:/home/joel/debian-mini210s/rootfs/dev# ls -al
total 8
drwxr-xr-x  2 root root    4096 Jan 19 17:27 .
drwxr-xr-x 19 root root    4096 Jun 22  2012 ..
crw-r--r--  1 root root   5,  1 Jan 19 14:07 console
crw-rw----  1 root root   1,  7 Jan 19 17:05 full
crw-r-----  1 root root   1,  2 Jan 19 17:05 kmem
brw-rw----  1 root root   7,  0 Jan 19 17:05 loop0
crw-r-----  1 root root   1,  1 Jan 19 17:05 mem
crw-rw-rw-  1 root root   1,  3 Jan 19 17:05 null
crw-r-----  1 root root   1,  4 Jan 19 17:05 port
brw-rw----  1 root root   1,  0 Jan 19 17:27 ram0
brw-rw----  1 root root   1,  1 Jan 19 17:27 ram1
brw-rw----  1 root root   1, 10 Jan 19 17:27 ram10
brw-rw----  1 root root   1, 11 Jan 19 17:27 ram11
brw-rw----  1 root root   1, 12 Jan 19 17:27 ram12
brw-rw----  1 root root   1, 13 Jan 19 17:27 ram13
brw-rw----  1 root root   1, 14 Jan 19 17:27 ram14
brw-rw----  1 root root   1, 15 Jan 19 17:27 ram15
brw-rw----  1 root root   1,  2 Jan 19 17:27 ram2
brw-rw----  1 root root   1,  3 Jan 19 17:27 ram3
brw-rw----  1 root root   1,  4 Jan 19 17:27 ram4
brw-rw----  1 root root   1,  5 Jan 19 17:27 ram5
brw-rw----  1 root root   1,  6 Jan 19 17:27 ram6
brw-rw----  1 root root   1,  7 Jan 19 17:27 ram7
brw-rw----  1 root root   1,  8 Jan 19 17:27 ram8
brw-rw----  1 root root   1,  9 Jan 19 17:27 ram9
crw-rw-rw-  1 root root   1,  8 Jan 19 17:05 random
crw-rw----  1 root root   5,  0 Jan 19 17:05 tty
crw-rw----  1 root root   5,  0 Jan 19 17:07 tty0
crw-r--r--  1 root root   4,  1 Jan 19 14:47 tty1
crw-rw----  1 root root   5,  2 Jan 19 17:07 tty2
crw-rw----  1 root root   5,  3 Jan 19 17:07 tty3
crw-rw----  1 root root   5,  4 Jan 19 17:07 tty4
crw-rw----  1 root root   5,  5 Jan 19 17:07 tty5
crw-r--r--  1 root root 204, 64 Jan 19 14:11 ttySAC0
crw-rw-rw-  1 root root   1,  9 Jan 19 17:05 urandom
crw-rw-rw-  1 root root   1,  5 Jan 19 17:05 zero

but still getting Unable to determine your tty name

UPDATE - added ttySAC0 to /etc/securetty

In vim /etc/pam.d/login Line:

auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so

this should allo login without password, if device listed. ... but that didn't work out as I expected.

Found on the Internet about this issue

On AskUbuntu

eBook on the issue

  • 1
    The messages from init are because of the lines for tty1 and so on in inittab. Remove them, these devices don't exist. I don't see why /dev/ttySAC0 is partially working. Is there an initramfs in this setup? Do you run udev? – Gilles Jan 28 '15 at 23:03
  • Ok I need to check and learn more about initramfs and udev. thanks for these pointers. I couldn't find any file named initramfs, but in the meantime I created a few missing devices. I will update my question accordingly. – zabumba Jan 29 '15 at 0:10
  • I think I cleared the INIT: Id "6" respawning too fast: disabled for 5 minutes issues, but still getting the Unable to determine your tty name. See post updates – zabumba Jan 29 '15 at 0:27
1

I suspect the underlying issue is nothing to do with your tty, but rather that is a consequence of the far more important error message further down, PAM Failure, aborting: Critical error - immediate abort.

This article from the Debian Help site may help. (TL;DR? CR/LF on the end of lines in PAM configuration files is bad.) But without knowing what you've done with the PAM subsystem it can only be a guess.

  • I actually haven't done anything with it yet. I don't know how to configure it to be honest. I will be studying this next. Thanks for this pointer. – zabumba Jan 29 '15 at 0:21
  • This article you pointed out didn't resolve, but looking at the PAM config is probably a good lead. thanks again – zabumba Jan 29 '15 at 10:52
  • The article title is, "PAM Failure, aborting: Critical error - immediate abort" published on 2011-06-08. – roaima Jan 29 '15 at 12:47
  • Certainly, the article matches the error but the information in it didn't match the same problem. I don't even use Windows anywhere, my configuration file isn't bad. But again thanks for putting me in that direction. It was interesting reading about it. – zabumba Jan 29 '15 at 17:27
  • OK. I'm looking forward to seeing the final solution. It's piqued my curiousity! – roaima Jan 29 '15 at 17:29
1

You're missing several things in /dev. You were initially missing /dev/tty, which the kernel internally reroutes to the calling process's own terminal. The getty and login programs talk to a specific terminal (here /dev/ttySAC0), but after that other programs just want to communicate via whichever terminal they're running on, and they use /dev/tty for that. You've created it, but with the wrong permissions: /dev/tty needs to be accessible by all processes. So does /dev/full, by the way, although it's very rarely used so that probably doesn't break anything in practice.

chmod a+rw /dev/tty

(/dev/console, on the other hand, is correctly reserved to root. /dev/tty refers to the terminal that the process is running on, which can be a software terminal such as xterm, sshd, screen, etc. /dev/console, on the other hand, refers to a console, i.e. a physical terminal; few programs need to interact with the console as such.)

In addition, in order to use terminal emulators such as screen, you need to create /dev/ptmx and to mount /dev/pts.

mknod -m 666 /dev/ptmx c 5 2
mkdir /dev/pts

and put the following line in /etc/fstab or run the equivalent mount command at boot time, with 5 replaced by the group ID for tty (check `/etc/group):

devpts /dev/pts devpts gid=5,mode=620 0 0

That's all I see for now. I haven't tested, it's possible that something else is missing.

  • the rootfs I have, doesn't contain the /etc/group ... FYI I built my rootfs with this command sudo debootstrap --arch=armel --foreign squeeze rootfs/ http://www.emdebian.org/grip/. I will start with correcting the permissions on tty and null devices. thx – zabumba Jan 29 '15 at 11:35

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.