LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-08-2009, 11:07 AM   #1
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
TTY0 missing in newer kernels


I am running a Scientific Linux 4.x (RHEL 4 clone) system on a P4 desktop. In an attempt to build in JFS support, I have built a new kernel from sources obtained from kernel.org. The newest vendor-issued kernel that I have is 2.6.9-42.0.10, and it works fine, other than the missing JFS support.

To build the kernel, I have created .config in a few different ways, and succeeded in creating a kernel image (2.6.27) and an initrd. However, when the kernel is used, I find that there is no /dev/tty0, and several components seem to rely on the presence of such device. Most importantly, Xorg bails, complaining that it cannot write to /dev/tty0. Also, the Rehdat Graphical Boot system fails for similar or identical reasons.

I am confused about where this gets created. It seems to be kernel dependent, but I can't find anything that looks like it controls how it is created. From researching online, I believe that at some point there has been a change in how console devices are created and named. Have I crossed some boundary between the two styles? If yes, where is that boundary? I don't necessarily need the latest/greatest kernel, just one that supports my requirements. What can I do to get a kernel that contains JFS support and still runs properly on my host system. Changing to a different distro is not an option, and a complete re-install would be quite undesirable.

What I have observed that might be relevant:
mkinitrd creates /dev/tty1 .. /dev/tty4 character devices with major number 4 and minor numbers 1 .. 4. Character device 4 0 is created and called '/dev/systty'.
mkinitrd creates cpio-archive style initrd's and I've experienced some difficulty getting these to work properly, too. Sorry I haven't kept good track of details on that, but I'm sure I can reproduce it if someone thinks it is germane.
If this is not a kernel-related issue as I have guessed it to be, please do point to a more suitable forum.

Thanks.

--- rod.

Last edited by theNbomr; 01-08-2009 at 11:08 AM.
 
Old 01-09-2009, 08:02 AM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 37
.config

It's possible that you may have dev filesystem installed and that may be the problem.

You can find the .config that the distribution kernel is compiled with either in /boot or in the source packages then view it and possibly use the options or the entire .config in the kernel.org source and add the other options you wish to enable so this is not a problem.
 
Old 01-09-2009, 09:34 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Thanks for your reply. Comparing the distribution .config and the .config that I created for my own build, the original distro version contains
Code:
# CONFIG_DEVFS_FS is not set
While the new .config has no entry whatsoever for DEVFS. Is this the configuration item to which you refer?

Viewing a diff of the configs reveals nothing that looks, to me, anything like it would affect the creation of TTYs, although the two configs are so different that diff has trouble maintaining a readable correlation.

One thing that seems relevant is in the initrds. In the one created for my new kernel (using mkinitrd from the SL distro), I see a dev directory, containing:
Code:
total 8.0K
4.0K drwxr-xr-x   2 root root 4.0K Jan  8 09:19 .
4.0K drwxr-xr-x  10 bomr isac 4.0K Jan  8 09:19 ..
   0 crw-r--r--   1 root root 5, 1 Jan  8 09:19 console
   0 crw-r--r--   1 root root 1, 3 Jan  8 09:19 null
   0 brw-r--r--   1 root root 1, 1 Jan  8 09:19 ram
   0 crw-r--r--   1 root root 4, 0 Jan  8 09:19 systty
   0 crw-r--r--   1 root root 4, 1 Jan  8 09:19 tty1
   0 crw-r--r--   1 root root 4, 2 Jan  8 09:19 tty2
   0 crw-r--r--   1 root root 4, 3 Jan  8 09:19 tty3
   0 crw-r--r--   1 root root 4, 4 Jan  8 09:19 tty4
These appear to be consistent with the mkinitrd script code. The distribution initrd contains a dev directory that is empty.

Having exhausted all ideas of my own, I have now built a kernel that is only slightly newer (2.6.10) than the original working (but without JFS support) kernel, and it seems to be unencumbered by the TTY0 issue. For now, I will chase the few other problems I have with it, and use it unless it has issues I can't live with. Still, I'd like to know what is at the root of the problem. At this point, I'm thinking that this is an example of an upgrade that requires so much change to other parts of an installation that packagers like Redhat and the others simply say 'time for a new release', make all of the required changes that keep everything compatible, and release it as a new version. If I'm correct, it makes one appreciate the work that packagers do.

--- rod.
 
Old 01-09-2009, 10:05 AM   #4
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 37
Yes it looks like your new kernel has devfs setup. Try to disable it and see what happens.
 
Old 01-09-2009, 11:05 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
How can I disable it? I can't find any entry for it in the config file. Or are you suggesting to re-work the initrd? Not too sure how to do that; perhaps by modifying mkinitrd?

--- rod.
 
Old 01-12-2009, 07:09 AM   #6
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 37
With your distro I'm not sure how to add it to the initrd. In some like redhat or centos there is a make install which creates it. You can also do mkinitrd as well.

I meant to disable it in the kernel config, or enable it if it's disabled at that point you can rebuild the kernel and it will work.
 
Old 01-13-2009, 10:05 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Thanks for your reply. From what I can see, I don't think devfs is at the root of the problem. In all versions of the working kernel, the respective config contains
Code:
# CONFIG_DEVFS_FS is not set
In /usr/src/linux-2.6.27/Documentation/ABI/removed/devfs I read:
Code:
What:           devfs
Date:           July 2005 (scheduled), finally removed in kernel v2.6.18
Contact:        Greg Kroah-Hartman <gregkh@suse.de>
Description:
        devfs has been unmaintained for a number of years, has unfixable
        races, contains a naming policy within the kernel that is
        against the LSB, and can be replaced by using udev.
        The files fs/devfs/*, include/linux/devfs_fs*.h were removed,
        along with the assorted devfs function calls throughout the
        kernel tree.
My interpretation of this is that devfs has not been in use in the kernels installed on this host for some time.

What I really would like to know is where and when the '/dev/tty*' tree gets populated. Since in the initrd used by the working kernels, the /dev tree is initially empty, I can only surmise that there is some boot-time mechanism that populates the tree. If I knew how this happens, perhaps I could influence it to work in my favor. What seems to be the case is that it happens within the kernel or some kernel-specific component, and not as a generic part of the system, otherwise the behavior would be consistent across kernel versions.

--- rod.
 
Old 01-14-2009, 08:01 AM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187
"W-H-O-A-A-A! Slow down there, pardner! Can't you see that sign up ahead that says, 'BRIDGE OUT' ??? Now, why don't you just look there at your map and see where you want to be goin', before you just go off and 'do stuff' ...? Sure, I got a wad of rope here with me, but it ain't gonna be nearly long enough to fish you out of that canyon!"

...

Linux systems have changed a whole lot, particularly in the latest "two-point-six" versions. The whole hardware-discovery process is new, and you can define what shows up in "/dev," how it's named, and when it shows up there. It all has to do with the so-called "hotplug" (and, you guessed it, "coldplug") system. So, why not start your readings with man hotplug, and see where that takes you?

"Y'see, devices these days are removable, and people got tired of having hundreds of entries in /dev for devices that didn't really exist. So, they devised a really flexible way to let the system recognize when you stuck a device into the USB-port or pulled it out again. Named that one 'hotplug.' And then, they turned their attention to how you set things up when you first turned the computer on. Named that one 'coldplug,' but I don't reckon they ever quite got around to writing a manual-page about it..."
 
Old 01-14-2009, 09:34 AM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by sundialsvcs View Post
Linux systems have changed a whole lot, particularly in the latest "two-point-six" versions. The whole hardware-discovery process is new, and you can define what shows up in "/dev," how it's named, and when it shows up there. It all has to do with the so-called "hotplug" (and, you guessed it, "coldplug") system. So, why not start your readings with man hotplug, and see where that takes you?
Sure, I get that. Been there, done that.
I haven't changed any of that stuff, and yet booting a newer kernel has changed how the /dev tree gets populated. Note that I've upgraded from a 2.6 version to a newer 2.6 (2.6.27) version. As I understand it, hotplug is used to respond to changes in installed devices, such as USB devices. In my case, I'm talking about a virtual device, /dev/tty0, which is (or should be) a console (not a serial port, just to clarify). I cannot see anywhere in the hotplug files (/etc/hotplug/...) that has anything to do with such device nodes. And that seems to make sense to me; nothing has changed there since the old kernel was used.
What does make some sense is that hotplug can respond to the kernel according to arguments given to it by the kernel. I cannot see anywhere that hotplug deals with stuff in the /dev/tty* hierarchy. For that matter, I can't seem to see anything anywhere that allows me to 'define what shows up in "/dev," how it's named, and when it shows up there' where it relates to the /dev/tty* hierarchy. My surmise is that it must be hardcoded into the kernel, and is likely, therefore, to be immutable for all intents and purposes. I haven't given up yet, though.

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
TARPIT and newer kernels felosi Linux - Security 25 05-10-2008 12:10 AM
Slack 11 newer kernels break networking octetstream Slackware 7 12-11-2006 01:41 PM
all the newer kernels im compiling pause on udev darksmiley Linux - General 6 12-28-2005 09:05 AM
Is there something similar to ip personality for newer 2.4 kernels ? Menestrel Linux - Security 0 08-07-2005 03:30 AM
kmod is used in newer kernels but... hampel Linux - General 1 08-27-2003 02:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration