From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: Wait for console to become available, v3.2 Date: Mon, 27 Apr 2009 00:12:09 +0100 Message-ID: <20090426231208.GA17240@shareable.org> References: <20090426195249.GC10627@shareable.org> <20090426213746.GH10627@shareable.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-embedded-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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