Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754929AbZDZXMo (ORCPT ); Sun, 26 Apr 2009 19:12:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752414AbZDZXMi (ORCPT ); Sun, 26 Apr 2009 19:12:38 -0400 Received: from mail2.shareable.org ([80.68.89.115]:43981 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbZDZXMh (ORCPT ); Sun, 26 Apr 2009 19:12:37 -0400 Date: Mon, 27 Apr 2009 00:12:09 +0100 From: Jamie Lokier To: Kay Sievers Cc: Alan Stern , David VomLehn , Alan Cox , Ingo Molnar , Arjan van de Ven , "H. Peter Anvin" , Thomas Gleixner , Linus Torvalds , Linux Kernel Mailing List , Linux USB Mailing List , Linux Embedded Mailing List , Andrew Morton Subject: Re: Wait for console to become available, v3.2 Message-ID: <20090426231208.GA17240@shareable.org> References: <20090426195249.GC10627@shareable.org> <20090426213746.GH10627@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2003 Lines: 48 Kay Sievers wrote: > > _If_ the system doesn't wait for all block devices present at boot to > > be enumerated before the boot script, then when the script looks in > > that directory for a specific UUID, it would be good to wait until > > "has everything present at boot been enumerated?" says yes. > > That's what distros do with initramfs today. I don't see how that's possible. Haven't we been discussing how the USB driver does not have any support (yet) for saying when it's found every device present at boot time, and that it can probably be added? I have a boot script which does this: 1. *If* USB disk plugged in, mount it on /mnt/usb, do some stuff. 2. If not, do something else. If I'm not mistaken, the only way to do that right now is pick an arbitrary time, wait, and proceed with 2 if you didn't see the disk. The desired USB console behaviour is very similar. Use it if it's plugged in at boot, use something else otherwise, and no arbitrary delays. Did I miss something? > > Since this is all about making boot faster, it would be quite nice not > > to wait for all block devices before starting the boot script, or at > > least the initramfs module-loading script :-) > > You wait in initramfs until the device show up. Usually dynamic udev > rules created from the root= string of the kernel commandline create a > rule which matches on the UUID, and creates a /dev/root symlink when > the device shows up. As soon as this link shows up, init mounts it > and goes ahead. That's fine when you're waiting for a device to appear that you know will appear. The USB console excitement, and my mention of USB disks and such, is how to decide when the device _isn't_ going to appear, without an arbitrary timeout. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/