Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2010 14:16:55 +0100
From:      Giovanni Trematerra <giovanni.trematerra@gmail.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [FAQ] FBSD on a USB stick
Message-ID:  <4e6cba831003050516r3cf2ee88p65486248e861dbed@mail.gmail.com>
In-Reply-To: <201003011731.20790.hselasky@c2i.net>
References:  <201003011731.20790.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Instead of this patch people can use kern.cam.boot_delay
Just set a delay in ms.
That works on 8-STABLE too.

--
Gianni

On Mon, Mar 1, 2010 at 5:31 PM, Hans Petter Selasky <hselasky@c2i.net> wrote:
> 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.");
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>



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