Date: Sun, 24 Jan 1999 10:30:41 -0600 From: "Ric Naff" <ricnaff@airmail.net> To: questions@FreeBSD.ORG Subject: Is it ttyv10 - ttyv15, ttyva - ttyvf, both, or is it Memorex Message-ID: <mR/104SQq-0002LaR@mail.airmail.net>
next in thread | raw e-mail | index | archive | help
Short version of the problem: I have /dev/ttyv0 thru /dev/ttyvf defined. My /etc/ttys likewise uses this naming convention for all 16 vitual consoles. These are all defined as: ttyv? "/usr/libexec/getty Pc" cons25 [on|off] secure If I change the state for ttyva (or higher - up to ttyvf) to "on", then the following problem occurs after a reboot or "kill -1 1" : ps aux reveals the virtual consoles by the names shown above. In addition to ttyva (and higher, if enabled), I also see a process for ttyv10 (i.e., the decimal equivilent of 0xa). Every 60 seconds or so (or perhaps it is every 300 seconds - I really didn't time it), I get the following messages: getty [nnn]:open /dev/ttyv10: Interrupted system call getty [nnn]:open /dev/ttyv10: No such file or directory Then the process terminates and - get this - starts itself anew with a new process ID, trying to us ttyv10, and after a few minutes, the same messages (above) appear again. Then the whole thing repeats (kills itself, restarts a new process, gives me the messages, loop again, ad infinitum). ===================================================================== The output from uname -a: FreeBSD alpha.fricoan.net 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0: Wed Jul 22 08:48:29 GMT 1998 root@builder.cdrom.com: /usr/src/sys/compile/GENERIC i386 ===================================================================== The history of how this came to be, what I've tried, etc... This was part of my "real" installation for the first time (i.e., I installed FBSD 2.2.7 from CD-ROM about 20+ times, playing with settings & reviewing docs, etc., until I had accumulated about 327 pounds of notes & instructions to myself). After the plain install (on a new, freshly made slice/partition), I set about making changes for my needs. I got to the point of filling-out my virtual terminals, which was just before I was going to start setting up XFree86. According to the Book "The Complete FreeBSD" by Greg Lehey, which included the CD-ROMs (4) for version 2.2.7, what I needed to do was to edit /etc/ttys and add lines for ttyv*, where * is 4 to 15 (this would fill-in the terminals for the 16 that are configured into the kernel). Then, according to the book, I needed to get these devices defined into /dev. There was a caution about using MAKEDEV to rebuild all of a certain device type because it would first "un-MAKEDEV" the existing ones, then (re-)define the lot of them. So instead, I used mknod, running it 12 times as: mknod ttyv* c 12 * where * was 4 thru 15, according to the book. All looked OK - my /dev/ttyv* matched what was in /etc/ttys. The last change I made was to then re-edit /etc/ttys. I enabled the virutal devices ttyv4 thru ttyv9, leaving ttyv10 thru ttyv15 "off" (for XFree86, and anything else that might need an available virtual console). At this point, I ran kill -1 1, checked ps aux, and verified that I had 12 virtual consoles executing (ttyv0 - ttyv11). NO PROBLEMS SO FAR --- EVERYTHING RUNNING SMOOTHLY. Over the next hour, I carefully configured XFree86, researched my card and monitor capabilities, etc. The I tried to run xinit and was told that it couldn't find device ttyva (notice the "a" here - I had configured ttyv10 according to the book, but XFree86 wanted to use the hexadecimal value instead). "OK," I thought. "So the book was in error. It should have said ttyv0-ttyv9, followed by ttyva-ttyvf. Hexadecimal instead of decimal. No problem. I can handle this - I'm an expert at running mknod!" So, over to /dev I went, executed rm ttyv1?, and followed with: mknod ttyva c 12 10 mknod ttyvb c 12 11 mknod ttyvc c 12 12 mknod ttyvd c 12 13 mknod ttyve c 12 14 mknod ttyvf c 12 15 kill -1 1 xinit Hey! Whaddya know! XFree86 was running! It looked in my /etc/ttys file, found the first "off" v-console of ttyv10, translated that to ttyva (hexadecimal) and tried to hook-up to /dev/ttyva. After making the above adjustments to the device named and re-initing, XFree86 was happy and worked! I quit X, intending to research more fully my clocking and scan rates. The system sat idle for about 3 hours or more while I was off studying. When I came back, my screen was full of the noted messages at the top of this msg (getty open errors). After a few minutes cogitation, I recalled that I did not alter /etc/ttys when I changes the actual devices in /dev. My devices were called ttyv0-ttyv9, ttyva-ttyvf. But, in /etc/ttys, I had left them named according to the book, which was ttyv0-ttyv15. So, I figured this was the problem. I edited /etc/ttys and gave it name-entries to match the real device names I had configured in /dev. Saved the file, ran kill -1 1, and then a though occurred to me: "Hey, if XFree86 originally looked in /etc/ttys for the first "off" v-console (which I'm not sure it did - it could have gotten the information elsewhere), found ttyv10, translated that to ttyva, and then used ttyva for it's console, HAVE I JUST SCREWED X BY ALTERING MY /ETC/TTYS?" So I though I'd give X another spin, just to see if it would work. I ran xinit, and sure enough, no problems!!! Everything's fixed - just a minor typo in the book, but I'm in sync now. Except I wasn't. So long as /etc/ttys has any v-console higher than 9 enabled, I get those silly ghost processes for the same device. That is, not matter what I call the device name in /etc/ttys (ttyv10/ttyva, ttyv11/ttyvb, etc.), if they are "on" when rebooting or re-initing, I get ****2**** processes for each v-console: one named ttyv<decimal> and one named ttyv<hexadecimal>. The hexadecimal processes are fine - they work. The decimal processes are the ones that choke, spit-out error messages, then restart themselves with a new process id. ===================================================================== Some things I tried: * I tried killing them with kill -9 <pid>. OK, they were killed. Gone. But wait! There they are again, under a new pid! Kill those... Oops! Here they come again, under yet another new pid. * Rebooting. Same results, even if running kill -9 <pid> after rebooting. * Sym-links. Hey! There's a thought! Fool the processes into sharing the same device. So I ran: ln -s /dev/ttyva /dev/ttyv10 ln -s /dev/ttyvb /dev/ttyv11 etc. This didn't work. I didn't think it would, but it was worth a try. All I got for my troubles was messages every 15 seconds telling me that the "correct" v-console (the one with hexadecimal notation) was responding far too many times to its polls. So I removed the symlinks. * Finally, not finding anything in the handbook, docs, errata, 'Net-links & 'Net-searches, I have adopted the **temporary** stance of disabling all v-consoles higher in number than 9. That is, in /etc/ttys, ttyva-ttyvf are designated as "off". This solves the ghost process problem (and the annoying and interruptive messages), but leaves me with 2 v-consoles too few for my needs. I can get work done, run XFree86, configure things, etc. I'm working on my networking configurations at the moment (so far, mymachine isn't hooked-up to any others - but that will change as soon as I have my configuration understood and installed). I really need those extra consoles (numbered higher than ttyv9, whether you use decimal or hexadecimal notation). I also plan on rebuilding my kernel to allow for 64 v-consoles. This problem is going to be a very serious one, very soon, once my networking is in place. With only 10 v-consoles numbered 0 thru 9, I am going to be seriously handicapped here. Where are those ghost processes coming from? Which script or configuration file seems to want to force the creation of processes for ttyv* that don't exist in /dev as devices, nor in /etc/ttys as named entries? Or, perhaps they are really supposed to be named ttyv10 thru ttyv15. In that case, what's the deal with XFree86? Why does it want to use hex notation and how can I force it to use decimal? ------------------------------ Ric Naff <ricnaff@airmail.net> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?mR/104SQq-0002LaR>