2.6.12 + devices on initrd
Hi,
Is this the right place to ask questions? Hope so.
I'm having a bit of a problem with udev with 2.6.12. Seems that after upgrading from 2.6.11.12 udev no longer creates device files on initrd. Kernel initialization stops as it's not able to start mounting root device. IDE modules load fine, and so does reiserfs. Output is roughly following;
..
Loading kernel/fs/reiserfs/reiserfs.ko
Waiting for device /dev/hda5 to appear: ....
not found -- exiting to /bin/sh
sh: can't access tty; job control turned off
$
System is SUSE 9.3 on x86-64 (Asus A8N8X). Udev versions are; udev-053-15.2
udev-32bit-9.3-7.1
Any help appreciated..
Signature · 12 lines
// Janne ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Janne Karhunen
Hi,
Is this the right place to ask questions? Hope so.
Not sure, since you haven't provided enough information.
Quoted 5 lines
I'm having a bit of a problem with udev with 2.6.12. Seems that after upgrading from 2.6.11.12 udev no longer creates device files on initrd. Kernel initialization stops as it's not able to start mounting root device. IDE modules load fine, and so does reiserfs.
Do you know that they still load fine even without the relevant hardware being present? That isn't a bug. So you said really nothing by that.
Output is roughly following;
Quoted 6 lines
..
Loadingkernel/fs/reiserfs/reiserfs.ko
Waiting for device/dev/hda5to appear: ....
not found -- exiting to/bin/sh
sh: can't access tty; job control turned off
$
Please post the list of loaded modules, the output of lspci -n, and the kernel config.
Signature · 12 lines
Alexander E. Patrakov ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Alexander E. Patrakov
Quoted 1 line
Is this the right place to ask questions? Hope so.
Not sure, since you haven't provided enough information.
Fair enough -
Quoted 8 lines
Quoted 5 lines
Loading
kernel/fs/reiserfs/reiserfs.ko
Waiting for device/dev/hda5to appear: ....
not found -- exiting to/bin/sh
sh: can't access tty; job control turned off
$Please post the list of loaded modules, the output of lspci -n, and the kernel config.
Loaded at the time are: reiserfs, ide_cd, cdrom, ide_disk, sata_sil, sata_nv, libata, amd74xx, ide_core, sd_mod and scsi_mod.
Lspci output and kernel config attached. Config is basically just a clone of previous one that worked fine.
Signature · 1 line
// Janne
0000:00:00.0 Class 0580: 10de:005e (rev a3) 0000:00:01.0 Class 0601: 10de:0050 (rev a3) 0000:00:01.1 Class 0c05: 10de:0052 (rev a2) 0000:00:02.0 Class 0c03: 10de:005a (rev a2) 0000:00:02.1 Class 0c03: 10de:005b (rev a3) 0000:00:04.0 Class 0401: 10de:0059 (rev a2) 0000:00:06.0 Class 0101: 10de:0053 (rev a2) 0000:00:07.0 Class 0101: 10de:0054 (rev a3) 0000:00:08.0 Class 0101: 10de:0055 (rev a3) 0000:00:09.0 Class 0604: 10de:005c (rev a2) 0000:00:0a.0 Class 0680: 10de:0057 (rev a3) 0000:00:0b.0 Class 0604: 10de:005d (rev a3) 0000:00:0c.0 Class 0604: 10de:005d (rev a3) 0000:00:0d.0 Class 0604: 10de:005d (rev a3) 0000:00:0e.0 Class 0604: 10de:005d (rev a3) 0000:00:18.0 Class 0600: 1022:1100 0000:00:18.1 Class 0600: 1022:1101 0000:00:18.2 Class 0600: 1022:1102 0000:00:18.3 Class 0600: 1022:1103 0000:01:00.0 Class 0300: 10de:0141 (rev a2) 0000:05:0a.0 Class 0104: 1095:3114 (rev 02) 0000:05:0c.0 Class 0200: 11ab:4320 (rev 13)
Quoted 7 lines · Janne Karhunen
Quoted 2 lines · Alexander E. Patrakov
Please post the list of loaded modules, the output of lspci -n, and the kernel config.
Loaded at the time are: reiserfs,
ide_cd, cdrom,ide_disk,sata_sil,sata_nv, libata, amd74xx,ide_core,sd_modandscsi_mod.
Looks good for your hardware (but I have absolutely no experience with x86_64).
Quoted 2 lines
Lspci output and kernel config attached. Config is basically just a clone of previous one that worked fine.
Thanks. Since the initrd drops you to a shell, could you please in that shell execute the following command and mail the results here, so that we know what devices are created by udev?
echo /dev/*
Signature · 12 lines
Alexander E. Patrakov ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Op zo, 19-06-2005 te 14:20 +0300, schreef Janne Karhunen:
Quoted 16 lines
Hi,
Is this the right place to ask questions? Hope so.
I'm having a bit of a problem with udev with 2.6.12. Seems that after upgrading from 2.6.11.12 udev no longer creates device files on initrd. Kernel initialization stops as it's not able to start mounting root device. IDE modules load fine, and so does reiserfs. Output is roughly following;
..
Loadingkernel/fs/reiserfs/reiserfs.ko
Waiting for device/dev/hda5to appear: ....
not found -- exiting to/bin/sh
sh: can't access tty; job control turned off
$
Quoted 6 lines
System is SUSE 9.3 on x86-64 (Asus A8N8X). Udev versions are; udev-053-15.2
udev-32bit-9.3-7.1Any help appreciated..
I believe you need to update to udev 058. Something changed between 2.6.11.x and 2.6.12 that requires a newer udev.
Jasper
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Alexander E. Patrakov
Thanks. Since the initrd drops you to a shell, could you please in that shell execute the following command and mail the results here, so that we know what devices are created by udev?
echo
/dev/*
There are plenty. After dropping to shell, it looks like everything necessary is in place. I'm even able to mount root etc.
So this is some form of a timing issue - it just doesn't wait long enough before giving up. Can i tune this somehow?
Signature · 12 lines
// Janne ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&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 · Janne Karhunen
Quoted 4 lines · Alexander E. Patrakov
Thanks. Since the initrd drops you to a shell, could you please in that shell execute the following command and mail the results here, so that we know what devices are created by udev?
Quoted 8 lines
Quoted 1 line
echo
/dev/*There are plenty. After dropping to shell, it looks like everything necessary is in place. I'm even able to mount root etc.
So this is some form of a timing issue - it just doesn't wait long enough before giving up. Can i tune this somehow?
It's a bug in mkinitrd / mkinitramfs / whatever tool you used to create this initrd. BTW how long does it wait?
As a workaround, you can manually recreate the initrd using the existing one as a base and adding a "sleep 15" before mounting root.
Signature · 12 lines
Alexander E. Patrakov ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Alexander E. Patrakov
Quoted 5 lines
There are plenty. After dropping to shell, it looks like everything necessary is in place. I'm even able to mount root etc.
So this is some form of a timing issue - it just doesn't wait long enough before giving up. Can i tune this somehow?
It's a bug in mkinitrd / mkinitramfs / whatever tool you used to create this initrd. BTW how long does it wait?
Looks like less than a second - but this is perfectly ok with 2.6.11 series.
Quoted 2 lines
As a workaround, you can manually recreate the initrd using the existing one as a base and adding a "sleep 15" before mounting root.
Most interesting thing just happened while looking for the mount command (for root) with grep. Whole box became unusable as all terminals + applications running at the time started to be fed with newlines. Even GUI apps. So, for some reason it started to have a constant keyboard interrupt. Ah well, 10 years since the introduction of USB, and it still doesn't work :/
Anyway, it seems to mount root from script called 'init'. This very same script seems to later on start the real init. It seems to be doing following at the time it fails;
..
echo "Loading kernel/fs/reiserfs/reiserfs.ko"
insmod /lib/modules/2.6.12-default/kernel/fs/reiserfs/reiserfs.ko
if ! udev_discover_root ; then
echo "not found -- exiting to /bin/sh"
cd /
PATH=$PATH PS1='$ ' /bin/sh -i
fi
..
Function looks like:
udev_discover_root() {
local root
case "$rootdev" in
*:*) root= ;;
/dev/nfs) root= ;;
/dev/*) root=${rootdev#/dev/} ;;
esac
if [ -z "$root" ]; then
return 0
fi
if udev_wait_for_device $root $vg_root; then
path=$(udevinfo -q path -n $root)
if [ $? -eq 0 -a -n "$path" ]; then
set -- $(udev_read_devn $path)
if [ -n "$1" ]; then
devn=$1
major=$2
minor=$3
fi
else
# Try major:minor number of the device node
devn=$(devnumber $rootdev)
major=$(devmajor $devn)
minor=$(devminor $devn)
fi
fi
if [ -n "$devn" ]; then
echo "rootfs: $entry major=$major minor=$minor" \
"devn=$devn"
echo $devn > /proc/sys/kernel/real-root-dev
return 0
else
return 1
fi
}..
udev_wait_for_device() {
local root
local vg
local retval=1
local timeout=$udev_timeout
root=$1
vg=$2
if [ -n "$root" ]; then
echo -n "Waiting for device /dev/$root to appear: "
while [ $timeout -gt 0 ]; do
if [ -e /dev/$root ]; then
if [ $? -eq 0 ]; then
echo " ok"
retval=0
break;
fi
fi
sleep 1
echo -n "."
[ -n "$vg" ] && vgchange -a y $vg
timeout=$(( $timeout - 1 ))
done
fi
# Rescan for LVM1
if [ -n "$vg" -a $retval -eq 1 ]; then
vgscan
vgchange -a y $vg
fi
return $retval;
}..
# Default timeout is 5 seconds
udev_timeout=5
# Override timeout from commandline
for o in $(cat /proc/cmdline); do
case $o in
udev_timeout=*)
set -- $(IFS= ; echo $o)
udev_timeout=$2
;;
esacdone
So it defaults to 5 second wait, but it really doesn't wait that long. It waits less than a second prior to giving up. Umm .. what could cause 'sleep' not to sleep .. umm, a signal. But where could it get that? ARGH. So i'm guessing adding additional sleeps or even using that 'udev_timeout' switch doesn't help.
Signature · 12 lines
// Janne ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Janne Karhunen
So it defaults to 5 second wait, but it really doesn't wait that long. It waits less than a second prior to giving up. Umm .. what could cause 'sleep' not to sleep .. umm, a signal. But where could it get that? ARGH. So i'm guessing adding additional sleeps or even using that '
udev_timeout' switch doesn't help.
So much for my sense of time (once playing with Linux, anyway).
Giving it 20 second timeout via udev_timeout does help, it goes on booting. But for some reason udev is _really_slow_ on creating devices with 2.6.12. Creating just that one device takes more than 10 seconds. Let alone when it keeps on booting with SUSEs highly-parallel init; udev is so slow that it seems to break everything :/
Signature · 12 lines
// Janne ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · Janne Karhunen
Quoted 5 lines · Janne Karhunen
So it defaults to 5 second wait, but it really doesn't wait that long. It waits less than a second prior to giving up. Umm .. what could cause 'sleep' not to sleep .. umm, a signal. But where could it get that? ARGH. So i'm guessing adding additional sleeps or even using that '
udev_timeout' switch doesn't help.
Quoted 8 lines
So much for my sense of time (once playing with Linux, anyway).
Giving it 20 second timeout via
udev_timeoutdoes help, it goes on booting. But for some reason udev is _really_slow_ on creating devices with 2.6.12. Creating just that one device takes more than 10 seconds. Let alone when it keeps on booting with SUSEs highly-parallel init; udev is so slow that it seems to break everything :/
Sorry, I should have noticed this earlier:
Quoted 12 lines
FWIW In the udev 058 announcement, Greg said:
"Note, if you are running a kernel newer than 2.6.12-rc4 (including the -mm releases) and you have any custom udev rules, you MUST upgrade to the latest version to allow udev to work properly.
This change happened
because of a previously-unrealized reliance in libsysfs on the presence of a useless sysfs file that has recently been removed. Hopefully the libsysfs people will be releasing a new version shortly with this change
in it for those packages who rely on it."
Quoted 1 line
Just a reminder because I bet many people will get caught out by this!
So please upgrade udev.
Signature · 12 lines
Alexander E. Patrakov ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Alexander E. Patrakov
Quoted 1 line
Just a reminder because I bet many people will get caught out by this!
So please upgrade udev.
So i did. Made absolutely no difference with 2.6.12. Besides, it seemed to break 2.6.11.12, so i had to downgrade.
Oh, the joys of using Linux. Fix one corner, and..
Signature · 12 lines
// Janne ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel