From owner-freebsd-current@FreeBSD.ORG Mon Mar 1 16:32:55 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA827106564A for ; Mon, 1 Mar 2010 16:32:55 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swipnet.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 58BE68FC0A for ; Mon, 1 Mar 2010 16:32:54 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=Yu6x0XFjdv1QySR081gA:9 a=At-Gli259hhV_x84FKUA:7 a=JXsP75wHYkbjw3YHFqRBJQezGdMA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 603709444 for freebsd-current@freebsd.org; Mon, 01 Mar 2010 17:32:53 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Mon, 1 Mar 2010 17:31:20 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201003011731.20790.hselasky@c2i.net> Subject: [FAQ] FBSD on a USB stick X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 16:32:55 -0000 Hi, Sometimes the USB sticks won't get detected in time. You can fix this by using the following simple quick and dirty patch. --HPS ================================================================== --- sys/kern/vfs_mount.c (revision 204512) +++ sys/kern/vfs_mount.c (local) @@ -1656,6 +1656,8 @@ UMA_ALIGN_PTR, UMA_ZONE_NOFREE); devfs_first(); +repeat: + /* * We are booted with instructions to prompt for the root filesystem. */ @@ -1725,9 +1727,10 @@ * Everything so far has failed, prompt on the console if we haven't * already tried that. */ - if (!asked) - if (!vfs_mountroot_ask()) - goto mounted; + if (!asked) { + pause("WDISK", 1*hz); + goto repeat; + } panic("Root mount failed, startup aborted.");