Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Nov 2023 11:06:22 +0100
From:      Guido Falsi <mad@madpilot.net>
To:        Brian Scott <bscott@bunyatech.com.au>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: NanoBSD on Raspberry Pi3
Message-ID:  <9036ce5f-f3b8-4c83-a569-aa4d86436e6b@madpilot.net>
In-Reply-To: <efdaec6b-8a66-4da1-bd5d-123ee31a2a0f@bunyatech.com.au>
References:  <c6edd271-7cca-4f08-94df-78ddbca2c498@madpilot.net> <07f36861-caf4-458a-8ddc-6c73a4a09755@bunyatech.com.au> <89e45166-8d87-4050-b9f7-00469187005c@madpilot.net> <efdaec6b-8a66-4da1-bd5d-123ee31a2a0f@bunyatech.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/11/23 12:05, Brian Scott wrote:
> 
> On 5/11/2023 8:13 pm, Guido Falsi wrote:
>> On 05/11/23 04:04, Brian Scott wrote:
>>>
>>> One of the keys to doing the dual system in my case has been to 
>>> create a loader.env file telling the loader which partition to boot.
>>>
>>> # more EFI/freebsd/loader.env
>>> rootdev=disk0s3a
>>>
>>
>> Thanks a lot! This made it boot successfully!
>>
>> Obviously the boot spilled a bunch of errors, most just because I'm 
>> testing not connected to the network and the configuration expects 
>> networking to be available, but this is just a test.
>>
>> Really thanks a lot, this piece of information never turned out in any 
>> searches I did and I did not notice it in any man page/README etc.
>>
>> In fact I think this should be documented, if it is not already. Do 
>> you know if it is already in some manual page or readme or at least 
>> the wiki? If not I think it should be described in loader.efi(8), I'd 
>> like to propose a patch to this effect. Maybe also add a note in our 
>> wiki in the arm and/or uefi pages.
>>
>> Have you got some pointer to some documentation elsewhere about this 
>> so I can write an informed paragraph for the man page about this?
> I found it a couple of years ago after a lot of searching. No idea where 
> I found it even though I normally try to keep notes. It would be nice to 
> see some doco on it.

I created a code review to update loader.env(8) man page. I really did 
the bare minimum there, but it would be better than nothing anyway:

https://reviews.freebsd.org/D42476

>>
>>>>
>>>> I have reworked my scripts to replicate how the official release 
>>>> images are made in structure. (copying a lot from src/release)
>>>>
>>>> I got t the point where loader_lua.efi (renamed as the standard 
>>>> `/EFI/BOOT/bootaa64.efi` in the fat partition) loads, looks like it 
>>>> is scanning disks but then says:
>>>>
>>>> ERROR: cannot open /boot/lua/loader.lua: no such file or directory.
>>> The loader.env should be read by the bootaa64.efi program.
>>
>> Yes this was the key to making it work. Maybe if I used a gpt 
>> partition scheme it would have worked OOB, while mbr requires this 
>> kind of help. Not sure if it is worth using gpt or could cause even 
>> more issues though.
> As I understand it, the RPi firmware requires MBR partitioning. Haven't 
> confirmed it recently but it does limit what you can do with nanobsd.

I see. Well I have no special preference for EFI over MBR as long it 
gets the system booting properly, so I'll stay with MBR.

-- 
Guido Falsi <mad@madpilot.net>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9036ce5f-f3b8-4c83-a569-aa4d86436e6b>