Date: Thu, 7 Aug 2014 14:46:29 -0700 From: hiren panchasara <hiren@freebsd.org> To: Xin LI <d@delphij.net> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: Where is loader.conf.gz? Message-ID: <CALCpEUGBMD=qmOF65dv6m%2BGRTenjZZ8BTDF68KQZ2OPs3AnaOA@mail.gmail.com> In-Reply-To: <53E3C44C.9000500@delphij.net> References: <CALCpEUGuC06iKcOHRkLmJr13ycpP%2Bnmm3fL2QT-iszJP3UiVjA@mail.gmail.com> <53E3C44C.9000500@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 7, 2014 at 11:24 AM, Xin Li <delphij@delphij.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 08/07/14 11:11, hiren panchasara wrote: >> I am trying to netboot minnowboard max with loader.efi and then >> nfsmount the root fs from my FreeBSD-Current zfs laptop. >> >> It gets stuck right at "Loading /boot/defaults/loader.conf" >> >> Looking at tcpdump (on interface serving nfsd on laptop), it tries >> to find loader.conf.gz and fails. >> >> I've failed to find loader.conf.gz anywhere on box or in the source >> code. Where does it come from and who is looking for it? > > lib/libstand/gzipfs.c I think? (zf_open) > > It's weird that it didn't handle the ENOENT error, though... > Xin, You are right. lib/libstand/open.c: open() looks like this: /* pass file name to the different filesystem open routines */ besterror = ENOENT; for (i = 0; file_system[i] != NULL; i++) { fs = file_system[i]; error = (fs->fo_open)(file, f); <-----zf_open() is called which returns ENOENT if (error == 0) goto ok; if (error != EINVAL) besterror = error; } error = besterror; So, the error is ENOENT at this point. But it fails in what happens after this: fail: if ((f->f_flags & F_NODEV) == 0 && f->f_dev != NULL) f->f_dev->dv_close(f); if (error) devclose(f); Here, it gets into both if() conditions and stalls/hangs in the call to devclose(): int devclose(struct open_file *f) { if (f->f_devdata != NULL) { free(f->f_devdata); <-- hangs right here and never returns. } return (0); } It probably panics and doesn't tell me. I have to hard reset the board. Is it because we are trying to close something we couldn't open? cheers, Hiren
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUGBMD=qmOF65dv6m%2BGRTenjZZ8BTDF68KQZ2OPs3AnaOA>