From owner-freebsd-arm@freebsd.org Thu Apr 23 22:49:13 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 5EEE02C5D37 for ; Thu, 23 Apr 2020 22:49:13 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-20.consmr.mail.gq1.yahoo.com (sonic314-20.consmr.mail.gq1.yahoo.com [98.137.69.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497XY33DGDz4Qkn for ; Thu, 23 Apr 2020 22:49:11 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: UYugoUcVM1nPEr1anm7Y.MpT4deZCUBHua1GlFFWLJWpWr9tD_8VLJzQCnwC8e9 GHM5uyvqkG5Eok9L2uueG7mfDSR64m6QfqxHIfcWO8EYC1Nq.zAfZoAVQK9E9s_s3VZw4NoF3EJB R1_JhUmQtgUq9ru9Oudky8UvdPrJzfAIrZsAgWxPOgDYeKpOIVYJ4Qp9svp_NWwntwdHQmR3SiiM hvcV3jRCtodO9WOmeNKsAzMM0RmsArEaaW2qK4W1EMrqGpVymaza5QRIHoxIsN3v5A489OvnxYrY 7twi6cRfwlvnBPiQXIBsYpKAKk_.BP3rtqnggfV_0fmcAmxQWh3UevnolJkAF8OBIRVSJ.CA5bxI qlz.8ODFVaaV0wNhxZDf5rYCyFi0adZrfB9z3zRFXKwvq2KKl5tV04isfVNgZKkAKLzohQR3Fgjy oWncI_upYFZ48wBRwBjfdiHeE.JIjCiUTIdcrdBAKXgAKKyONNEf18NfTP5OACUrzxoEqDVCQ85h NxsaOSGRSxeSx56Tsj6wNqLZdviGjW_ZVdk1fMGK0tRvXk_MN2EAenUuEujmFeXFCrDWZ6tnD5eL h.W3IW8BatBllimafXCJNb82oMJgd0sxxR5KPbsUICBX5xaiL256EgYd9OXtU83aKHeVdcjaxhMo 8JDxHJq4N_O20.4dDi9mgVV1fH22Ap1EURkeMlPNKTrC67lTjtit.C_jAucQo746yheAJ0RJJzii gobQxPyOaXZm_gGZ4JSQlF81ocHdTFLLQUy3JoTt1qDkouxHxom6HsSt13odydP68xo.d7FpL2Gw oTkem0jfLNZHMc9qQiqPytQgYinfDX5hdyn..QB1CasE.j0yyPTtYhyse6asA2FbbwVsJ0_jt86Y 0mzdI8XDuydr5l2W_NRRj5er.hY_nP3wJRF.eTajet4IKAW1rVdpmBJn3v0QDK7AekcMsD2i8WML 7T7m16l2fGajJlfG_u5dYLGBQkgsrlp9GzU1u_t51hbsel3j3CAiHQTdtbQE5M4UZQtqV.y84ugW AZBPgT5UC3fFHEsK9fYD87hCczOiduLkZGurJa_lgtA1M8sXJ1L3kR6itcDsdb1M6.CwI0rGb7e9 fqzKcCw0j.hwTwyEZuCZjI1VLpuBYvE3dSduwlChU_0jP_1j6wjkN2AJ4z2dbWfLvDi6hwRPNELB _tSbL0TekZ0DlMZYQD83WFcXan3anNmSwmZZM.fdjgou2qEv_gwiqCthOYbLnRkqqm8fDb7.kOw7 61DXtaYwIgSNiQokPocbEVpf4mLVua9lWh0x4hQB51KR37z4T9Tj7eQhRDwy7jGcvz5is.tGXBg6 7nWWhcGZZmUKLvG2JYg11NAxwRO8ecQHDJEY6a_7jhwk6WvbNuBdc1B09BVwNyMmj7XYoSLcmexB F9J2B1OSghekcKc4TOoDnRu_Y2ZZn8B94 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Thu, 23 Apr 2020 22:49:10 +0000 Received: by smtp412.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b7ae6bff673ad7ba69a6e32fc75ceaeb; Thu, 23 Apr 2020 22:49:08 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Booting from USB on RPI3 From: Mark Millard In-Reply-To: Date: Thu, 23 Apr 2020 15:49:07 -0700 Cc: freebsd-arm , Georg Lindenberg Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200421181224.GC96994@www.zefox.net> <20200423162124.GA3583@www.zefox.net> <8D1F6A8D-4910-4C1E-8EB5-2F5F89E31120@yahoo.com> To: Jonathan Chen , bob prohaska X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 497XY33DGDz4Qkn X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.75)[-0.748,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.95)[-0.950,0]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[83.69.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (4.88), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] 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: Thu, 23 Apr 2020 22:49:13 -0000 On 2020-Apr-23, at 14:20, Mark Millard wrote: > On 2020-Apr-23, at 13:32, Jonathan Chen wrote: >=20 >> On Fri, 24 Apr 2020 at 08:22, Mark Millard wrote: >> [...] >>> The RPi3 will not start to boot from a gpt partitioned >>> media. So picking gpt labeling as the example is somewhat >>> misleading for single-media booting. glabel based >>> labeling would be more realistic for the context. >=20 > Note the "single-media booting" reference above. >=20 >> The OP is attempting to boot off an external USB drive via = loader.env. >> So it's the external drive's partitioning system that is of interest. >> FYI, my RPI3 boots off a GPT partition fine: >>=20 >> 1.topaz:~,8:30am# uname -a >> FreeBSD topaz.inside.chen.org.nz 12.1-STABLE FreeBSD 12.1-STABLE #0 >> r358927: Sun Mar 15 22:24:30 NZDT 2020 >> = jonc@onyx.inside.chen.org.nz:/xbuilds/rpi3/obj/usr/src/arm64.aarch64/sys/G= ENERIC >> arm64 >> 1.topaz:~,8:30am# gpart show -l da0 >> =3D> 40 976773088 da0 GPT (466G) >> 40 8152 - free - (4.0M) >> 8192 964689920 1 topaz-root (460G) >> 964698112 12075016 2 topaz-swap (5.8G) >>=20 >> 1.topaz:~,8:30am# 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 >>=20 >=20 > That does not appear to have the msdosfs/EFI material > on the USB drive. So I'd guess that you are using > the microsd card for that: 2 media overall, not > single-media. >=20 > I also use a form of two-media instead of single-media > and use gpt on the USB media: >=20 > # gpart show > =3D> 63 249737153 mmcsd0 MBR (119G) > 63 16380 - free - (8.0M) > 16443 131040 1 fat32lba [active] (64M) > 147483 997 - free - (499K) > 148480 241172480 2 freebsd (115G) > 241320960 8416256 - free - (4.0G) >=20 > =3D> 0 241172480 mmcsd0s2 BSD (115G) > 0 230686720 1 freebsd-ufs (110G) > 230686720 10485760 - free - (5.0G) >=20 > =3D> 40 468862048 da0 GPT (224G) > 40 2008 - free - (1.0M) > 2048 413138944 1 freebsd-ufs (197G) > 413140992 6291456 2 freebsd-swap (3.0G) > 419432448 6291456 4 freebsd-swap (3.0G) > 425723904 43138184 - free - (21G) >=20 > # df -m > Filesystem 1M-blocks Used Avail Capacity Mounted on > /dev/gpt/PINE642Groot 195378 34775 144973 19% / > devfs 0 0 0 100% /dev > /dev/label/PINE64P2Groot 109101 219 100153 0% /microsd_ufs > /dev/label/PINE642GAboot 63 43 20 69% /boot/efi >=20 > I choose to have a copy of /boot on /microsd_ufs > and to use vfs.root.mountfrom=3D"ufs:/dev/gpt/PINE642Groot" > in the loader.conf file in my context. >=20 > But such is not what Bob P. is trying to do from what > I can tell. He looks to be trying to avoid microsd > card media use if he can. He needs MBR on the USB > media for that (or some hybrid MBR that proves > compatibile). Correcting my mistaken memory of what raspberrypi.org documents . . . The BCM2837 (RPi3) and BCM2837B0 (RPi3B) have documentation at: = https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/b= ootflow.md that does report: =E2=80=A2 The boot ROM also now supports GUID partitioning and = has been tested with hard drives partitioned using Mac, Windows, and = Linux. It also notes (prior to the above): =E2=80=A2 It is no longer necessary for the first partition to = be the FAT partition, as the MSD boot will continue to search for a FAT = partition beyond the first one. (I guess MSD is short for "mass storage device".) It also documents that for USB hubs these RPi3* vintages do recurse for each port. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)