Where is loader.conf.gz?
hiren panchasara
hiren at freebsd.org
Thu Aug 7 21:46:32 UTC 2014
On Thu, Aug 7, 2014 at 11:24 AM, Xin Li <delphij at 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
More information about the freebsd-hackers
mailing list