devfs
[Top] [All Lists]

Mingetty problems (fwd)

To: devfs@xxxxxxxxxxx
Subject: Mingetty problems (fwd)
From: "Roger W.Brown" <bregor@xxxxxxxxxxxxxxxx>
Date: Mon, 19 Mar 2001 15:34:27 +1100 (EST)
Sender: owner-devfs@xxxxxxxxxxx
  Hi,

      I'm new to devfsd, I'm still learning.  My immediate problem
  is that I can't use mingetty, in place of agetty, in my initial
  init boot scripts.

  At this point I should add that my Linux system began with
  linux-0.9.something_very_young and has been matained by hand ever
  since.  RedHaT, SuSE, Mandrake etc, are not known at this address.
  ( Though, that does not mean that I know what I'm doing !)

  Never the less, all system software is built from current sources. 
  (e.g.  linux-2.4.2-ac20, glibc-2.2.2, binutils-2.10.91.0.4).

 I made a minor change to the relevent part of the mingetty code,
 to reflect modern device designations. The code now reads:

/* open_tty - set up tty as standard { input, output, error } */
static void open_tty (void)
{
        struct sigaction sa;
        char buf[20];
        int fd;

        /* Reset permissions on the console device */
        if (strncmp(tty, "tty", 3) == 0) {
                strcpy (buf, "/dev/vcc/");
                strcat (buf, &tty[3]);
                if (chown (buf, 0, 3) || chmod (buf, 0600))
                        error ("%s: %s", buf, sys_errlist[errno]);

                strcpy (buf, "/dev/vcc/a");
                strcat (buf, &tty[3]);
                if (chown (buf, 0, 3) || chmod (buf, 0600))
                        error ("%s: %s", buf, sys_errlist[errno]);
        }


  The relevant section of /etc/inittab is:

    c1:1235:respawn:/sbin/mingetty tty1
    c2:1235:respawn:/sbin/mingetty tty2
    c3:5:respawn:/sbin/mingetty    tty3
    c4:5:respawn:/sbin/mingetty    tty4
    c5:5:respawn:/sbin/mingetty    tty5
    c6:45:respawn:/sbin/mingetty   tty6

  On booting, this fails with messages:

Mar 17 17:37:20 argo /sbin/mingetty[137]: /dev/vcc/2: No such file or directory
Mar 17 17:37:20 argo /sbin/mingetty[138]: /dev/vcc/3: No such file or directory
Mar 17 17:37:20 argo /sbin/mingetty[140]: /dev/vcc/5: No such file or directory
Mar 17 17:37:20 argo /sbin/mingetty[142]: /dev/vcc/6: No such file or directory
Mar 17 17:37:20 argo /sbin/mingetty[139]: /dev/vcc/4: No such file or directory

  and many more similar remarks.


  This can be "fixed" by adding extra lines to the boot scripts:

# devfs started.
/sbin/devfsd /dev

/sbin/mknod /dev/vcc/2  c 7   2
/sbin/mknod /dev/vcc/3  c 7   3
/sbin/mknod /dev/vcc/4  c 7   4
/sbin/mknod /dev/vcc/5  c 7   5
/sbin/mknod /dev/vcc/6  c 7   6

/sbin/mknod /dev/vcc/a2 c 7 130
/sbin/mknod /dev/vcc/a3 c 7 131
/sbin/mknod /dev/vcc/a4 c 7 132
/sbin/mknod /dev/vcc/a5 c 7 133
/sbin/mknod /dev/vcc/a6 c 7 134


 The system then boots, but I still have ugly blemishes in the syslog file:

Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs3"  No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa3" No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs2"  No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa2" No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs5"  No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa5" No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs6"  No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa6" No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs4"  No 
such file or directory
Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa4" No 
such file or directory


  My guess is that I should also create symbolic links for vcs3, vcsa3 etc, but 
perhaps it's
  time to ask the experts.


  Any advice will be most welcome.

  Roger Brown


<Prev in Thread] Current Thread [Next in Thread>