Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Mar 2010 00:45:36 -0800
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        Giovanni Trematerra <giovanni.trematerra@gmail.com>
Cc:        freebsd-current@freebsd.org, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: [FAQ] FBSD on a USB stick
Message-ID:  <7d6fde3d1003060045p330292d2w2b66bbb815067cc7@mail.gmail.com>
In-Reply-To: <4e6cba831003050516r3cf2ee88p65486248e861dbed@mail.gmail.com>
References:  <201003011731.20790.hselasky@c2i.net> <4e6cba831003050516r3cf2ee88p65486248e861dbed@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 5, 2010 at 5:16 AM, Giovanni Trematerra
<giovanni.trematerra@gmail.com> wrote:
> Instead of this patch people can use kern.cam.boot_delay
> Just set a delay in ms.
> That works on 8-STABLE too.
>
> On Mon, Mar 1, 2010 at 5:31 PM, Hans Petter Selasky <hselasky@c2i.net> wr=
ote:
>> 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
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- sys/kern/vfs_mount.c =A0 =A0 =A0 =A0(revision 204512)
>> +++ sys/kern/vfs_mount.c =A0 =A0 =A0 =A0(local)
>> @@ -1656,6 +1656,8 @@
>> =A0 =A0 =A0 =A0 =A0 =A0UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
>> =A0 =A0 =A0 =A0devfs_first();
>>
>> +repeat:
>> +
>> =A0 =A0 =A0 =A0/*
>> =A0 =A0 =A0 =A0 * We are booted with instructions to prompt for the root=
 filesystem.
>> =A0 =A0 =A0 =A0 */
>> @@ -1725,9 +1727,10 @@
>> =A0 =A0 =A0 =A0 * Everything so far has failed, prompt on the console if=
 we haven't
>> =A0 =A0 =A0 =A0 * already tried that.
>> =A0 =A0 =A0 =A0 */
>> - =A0 =A0 =A0 if (!asked)
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!vfs_mountroot_ask())
>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto mounted;
>> + =A0 =A0 =A0 if (!asked) {
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pause("WDISK", 1*hz);
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto repeat;
>> + =A0 =A0 =A0 }
>>
>> =A0 =A0 =A0 =A0panic("Root mount failed, startup aborted.");

    I agree with Giovanni as it's easier to customize than the
proposed patch above; it'll be nice when the work has been done where
hacks like these won't be required (waits in anticipation for scottl's
cam work).
Thanks!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d6fde3d1003060045p330292d2w2b66bbb815067cc7>