From owner-freebsd-arm@freebsd.org Thu Sep 24 14:37:14 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD948A07453 for ; Thu, 24 Sep 2015 14:37:14 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0E26109E for ; Thu, 24 Sep 2015 14:37:14 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 24 Sep 2015 14:35:56 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t8OEb61K003343; Thu, 24 Sep 2015 08:37:06 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1443105426.1224.272.camel@freebsd.org> Subject: Re: NFS Root with Raspberry Pi (nfs_diskless: no interface) From: Ian Lepore To: Daniel Braniss Cc: Randy Westlund , freebsd-arm@freebsd.org Date: Thu, 24 Sep 2015 08:37:06 -0600 In-Reply-To: References: <20150922052522.GA62140@gmail.com> <00C49FEB-E8EF-4469-85E2-0F901215CD11@cs.huji.ac.il> <20150923050414.GB43653@gmail.com> <91AAC64E-4C38-47AA-8910-48F7654A7524@cs.huji.ac.il> <20150923174445.GE43653@gmail.com> Content-Type: text/plain; charset="iso-8859-13" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 14:37:14 -0000 On Thu, 2015-09-24 at 14:28 +0300, Daniel Braniss wrote: > > On 23 Sep 2015, at 20:44, Randy Westlund wrote: > > > > On Wed, Sep 23, 2015 at 11:54:43AM +0300, Daniel Braniss wrote: > >> ok, thought it was too easy. Can you send me more info so that i can reproduce it here? > >> specially the ubldr stuff? > >> > >> ah! try if_smsc_load=YES > >> > >> danny > > > > Okay, that's definitely the correct driver. Looks like the pi uses a > > SMSC LAN9514 ethernet module. But I see the same output regardless of > > whether that's in loader.conf or not. The kernel seems to be finding > > smsc0 just fine. It just hasn't created the interface yet. > > iÿll try this here tomorrow, but in the meantime some ideas: > did you compile the kernel with option BOOTP_NFSV3? > > > > > >> ugen0.1: at usbus0 > >> uhub0: on usbus0 > >> mmcsd0: 4GB at mmc0 41.6MHz/4bit/65535-block > >> nfs_diskless: no interface > >> Root mount waiting for: usbus0 > >> uhub0: 1 port with 1 removable, self powered > >> ugen0.2: at usbus0 > >> uhub1: on usbus0 > >> uhub1: MTT enabled > >> Root mount waiting for: usbus0 > >> uhub1: 3 ports with 2 removable, self powered > >> Root mount waiting for: usbus0 > >> ugen0.3: at usbus0 > >> smsc0: on usbus0 > >> Trying to mount root from nfs:192.168.1.254:/usr/raspi_root [rw]... > >> nfs_diskless: no interface > >> Mounting from nfs:192.168.1.254:/usr/raspi_root failed with error -1. > >> > >> Loader variables: > >> vfs.root.mountfrom=nfs:192.168.1.254:/usr/raspi_root > >> vfs.root.mountfrom.options=rw > > > > > Here's the fstab that the pi is using: > > > >> cat /usr/raspi_root/etc/fstab > >> 192.168.1.254:/usr/raspi_root / nfs rw 0 0 > > > > Here's dhcp.conf on my router: > > > >> $ cat /etc/dhcpd.conf > >> authoritative; > >> option domain-name-servers 192.168.1.1; > >> > >> subnet 192.168.1.0 netmask 255.255.255.0 { > >> option routers 192.168.1.1; > >> range 192.168.1.2 192.168.1.150; > >> next-server 192.168.1.254; > >> option root-path "/usr/raspi_root"; > >> } > > > > Here's what ubldr sees before it loads the kernel over NFS: > > > >> loader> show > >> LINES=24 > >> autoboot_delay=10 > >> boot.netif.gateway=0.0.0.0 > >> boot.netif.hwaddr=b8:27:eb:28:a4:f8 > >> boot.netif.ip=192.168.1.33 > >> boot.netif.netmask=255.255.255.0 > >> boot.nfsroot.nfshandle=X298684cadeaf78ee0a000400000000006ed938000000000000000000X > >> boot.nfsroot.nfshandlelen=28 > >> boot.nfsroot.path=/usr/raspi_root > >> boot.nfsroot.server=192.168.1.254 > >> bootfile=kernel > >> console=uboot > >> currdev=net0: > >> interpret=OK > >> kernel=kernel > >> kernelname=/boot/kernel/kernel > >> loaddev=net0: > >> loader_conf_files=/boot/loader.conf /boot/loader.conf.local > >> module_path=/boot/kernel;/boot/kernel;/boot/modules;/boot/dtb > >> prompt=loader> > >> twiddle_divisor=1 > > > > The files I'm using are all taken from one of these two images (same > > result with both): > > > > FreeBSD-11.0-CURRENT-arm-armv6-RPI-B-20150826-r287169.img > > FreeBSD-10.2-STABLE-arm-armv6-RPI-B-20150917-r287929.img > > > > Let me know if you need any other info, and thanks for spending time on > > this. > > > > Randy Try setting boot.netif.name="ue0" in loader.conf. I've never tried that, but in looking at the code, there's some chance it could work. :) What I do is put these options into my RPi kernel config: options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 options BOOTP_WIRED_TO=ue0 But this requires configuring a bootp or dhcp server to provide the info. It should be possible to netboot without using BOOTP. -- Ian