little udev problem - loop devices instead of hda devices!
I'm not posting this from the affected machine, so apologies if any vital information is missing.
I am running Fedora Core 1 and I recently compiled kernel 2.6.2 as an upgrade. I was intrigued to see that devfs, which I had previously found useful, was labelled OBSOLETE and so I decided to see what udev was all about.
Reading Greg's FAQ etc I can see that udev is going to be great. I installed udev 0.16 last night and had a play with the config/rules/permissions files. When eventually I felt ready to reboot I took a deep breath and did it.
Overall, it seemed to handle most of my devices just fine, and I got a really slimline /udev directory with all my devices just sitting there and no crud.
Except... no hard drive. The computer didn't actually boot because it couldn't find a console. Using my rescue disk I went in and mknodded a /dev/console file. The next time it booted a bit further until it said "Error: canot find /dev/hda1 - no such file or device" (I paraphrase).
I have seven partitions on my single hard drive: hda1 - hda7. None of these were there in /dev or /udev. I hadn't changed anything to do with ide or hda in the config files, AFAIK.
What I had instead was /udev/loop0 ... /udev/loop7 - very suspicious! For some reason instead of loading hda devices it was loading loop devices - seven of them (this is no coincidence I'm sure!). (The loop nodes were char-major 7 as you would expect). And in /dev I had all the redundant hda files from hda8 upwards.
Can anyone help with these questions please:
What should I do to make sure my hda partitions are found at boot time? Why are the loop devices being created instead? Is it safe yet to empty /dev and just rely on /udev when things are properly configured (and presumably udev then somehow symlinks from /dev or intercepts calls to /dev/* and uses /udev/* instead)? Should I just go in and mknod my hda* devices again or would that not be a good idea? Anyone have an idea what I might have set up wrong; or does this look as if a piece of software is missing???
Sorry I can't post my /etc/udev/* files very easily, but I can get at them if needed.
Many thanks,
Francis Barton
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · On Thu, Feb 12, 2004 at 03:50:40PM +0000, [email protected] wrote:
What should I do to make sure my hda partitions are found at boot time? Why are the loop devices being created instead? Is it safe yet to empty /dev and just rely on /udev when things are properly configured (and presumably udev then somehow symlinks from /dev or intercepts calls to
/dev/*and uses /udev/* instead)? Should I just go in and mknod my hda* devices again or would that not be a good idea? Anyone have an idea what I might have set up wrong; or does this look as if a piece of software is missing???
Well, I'm not an expert on udev yet, and other people on the list can probably correct me if I make a mistake somewhere (hopefully, they'll be gentle).
udev is a completely userspace program, unlike devfs that lived partly in the kernel. udev will probably be started as part of init.d, meaning it won't start up until after / has been mounted. This is a catch-22, of course, since the system needs udev to run to find the root partition and console, and udev won't start up until the system is up.
So, the fix this, you have to create a initrd(?) image to load up the initial system with the bare minimum devices statically created (your /, console etc), and then switch over to udev once / has been mounted.
Right now, udev only lives on one directory. Check your /etc/udev/udev.conf entry for udev_root for where that is. If it is /udev, /dev is not used at all.
As to your /dev/loop0-/dev/loop7, I suspect you have loop either statically linked, or loaded as a module. I try to load the loop module, and those devices got created.
Finally, even though devfs has been set to obsolete in 2.6.x, it won't be removed yet, so you can safely use it if it works for you for now. I personally run devfs to manage my /dev, while I'm testing udev on /udev.
Signature · 2 lines
John L. Fjellstad web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
Quoted 11 lines · On Thu, Feb 12, 2004 at 03:50:40PM +0000, [email protected] wrote:
I'm not posting this from the affected machine, so apologies if any vital information is missing.
I am running Fedora Core 1 and I recently compiled kernel 2.6.2 as an upgrade. I was intrigued to see that devfs, which I had previously found useful, was labelled OBSOLETE and so I decided to see what udev was all about.
Reading Greg's FAQ etc I can see that udev is going to be great. I installed udev 0.16 last night and had a play with the config/rules/permissions files. When eventually I felt ready to reboot I took a deep breath and did it.
Quoted 7 lines
Overall, it seemed to handle most of my devices just fine, and I got a really slimline /udev directory with all my devices just sitting there and no crud.
Except... no hard drive. The computer didn't actually boot because it couldn't find a console. Using my rescue disk I went in and mknodded a
/dev/consolefile. The next time it booted a bit further until it said "Error: canot find/dev/hda1- no such file or device" (I paraphrase).
Are you trying to use udev to manage your /dev?
I'd really recommend trying to get a 2.6 kernel to boot properly on your box before worrying about udev.
After you do that, then try putting udev into your initrd. The latest version of udev from Fedora does this I think.
Good luck,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Greg KH
Quoted 7 lines
Overall, it seemed to handle most of my devices just fine, and I got a really slimline /udev directory with all my devices just sitting there and no crud.
Except... no hard drive. The computer didn't actually boot because it couldn't find a console. Using my rescue disk I went in and mknodded a
/dev/consolefile. The next time it booted a bit further until it said "Error: canot find/dev/hda1- no such file or device" (I paraphrase).Are you trying to use udev to manage your /dev?
Trying to, yes! I want to persevere with it to get it to work, and follow the development of udev. I am not a programmer myself but I find the way programs like this one function really interesting.
I have set udev root to /dev - this worked ok but have decided to set it back to /udev again and keep devfs hanging on.
Quoted 2 lines
I'd really recommend trying to get a 2.6 kernel to boot properly on your box before worrying about udev.
Well it's booting ok now - using /dev rather than /udev I think - I had to mknod /dev/console /dev/null and /dev/hda1-7 by hand to get it to boot though. So I'm kind of back where I started but ready to try again. I don't really have any unusual hardware so I feel it ought to work ok for me.
Quoted 2 lines
After you do that, then try putting udev into your initrd. The latest version of udev from Fedora does this I think.
I will try the RPM but I would really like to know how to do this by hand in order to understand better - with mkinitrd I presume? I Googled for "udev initrd" and didn't find much of use to me.
Quoted 1 line
Good luck,
Thanks, I'll be back for help again I guess. I think I've got myself a little confused about exactly how to implement udev but I'll keep trying till it works. My instinct says it should be simple ;-)
Francis
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · John L. Fjellstad
udev is a completely userspace program, unlike devfs that lived partly in the kernel. udev will probably be started as part of init.d, meaning it won't start up until after / has been mounted. This is a catch-22, of course, since the system needs udev to run to find the root partition and console, and udev won't start up until the system is up.
So, the fix this, you have to create a initrd(?) image to load up the initial system with the bare minimum devices statically created (your /, console etc), and then switch over to udev once / has been mounted.
This is the bit that is confusing me - how can I build an initrd with console and null support? Or is there a way of getting udev to create console and null - are they udev-compliant or are workarounds needed?
When I boot up with just udev I hit an error "no initial console found". man mkinitrd seems to refer only to modules (using the --with= flag) - but I don't know which modules are needed for console and null.
Can anybody help please?
Fedora 1, kernel 2.6.2, udev 018
(The loop problem has gone away BTW)
Thank you.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
On Fedora the /dev directory on your init device that you are going to mount udev over needs to contain at the minimum an entry for console. This is not a problem with initrd, Fedore initrd will work without change.
mknod /dev/console c 5 1
Maybe some Fedora expert can figure out how to remove this requirement.
Quoted 30 lines · --- Francis Barton
Quoted 9 lines · John L. Fjellstad
udev is a completely userspace program, unlike devfs that lived partly in the kernel. udev will probably be started as part of init.d, meaning it won't start up until after / has been mounted. This is a catch-22, of course, since the system needs udev to run to find the root partition and console, and udev won't start up until the system is up.
So, the fix this, you have to create a initrd(?) image to load up the initial system with the bare minimum devices statically created (your /, console etc), and then switch over to udev once / has been mounted.
This is the bit that is confusing me - how can I build an initrd with console and null support? Or is there a way of getting udev to create console and null - are they udev-compliant or are workarounds needed?
When I boot up with just udev I hit an error "no initial console found". man mkinitrd seems to refer only to modules (using the --with= flag) - but I don't know which modules are needed for console and null.
Can anybody help please?
Fedora 1, kernel 2.6.2, udev 018
(The loop problem has gone away BTW)
Thank you.
Quoted 9 lines
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
==Jon Smirl
[email protected]
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel