Date: Sat, 19 Mar 2016 22:56:24 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Ian Lepore <ian@freebsd.org>, current@freebsd.org Subject: Re: USB disks attach after rootfs prompt Message-ID: <20160319215624.GA1325@brick.home> In-Reply-To: <1998.1458400175@critter.freebsd.dk> References: <1346.1458392679@critter.freebsd.dk> <1458397972.68920.69.camel@freebsd.org> <1998.1458400175@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 0319T1509, Poul-Henning Kamp wrote: > -------- > In message <1458397972.68920.69.camel@freebsd.org>, Ian Lepore writes: > >On Sat, 2016-03-19 at 13:04 +0000, Poul-Henning Kamp wrote: > >> Running: > >> > >> FreeBSD 11.0-CURRENT #32 r296137: Sat Feb 27 11:34:01 UTC 2016 > >> > >> I tried "boot -a" and found that USB disks only attach *after* you > >> enter some root filesystem. > >> > >> That's not terribly useful. > > > >iirc, interrupts are disabled while you're at the mountroot prompt, > >which freezes usb enumeration. > > I am somewhat certain that this used to work... That might be my fault. I've modified the root mount mechanism to only wait for the root mount tokens (ie USB) if the root device isn't already there; basically this makes the kernel not wait for USB if rootfs is on SATA. Does the following fix things for you? (Note there's something seriously wrong with character echo, but it doesn't seem related.) Index: svn/head/sys/kern/vfs_mountroot.c =================================================================== --- svn/head/sys/kern/vfs_mountroot.c (revision 297053) +++ svn/head/sys/kern/vfs_mountroot.c (working copy) @@ -89,6 +89,7 @@ __FBSDID("$FreeBSD$"); static int parse_mount(char **); static struct mntarg *parse_mountroot_options(struct mntarg *, const char *); static int sysctl_vfs_root_mount_hold(SYSCTL_HANDLER_ARGS); +static void vfs_mountroot_wait(void); static int vfs_mountroot_wait_if_neccessary(const char *fs, const char *dev); /* @@ -488,6 +489,8 @@ parse_dir_ask(char **conf) char *mnt; int error; + vfs_mountroot_wait(); + printf("\nLoader variables:\n"); parse_dir_ask_printenv("vfs.root.mountfrom"); parse_dir_ask_printenv("vfs.root.mountfrom.options");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160319215624.GA1325>