From owner-freebsd-arm@freebsd.org Mon Apr 20 22:07:59 2020 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 CD8552B17A3 for ; Mon, 20 Apr 2020 22:07:59 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 495gmt1hWWz4CgC for ; Mon, 20 Apr 2020 22:07:57 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 03KM7vcP094986 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 20 Apr 2020 15:07:57 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 03KM7uE0094985; Mon, 20 Apr 2020 15:07:57 -0700 (PDT) (envelope-from fbsd) Date: Mon, 20 Apr 2020 15:07:56 -0700 From: bob prohaska To: Jonathan Chen Cc: freebsd-arm@freebsd.org, bob prohaska Subject: Re: Booting from USB on RPi3 Message-ID: <20200420220756.GC94315@www.zefox.net> References: <20200420172512.GA94315@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 495gmt1hWWz4CgC X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [2.29 / 15.00]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; IP_SCORE(0.05)[ip: (0.23), ipnet: 50.1.16.0/20(0.12), asn: 7065(-0.03), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.08)[0.080,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.26)[0.260,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MID_RHS_WWW(0.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 22:07:59 -0000 On Tue, Apr 21, 2020 at 07:31:40AM +1200, Jonathan Chen wrote: > > This is how I got my RPI3 running 12-STABLE to boot off USB. It does > require a microSD card with u-boot, and the loader.efi built sometime > after Sep 2019 though. However, my root-filesystem (and swap) lives on > an external USB drive. > > 1. Copy the loader.efi to EFI/BOOT/bootaa64.efi > > 2. Create a text file: EFI/FreeBSD/loader.env, this file contains a > one-line directive to loader(8) on where to find a kernel to boot. > Mine contains: > rootdev=disk1p1: > The disk entry should be the same as what loader(8) expects with your > USB disk setup. Mine has a GPT partitioning scheme, with the root-fs > on partition-1. > > 3. All /etc/fstab entries should use symbolic name entries instead of da0*. eg: > 7:27am# cat /etc/fstab > # Device Mountpoint FStype Options Dump Pass# > /dev/gpt/topaz-root / ufs rw 1 1 > /dev/gpt/topaz-swap none swap sw 0 0 > > Hope this helps. > -- Where is the kernel loading from? I gather it's been long-time practice to load the kernel from microSD and then mount the USB device as root; it that what you're doing? It appears that using usbboot (correctly!) would eliminate that extra step. Thanks for writing! bob prohaska