From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 9 00:56:11 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53C6CB8 for ; Sat, 9 Aug 2014 00:56:11 +0000 (UTC) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D070B24FC for ; Sat, 9 Aug 2014 00:56:10 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id z11so4445069lbi.3 for ; Fri, 08 Aug 2014 17:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ry6bnQl5BPkYZ8Wk/j8+rHfSUhcArIO7KJpoWCvEm2c=; b=GVSA82BxTYmIOmcQareUZc+KDSWavY15ff305H0+tvarcSyemawrbWb6AgA7aicWO1 DejIu5OyNlVSPzgxtwiq+GogX41bpSz9ojEe5w1V5zUcwXOGjbKjQ7JAmUwEElR1EULX pnOEO+RKJqMFk1x+/zDfpJEKGKy+0gJuCOwaEyg/dOZv4zJgamzKR4vLIDTEnmopuE5N O6cqBVh//7HDD+yTiNmohe54dIIbz5g2Yc8nwhwc6M9AYBhGuBNIWOikXV1K9/iGGGxP YQs87bXlyNqMeRIQVSuyuxI+fbpcY2nNj83oCs1s7GsfOQKN42NlzSXPy8F+CXnacu8/ mIrA== MIME-Version: 1.0 X-Received: by 10.152.25.170 with SMTP id d10mr24258679lag.37.1407545768017; Fri, 08 Aug 2014 17:56:08 -0700 (PDT) Sender: hiren.panchasara@gmail.com Received: by 10.114.81.73 with HTTP; Fri, 8 Aug 2014 17:56:07 -0700 (PDT) In-Reply-To: <53E4ACF4.4030001@yandex.ru> References: <53E3C44C.9000500@delphij.net> <53E4A6E7.3080309@yandex.ru> <53E4ACF4.4030001@yandex.ru> Date: Fri, 8 Aug 2014 17:56:07 -0700 X-Google-Sender-Auth: jd3xv01FNn2ZzAHLg_TLIW2WUtY Message-ID: Subject: Re: Where is loader.conf.gz? From: hiren panchasara To: "Andrey V. Elsukov" Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , Xin LI X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2014 00:56:11 -0000 On Fri, Aug 8, 2014 at 3:56 AM, Andrey V. Elsukov wrote: > On 08.08.2014 14:31, Andrey V. Elsukov wrote: >> On 08.08.2014 01:46, hiren panchasara wrote: >>> /* 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: >> >> It looks like loader.efi should first open /boot/loader.conf via >> devopen() a bit earlier in this code. Did you see this attempt in the >> tcpdump? Can you stop loader and see what value has currdev environment >> variable? > > Sorry, devopen() doesn't open a file, but nfs_fsops should be tried > first. Maybe this code has been failed in nfs_open? > > #ifndef __i386__ > if (strcmp(f->f_dev->dv_name, "net") != 0) > return(EINVAL); > #else I never reach this path actually. I am not sure if I need to provide any special LOADER_*_SUPPORT while building the loader.efi. I need to look closer. Btw, on loader prompt: currdev and loaddev is net0. (and not "net") Complete set: Type '?' for a list of commands, 'help' for more detailed help. OK show LINES=24 beastie_disable=YES boot.netif.gateway=192.168.2.1 boot.netif.hwaddr=00:13:20:fe:30:af boot.netif.ip=192.168.2.30 boot.netif.netmask=255.255.255.0 boot.nfsroot.nfshandle=X09e70638de2da5770a000400000000003cb674000000000000000000X boot.nfsroot.nfshandlelen=28 boot.nfsroot.path=/nfsroot boot.nfsroot.server=192.168.2.216 bootfile=kernel console=efi currdev=net0: dhcp.dhcp-lease-time=300 dhcp.dhcp-message-type=5 dhcp.dhcp-server-identifier=192.168.2.1 dhcp.root-path=/nfsroot dhcp.routers=192.168.2.1 dhcp.subnet-mask=255.255.255.0 dhcp.tags=53,54,51,1,3,17 hint.acpi_throttle.0.disabled=1 hint.atkbd.0.at=atkbdc hint.atkbd.0.irq=1 hint.atkbdc.0.at=isa hint.atkbdc.0.port=0x060 hint.atrtc.0.at=isa hint.atrtc.0.irq=8 hint.atrtc.0.port=0x70 hint.attimer.0.at=isa hint.attimer.0.irq=0 hint.attimer.0.port=0x40 hint.fd.0.at=fdc0 hint.fd.0.drive=0 hint.fd.1.at=fdc0 hint.fd.1.drive=1 hint.fdc.0.at=isa hint.fdc.0.drq=2 hint.fdc.0.irq=6 hint.fdc.0.port=0x3F0 hint.p4tcc.0.disabled=1 hint.ppc.0.at=isa hint.ppc.0.irq=7 hint.psm.0.at=atkbdc hint.psm.0.irq=12 hint.sc.0.at=isa hint.sc.0.flags=0x100 hint.uart.0.at=isa hint.uart.0.flags=0x10 hint.uart.0.irq=4 hint.uart.0.port=0x3F8 hint.uart.1.at=isa hint.uart.1.irq=3 hint.uart.1.port=0x2F8 hint.wbwd.0.at=isa interpret=OK kernel=kernel kernel_options= kernelname=/boot/kernel/kernel loaddev=net0: loader_conf_files=/boot/device.hints /boot/loader.conf /boot/loader.conf.local module_path=/boot/kernel prompt=${interpret} cheers, Hiren