Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 2020 15:24:57 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Booting from USB on RPI3
Message-ID:  <328B7083-1119-43F1-A6E4-61F1FB9E922E@yahoo.com>
In-Reply-To: <20200423212614.GA3996@www.zefox.net>
References:  <mailman.61.1587470402.80084.freebsd-arm@freebsd.org> <trinity-4938b1d4-f29f-4907-bedd-65be21112e48-1587489497227@3c-app-webde-bs65> <20200421181224.GC96994@www.zefox.net> <trinity-19081201-3024-4046-817a-48321c51a515-1587587309088@3c-app-webde-bap64> <20200423162124.GA3583@www.zefox.net> <CAJuc1zMHL6ke3LH67iV8%2BogKFO18xwW_v7bRAUsj8CbxD2EOTw@mail.gmail.com> <8D1F6A8D-4910-4C1E-8EB5-2F5F89E31120@yahoo.com> <CAJuc1zOTnoRmeaKXHMTH9po=6ipBYDxvxAoiVmow-sNgwUERVQ@mail.gmail.com> <20200423212614.GA3996@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2020-Apr-23, at 14:26, bob prohaska <fbsd@www.zefox.net> wrote:

> On Fri, Apr 24, 2020 at 08:32:54AM +1200, Jonathan Chen wrote:
>> On Fri, 24 Apr 2020 at 08:22, Mark Millard <marklmi@yahoo.com> 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.
>> 
>> 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.
> 
> The USB drive on my system was written with dd using
> FreeBSD-13.0-CURRENT-arm64-aarch64-RPI3-20200409-r359731.img
> It's been resized to fill the hard disk and given a swap partition.
> Gpart reports
> bob@www:~ % gpart show da0
> =>      63  78140097  da0  MBR  (37G)
>        63      2016       - free -  (1.0M)
>      2079    102312    1  fat32lba  [active]  (50M)
>    104391  78035769    2  freebsd  (37G)
> 
> gpart show da0s2
> =>       0  78035769  da0s2  BSD  (37G)
>         0        57         - free -  (29K)
>        57  71303168      1  freebsd-ufs  (34G)
>  71303225   6732544      2  freebsd-swap  (3.2G)
> 
> To my surprise, 
> gpart show da0s1 reports
> gpart: No such geom: da0s1.
> even though there is a /dev/da0s1. I thought it would at least report
> the size.

da0s1 is analogous ot da0s2a, not da0s2:

# gpart show da0s2a
gpart: No such geom: da0s2a.

It is the "BSD" that makes da0s2 special, much
like "MBR" being special for da0. Both MBR and BSD
contain other slices. fat32lba and freebsd-ufs and
freebsd-swap do not. That makes the "geom" distinction
involved.

> No attempt has been made to alter the msdos partition,
> That does mean the u-boot on the USB drive isn't quite
> the same as the u-boot on the microSD, which uses 
> https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin
> and modified to turn on its serial console. Could that matter? Since
> it appears the USB installation is getting all the way to the loader
> prompt on USB I'm tempted to think the trouble's on the FreeBSD side
> of the USB setup. 
> 

Note: bootcode.bin may have fixes of RPi* problems
for the boot code that is burned into the part
involved.

For USB-only or for microsd card also in use,
have you tried the equivalent of:

OK lsdev

and then used the naming convention shown in
the output for any loader commands/settings
instead of using FreeBSD-stage da0 based naming?
(You might want to report what lsdev shows.)

Note: the disk0 and disk1 like prefixes are
copied from the u-boot notations that the
loader gets from u-boot, if I understand
right.

Does your loader.conf do anything to control
what is booted? As Joanathan asked: what does
your /etc/fstab have listed? (/etc/fstab should
have FreeBSD notations, not loader device names.)
Are there any other boot-contributing files that
would be appropriate to show together in one
message for review, including any on the
msdos file system?

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?328B7083-1119-43F1-A6E4-61F1FB9E922E>