From owner-freebsd-arm@freebsd.org Sun Feb 7 14:33:24 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B52152E295 for ; Sun, 7 Feb 2021 14:33:24 +0000 (UTC) (envelope-from mgrooms@shrew.net) Received: from mx1.shrew.net (mx1.shrew.net [38.97.5.131]) (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 4DYWq72VRcz4hST for ; Sun, 7 Feb 2021 14:33:23 +0000 (UTC) (envelope-from mgrooms@shrew.net) Received: from mail.shrew.net (mail.shrew.prv [10.24.10.20]) by mx1.shrew.net (8.15.2/8.15.2) with ESMTP id 117EXLH4060402; Sun, 7 Feb 2021 08:33:21 -0600 (CST) (envelope-from mgrooms@shrew.net) Received: from [10.22.200.30] (unknown [136.49.68.36]) by mail.shrew.net (Postfix) with ESMTPSA id 00410199F85; Sun, 7 Feb 2021 08:33:15 -0600 (CST) Subject: Re: rpi4 network boot To: =?UTF-8?Q?Klaus_K=c3=bcchemann?= , freebsd-arm@freebsd.org References: <3a1acba5-8662-55cb-c5c4-98ec7873f78f@shrew.net> <082BC0B9-2538-43D5-9D5E-C18B4DEE9ECB@googlemail.com> <2D8B4921-CCEB-4203-B616-C0C86612C1E5@googlemail.com> From: Matthew Grooms Message-ID: <24127be9-ff90-ad97-ada5-2c2175f34fd4@shrew.net> Date: Sun, 7 Feb 2021 08:33:15 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <2D8B4921-CCEB-4203-B616-C0C86612C1E5@googlemail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.shrew.net [10.24.10.10]); Sun, 07 Feb 2021 08:33:21 -0600 (CST) X-Rspamd-Queue-Id: 4DYWq72VRcz4hST X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mgrooms@shrew.net designates 38.97.5.131 as permitted sender) smtp.mailfrom=mgrooms@shrew.net X-Spamd-Result: default: False [-3.29 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[shrew.net]; RBL_DBL_DONT_QUERY_IPS(0.00)[38.97.5.131:from]; SPAMHAUS_ZRD(0.00)[38.97.5.131:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.986]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[googlemail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:174, ipnet:38.0.0.0/8, country:US]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm]; RECEIVED_SPAMHAUS_PBL(0.00)[136.49.68.36:received] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2021 14:33:24 -0000 On 2/6/2021 11:01 PM, Klaus Küchemann wrote: >> Am 07.02.2021 um 05:00 schrieb Matthew Grooms : >> >>>> Am 07.02.2021 um 02:41 schrieb Matthew Grooms : >>>> >>>> >>>> /etc/exports: >>>> /var/rpi4/netboot -ro -alldirs -maproot=root >>> why '-ro‘ ?? >> It's intended to be read only. That's also what the freebsd diskless boot handbook article suggests to do ... >> >> https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-diskless > I like writing to the system I’ve booted on net0 and have no problem with that :-) Cool. I'm trying to boot a bunch of these devices from the same export, so mounting them all rw to the same mount is not desirable. >>> Am 05.01.2021 um 01:18 schrieb Matthew Grooms : >>> What’s your output of : >>> >>> root@matthew:~# sockstat -l4 >>> >>> and >>> >>> root@matthew:~# cat /etc/fstab >> I don't follow. For the boot server or the RPI4 host? I don't see how the fstab of the boot server could be relevant. The RPI4 host doesn't have a local filesystem. It's trying to boot from the nfs export … >> > yes, for the boot server, > ….look the link you’ve posted above : > > https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-diskless > > please read point/ 10. / Under "32.8.1. Setting Up the PXE Environment“. !!! > > that’s why I asked for ’sockstat -l4` ( or `-l6` if you use ipv6) > > there’s also a note in the link that `-ro` is only an option to save machines from humans, if you trust yourself, you can remove the `-ro` ;-) > As I mentioned before, I don't see why the contents of the fstab of the boot server is relevant. If your asking for the netstat as evidence of the nfs mount working correctly,I verified that it was by booting the RPI4 from an sd imagine and mounted the nfs export manually to verify. It's definitely working as intended. >> Am 07.02.2021 um 05:00 schrieb Matthew Grooms : >> >>> and why did you split the folders under ../netboot/..? >> To serve the raspberry pi 4 what it wants during boot. A more complete layout under my netboot directory looks like this ... >> >> /var/rpi4/netboot/firmware >> /var/rpi4/netboot/01-dc-a6-32-a8-54-13 -> /var/rpi4/netboot/firmware >> /var/rpi4/netboot/freebsd >> /var/rpi4/netboot/freebsd/boot/msdos -> /var/rpi4/netboot/firmware > well, it would be simpler to > mount a bootable(downloaded) rpi.img with mdconfig to your nfs-export-destination-directory > > or > > > what I do and what is far more useful : > we can `make buildworld buildkernel` directly > into the nfs-mount-directory on the boot-server. Yup. I'm cross compiling world/kernel on the boot server and performing an install into the RPI4 boot directory. > - > my netboot was based on u-boot-tftp from the sd-card which > worked very well, and yes: with the right setup ‚loader.efi‘ is detected automatically > without copying it to the msdos-partition IIRC. > > I didn’t try the eeprom-pxe yet but I assume(from what I’ve read so far) your problem > is currently the missing `fstab-mount` . I wish the boot would get that far. As shown at the bottom of my log output, it hangs with the genet0 output at the end of the boot that repeats endlessly in a tight loop ... genet0: gen_intr2 ... If it was a problem with an fstab entry, I'm pretty sure I would have been able to identify and solve that by now. If you ( or anyone else ) get around to trying a PXE boot and devise a working setup, I'd love to hear how you did it. Thanks, -Matthew