* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
@ 2005-06-19 11:37 ` Alexander E. Patrakov
2005-06-19 12:07 ` Janne Karhunen
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alexander E. Patrakov @ 2005-06-19 11:37 UTC (permalink / raw)
To: linux-hotplug
Janne Karhunen wrote:
> Hi,
>
> Is this the right place to ask questions? Hope so.
Not sure, since you haven't provided enough information.
> 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;
> ..
> 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
> $
Please post the list of loaded modules, the output of lspci -n, and the
kernel config.
--
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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
2005-06-19 11:37 ` Alexander E. Patrakov
@ 2005-06-19 12:07 ` Janne Karhunen
2005-06-19 12:42 ` Alexander E. Patrakov
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Janne Karhunen @ 2005-06-19 12:07 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 722 bytes --]
On Sunday 19 June 2005 14:37, Alexander E. Patrakov wrote:
> > Is this the right place to ask questions? Hope so.
>
> Not sure, since you haven't provided enough information.
Fair enough -
> > 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
> > $
>
> 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.
--
// Janne
[-- Attachment #2: config.gz --]
[-- Type: application/x-gzip, Size: 14220 bytes --]
[-- Attachment #3: lspci --]
[-- Type: text/plain, Size: 932 bytes --]
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)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
2005-06-19 11:37 ` Alexander E. Patrakov
2005-06-19 12:07 ` Janne Karhunen
@ 2005-06-19 12:42 ` Alexander E. Patrakov
2005-06-19 12:48 ` Jasper Huijsmans
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alexander E. Patrakov @ 2005-06-19 12:42 UTC (permalink / raw)
To: linux-hotplug
Janne Karhunen wrote:
> On Sunday 19 June 2005 14:37, Alexander E. Patrakov wrote:
>>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.
Looks good for your hardware (but I have absolutely no experience with
x86_64).
> 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/*
--
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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (2 preceding siblings ...)
2005-06-19 12:42 ` Alexander E. Patrakov
@ 2005-06-19 12:48 ` Jasper Huijsmans
2005-06-19 13:10 ` Janne Karhunen
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jasper Huijsmans @ 2005-06-19 12:48 UTC (permalink / raw)
To: linux-hotplug
Op zo, 19-06-2005 te 14:20 +0300, schreef Janne Karhunen:
> 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..
>
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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (3 preceding siblings ...)
2005-06-19 12:48 ` Jasper Huijsmans
@ 2005-06-19 13:10 ` Janne Karhunen
2005-06-19 13:48 ` Alexander E. Patrakov
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Janne Karhunen @ 2005-06-19 13:10 UTC (permalink / raw)
To: linux-hotplug
On Sunday 19 June 2005 15:42, Alexander E. Patrakov wrote:
> 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?
--
// 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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (4 preceding siblings ...)
2005-06-19 13:10 ` Janne Karhunen
@ 2005-06-19 13:48 ` Alexander E. Patrakov
2005-06-19 14:37 ` Janne Karhunen
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alexander E. Patrakov @ 2005-06-19 13:48 UTC (permalink / raw)
To: linux-hotplug
Janne Karhunen wrote:
> On Sunday 19 June 2005 15:42, Alexander E. Patrakov wrote:
>
>
>>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?
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.
--
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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (5 preceding siblings ...)
2005-06-19 13:48 ` Alexander E. Patrakov
@ 2005-06-19 14:37 ` Janne Karhunen
2005-06-19 15:07 ` Janne Karhunen
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Janne Karhunen @ 2005-06-19 14:37 UTC (permalink / raw)
To: linux-hotplug
On Sunday 19 June 2005 16:48, Alexander E. Patrakov wrote:
> > 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.
> 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
;;
esac
done
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.
--
// 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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (6 preceding siblings ...)
2005-06-19 14:37 ` Janne Karhunen
@ 2005-06-19 15:07 ` Janne Karhunen
2005-06-19 15:14 ` Alexander E. Patrakov
2005-06-19 15:53 ` Janne Karhunen
9 siblings, 0 replies; 11+ messages in thread
From: Janne Karhunen @ 2005-06-19 15:07 UTC (permalink / raw)
To: linux-hotplug
On Sunday 19 June 2005 17:37, Janne Karhunen wrote:
> 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 :/
--
// 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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (7 preceding siblings ...)
2005-06-19 15:07 ` Janne Karhunen
@ 2005-06-19 15:14 ` Alexander E. Patrakov
2005-06-19 15:53 ` Janne Karhunen
9 siblings, 0 replies; 11+ messages in thread
From: Alexander E. Patrakov @ 2005-06-19 15:14 UTC (permalink / raw)
To: linux-hotplug
Janne Karhunen wrote:
> On Sunday 19 June 2005 17:37, Janne Karhunen wrote:
>
>
>>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 :/
Sorry, I should have noticed this earlier:
> 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."
>
> Just a reminder because I bet many people will get caught out by this!
So please upgrade udev.
--
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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: 2.6.12 + devices on initrd
2005-06-19 11:20 2.6.12 + devices on initrd Janne Karhunen
` (8 preceding siblings ...)
2005-06-19 15:14 ` Alexander E. Patrakov
@ 2005-06-19 15:53 ` Janne Karhunen
9 siblings, 0 replies; 11+ messages in thread
From: Janne Karhunen @ 2005-06-19 15:53 UTC (permalink / raw)
To: linux-hotplug
On Sunday 19 June 2005 18:14, Alexander E. Patrakov wrote:
> > 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..
--
// 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_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 11+ messages in thread