All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
@ 2011-05-17 13:19 Diego Iastrubni
  2011-05-17 13:28 ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-17 13:19 UTC (permalink / raw)
  To: buildroot

I am seeing that my boot is now ~60 seconds, and hte boots hangs ~40 secs
while starting udev.

This is caused by ca520507fc15a8213334a76339a3e6d567e91ea0 which claims that
/sys/ and friends are moutned by inittab. I found no such code in the
ininttab installed is my unit,  and the inittab available in the head
(59af9a8..ce1ae87)  in fs/skeleton/etc/inittab does not mount /sys/ at boot
time. Reverting the inittab to the one before this change fixes the boot
time.

What am I missing?

I am using busybox's init, code sourcry ARM toolkit, and bootinsg from NFS
into an OMAP3.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110517/ed29e5de/attachment.html>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-17 13:19 [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab) Diego Iastrubni
@ 2011-05-17 13:28 ` Thomas Petazzoni
  2011-05-17 13:45   ` Diego Iastrubni
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2011-05-17 13:28 UTC (permalink / raw)
  To: buildroot

On Tue, 17 May 2011 16:19:36 +0300
Diego Iastrubni <diegoiast@gmail.com> wrote:

> I am seeing that my boot is now ~60 seconds, and hte boots hangs ~40 secs
> while starting udev.
> 
> This is caused by ca520507fc15a8213334a76339a3e6d567e91ea0 which claims that
> /sys/ and friends are moutned by inittab. I found no such code in the
> ininttab installed is my unit,  and the inittab available in the head
> (59af9a8..ce1ae87)  in fs/skeleton/etc/inittab does not mount /sys/ at boot
> time. Reverting the inittab to the one before this change fixes the boot
> time.

Well inittab does "mount -a" and /etc/fstab says that sysfs should be
mounted.

Moreover the ca520507fc15a8213334a76339a3e6d567e91ea0 you're pointing
did not change the inittab, so I don't know how reverting could modify
the inittab. Are you referring to the udev startup script ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-17 13:28 ` Thomas Petazzoni
@ 2011-05-17 13:45   ` Diego Iastrubni
  2011-05-19 11:34     ` Diego Iastrubni
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-17 13:45 UTC (permalink / raw)
  To: buildroot

On Tue, May 17, 2011 at 4:28 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Well inittab does "mount -a" and /etc/fstab says that sysfs should be
> mounted.
Noted. My inittab does contain those line... and the ininttab does
contain "mount -a"...


> Moreover the ca520507fc15a8213334a76339a3e6d567e91ea0 you're pointing
> did not change the inittab, so I don't know how reverting could modify
> the inittab. Are you referring to the udev startup script ?
I reverted S10udev of course.
How can I debug this?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-17 13:45   ` Diego Iastrubni
@ 2011-05-19 11:34     ` Diego Iastrubni
  2011-05-19 11:47       ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-19 11:34 UTC (permalink / raw)
  To: buildroot

On Tue, May 17, 2011 at 4:45 PM, Diego Iastrubni <diegoiast@gmail.com>
wrote:
>> Moreover the ca520507fc15a8213334a76339a3e6d567e91ea0 you're pointing
>> did not change the inittab, so I don't know how reverting could modify
>> the inittab. Are you referring to the udev startup script ?
> I reverted S10udev of course.
> How can I debug this?

I debugged it by writing "set -x" and see what is executed over RS323 and
also looking at the output of "mount".

Eventually, it seems that the delay was caused by the RAMFS not booing
mounted on /dev/ which means that udev was writing real files (about 200)
over my NFS share to my real limux machine. That *is* kinda slow....

Adding the following lines fixed it (note that this mount point is not
available is fstab!):

      grep -q "^udev $udev_root" /proc/mounts || mount -t ramfs udev
$udev_root || exit 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110519/e99644c3/attachment.html>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-19 11:34     ` Diego Iastrubni
@ 2011-05-19 11:47       ` Peter Korsgaard
  2011-05-19 11:52         ` Diego Iastrubni
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2011-05-19 11:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Diego" == Diego Iastrubni <diegoiast@gmail.com> writes:

Hi,

 Diego> Eventually, it seems that the delay was caused by the RAMFS not booing mounted
 Diego> on /dev/ which means that udev was writing real files (about 200) over my NFS
 Diego> share to my real limux machine. That *is* kinda slow....

Do you have devtmpfs + mount enabled in your kernel? (DEVTMPFS +
DEVTMPFS_MOUNT). If you do so, /dev is already a tmpfs.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-19 11:47       ` Peter Korsgaard
@ 2011-05-19 11:52         ` Diego Iastrubni
  2011-05-19 11:59           ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-19 11:52 UTC (permalink / raw)
  To: buildroot

On Thu, May 19, 2011 at 2:47 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
> Do you have devtmpfs + mount enabled in your kernel? (DEVTMPFS +
> DEVTMPFS_MOUNT). If you do so, /dev is already a tmpfs.

It seems not. The sad thing is that I cannot even recompile the
kernel, since the n00bs who engineered this crap did not think about
updating the kernel from remote... and we have a few of them in the
wild.
# zcat /proc/config.gz | grep DEVTM
# CONFIG_DEVTMPFS is not set
# uname -a
Linux buildroot 2.6.32 #1 Sun Jul 18 10:54:29 UTC 2010 armv7l GNU/Linux

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-19 11:52         ` Diego Iastrubni
@ 2011-05-19 11:59           ` Peter Korsgaard
  2011-05-19 12:04             ` Diego Iastrubni
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2011-05-19 11:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Diego" == Diego Iastrubni <diegoiast@gmail.com> writes:

Hi,

 >> Do you have devtmpfs + mount enabled in your kernel? (DEVTMPFS +
 >> DEVTMPFS_MOUNT). If you do so, /dev is already a tmpfs.

 Diego> It seems not. The sad thing is that I cannot even recompile the
 Diego> kernel, since the n00bs who engineered this crap did not think about
 Diego> updating the kernel from remote... and we have a few of them in the
 Diego> wild.

Argh - Then your best bet is probably to add a local hack to mount a
tmpfs on /dev before starting udev.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-19 11:59           ` Peter Korsgaard
@ 2011-05-19 12:04             ` Diego Iastrubni
  2011-05-26 10:17               ` Diego Iastrubni
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-19 12:04 UTC (permalink / raw)
  To: buildroot

On Thu, May 19, 2011 at 2:59 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
> ?>> Do you have devtmpfs + mount enabled in your kernel? (DEVTMPFS +
> ?>> DEVTMPFS_MOUNT). If you do so, /dev is already a tmpfs.
>
> ?Diego> It seems not. The sad thing is that I cannot even recompile the
>
> Argh - Then your best bet is probably to add a local hack to mount a
> tmpfs on /dev before starting udev.

And I propose adding a back that check in the udev script, as it wan
before. This should not hurt existing users.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-19 12:04             ` Diego Iastrubni
@ 2011-05-26 10:17               ` Diego Iastrubni
  2011-05-26 14:02                 ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-26 10:17 UTC (permalink / raw)
  To: buildroot

Arggg... now SSH does not work, since the server cannot allocate a PTY....
Again - the fix is to re-add this line to the S10udev script:

mount -t devpts /dev/pts /dev/pts || (echo "FAIL" && exit 1)

On Thu, May 19, 2011 at 3:04 PM, Diego Iastrubni <diegoiast@gmail.com> wrote:
>
> On Thu, May 19, 2011 at 2:59 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
> > ?>> Do you have devtmpfs + mount enabled in your kernel? (DEVTMPFS +
> > ?>> DEVTMPFS_MOUNT). If you do so, /dev is already a tmpfs.
> >
> > ?Diego> It seems not. The sad thing is that I cannot even recompile the
> >
> > Argh - Then your best bet is probably to add a local hack to mount a
> > tmpfs on /dev before starting udev.
>
> And I propose adding a back that check in the udev script, as it wan
> before. This should not hurt existing users.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-26 10:17               ` Diego Iastrubni
@ 2011-05-26 14:02                 ` Peter Korsgaard
  2011-05-26 14:08                   ` Diego Iastrubni
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2011-05-26 14:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Diego" == Diego Iastrubni <diegoiast@gmail.com> writes:

 Diego> Arggg... now SSH does not work, since the server cannot allocate
 Diego> a PTY....  Again - the fix is to re-add this line to the S10udev
 Diego> script:

 Diego> mount -t devpts /dev/pts /dev/pts || (echo "FAIL" && exit 1)

This happens automatically by the mount -a in your inittab as
/dev/pts is listed in the default /etc/fstab.

Notice you also need the mkdir -p /dev/pts to ensure the mount point is
available. Again, this is all handled in the default /etc/inittab.

Naturally none of this works because of your local hack to mount a tmpfs
in S10udev, so you'll need extra hackery to workaround your workaround.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab)
  2011-05-26 14:02                 ` Peter Korsgaard
@ 2011-05-26 14:08                   ` Diego Iastrubni
  0 siblings, 0 replies; 11+ messages in thread
From: Diego Iastrubni @ 2011-05-26 14:08 UTC (permalink / raw)
  To: buildroot

On Thu, May 26, 2011 at 5:02 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Diego" == Diego Iastrubni <diegoiast@gmail.com> writes:
>
> ?Diego> Arggg... now SSH does not work, since the server cannot allocate
> ?Diego> a PTY.... ?Again - the fix is to re-add this line to the S10udev
> ?Diego> script:
>
> ?Diego> mount -t devpts /dev/pts /dev/pts || (echo "FAIL" && exit 1)
>
> This happens automatically by the mount -a in your inittab as
> /dev/pts is listed in the default /etc/fstab.
>
> Notice you also need the mkdir -p /dev/pts to ensure the mount point is
> available. Again, this is all handled in the default /etc/inittab.
>
> Naturally none of this works because of your local hack to mount a tmpfs
> in S10udev, so you'll need extra hackery to workaround your workaround.

Of course. Just documenting this is google for the next poor fool who
has this problem.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-26 14:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17 13:19 [Buildroot] Slow boots caused by ca520507fc15a8213334a76339a3e6d567e91ea0 (udev, inittab) Diego Iastrubni
2011-05-17 13:28 ` Thomas Petazzoni
2011-05-17 13:45   ` Diego Iastrubni
2011-05-19 11:34     ` Diego Iastrubni
2011-05-19 11:47       ` Peter Korsgaard
2011-05-19 11:52         ` Diego Iastrubni
2011-05-19 11:59           ` Peter Korsgaard
2011-05-19 12:04             ` Diego Iastrubni
2011-05-26 10:17               ` Diego Iastrubni
2011-05-26 14:02                 ` Peter Korsgaard
2011-05-26 14:08                   ` Diego Iastrubni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.