Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm attempting to compile a kernel.org kernel version 2.6.23.12. I ran into some problems with it not finding my sata drive... but I worked that out.
Now I'm hitting a road block with the whole depreciated devfs ---> new udev issue. It can't mount the drive and thus can't boot.
I don't know much else than that. I've never compiled a kernel myself before and accepted it as a challenge. I assume once I get ver 2.6.23-12 up and running I have no reason to use 2.6.18-5 (my current working kernel).
I'm looking for some basic info (or some help finding it) about the difference between the two, are there any problems I may run into in the future by switching, do I have to switch... I'm clueless.
Thank you in advance.
Last edited by checkmate3001; 12-29-2007 at 06:40 PM.
Reason: fixed my current working kernel version from 2.4 to correct 2.6.18-5
I don't know if you are having a udev issue. One thing that could trip you up is if you use the "acpi=no" kernel option. Disabling acpi will also disable udev. You should provided information such as how many drives you have, what the model of the drive is, what controller you have, etc. Is it the root partition that you can't mount, or a different one? At what stage does the problem occur? It could be a matter of not having a needed module in initrd that the kernel needs for that controller.
If your BIOS, Grub or the Kernel have different ideas on which drive should come first, that could cause a problem booting as well. If grub considers one drive (hd0,0) when booting, but (hd1,0) after booting, you will even have a problem getting the mbr updated. A fix is to edit /boot/grub/device.map.
If you are compiling a new kernel, you should run "make oldconfig" before "make xconfig". This will reused your old working config on the new kernel and prompt you only for new items. You can then tweak your config further in "make xconfig".
Rereading your title, it looks like you may have an entry in /etc/fstab or in a mount command in initrd that refers to devfs which doesn't exist. Which distro are you using? You may have better luck if you upgraded your distro first.
---
To sum up, I don't think the problem is with udev. The problem is that you are trying to use devfs somewhere. The question is where?
Information, we need info.
- messages
- at what stage of the boot are you failing ???
- initrd involved ???
2.6.19 brought in the (major) libata change - .18 to .23 is a pretty major jump; especially if using the .config out of a distro, rather than your own "known good" config.
Using oldconfig will get a bit ugly, but can be managed.
I have made the appropriate changes regarding grub since in this howto they are using lilo instead. They are also jumping from kernel ver 2.4 to 2.6
I haven't figured out how to get the messages from the terminal into a file . I think it happens to early in the boot and since it can't mount the drive it is somewhat moot. This is what I have written down (everything before this, which isn't much, seems to be fine):
Code:
initrd-tools: 0.1.84.2
mount: unknown filesystem type "devfs"
unmount: devfs: not supported
mount: unknown filesystem type "devfs"
unmount: devfs: not supported
pivot-root: No such file or directory
/sbin/init: 432: Cannot open dev/console: No such file
Kernel Panic - not syncing: Attempted to kill init!
The best I can tell (and I'm only guessing) is that my current working kernel supports the devfs and the new vanilla kernel does not. I had an earlier problem with it not being able to find the drive, but after a couple more attempts I realized and found that the sata module needed to be loaded/included.
I can include more info - just let me know what you need.
I did take my old config and tried to apply it to the new kernel but it appears like there were a lot of options that didn't translate to the new kernel. A lot of errors/warnings came up when I did the 'make menuconfig' before it opened.
O.k., the problem is with the initrd - it has to have all the support needed to allow the root to be mounted (where said support isn't in the kernel itself).
Never use one myself - I always compile what I need into the kernel itself. Else what's the point of doing my own kernel ???.
I'm surprised devfs even still worked on 2.6.18 - you'll (apparently) have to go with udev now. That means a rebuild of the initrd, or moving over to in-kernel support. Will also mean a rework of the init scripts I would think, but I'm not a Debian user so I couldn't say for sure.
Usually, the mkinitrd command is a bash or perl script written by the distro maintainers.
I would recommend installing a 2.6 kernel for debian. The source package for a kernel using udev will probably update the mkinitrd script as well. After that, you would probably have better luck trying to compile a generic kernel.
Code:
http://www.debian.org/doc/manuals/reference/ch-kernel.en.html
7.3 The 2.6 kernel with udev
The udev is a dynamic replacement for /dev/. Device names can be chosen to be very short ones. The devfs used in the 2.4 kernel is now obsolete.
Installing the new Debian 2.6 kernel provided by kernel-image-2.6.NN with udev package will enable this.
You should mount or extract your initrd file and study any scripts in it. Some initrd files are gzipped cpio archives, while others are compressed cramfs images.
To give you an idea, on my SuSE 10.3 laptop, this is the contents of /sbin/ in my initrd file:
Your initrd file is probably designed for a kernel using devfs instead of one with udev support.
I bet your errors are occurring as the system is running in the initrd environment. If you examine the intrd contents, I bet you will find that the scripts it uses are obsolete.
You could also look in /lib/mkinitrd/ if it exists. If it exists, it may contain the resources that are copied to produce the initrd ramdisk file.
Also check if you have a "man 5 mkinitrd" manpage".
You may also need to look into the startup scripts your system uses as well.
Also, you need to install and configure the udevd daemon, the related commands and the /etc/udev.d/config/ files. Udev uses helper programs. KDE or Gnome is also involved. when you insert an external drive, udev will create the device nodes, but a kde or gnome daemon will mount it based on the user's actions.
Udevd & hald & the desktop environment are interconnected. I would recommend updating your distro instead. Otherwise you will have to duplicate all the work already done by others.
Sorry, but Debian "etch" doesn't mean anything to me. Is this the same as "Debian 4.0"?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.