| Deutsch English Français Italiano |
|
<vrerg8$16sn7$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: bp@www.zefox.net
Newsgroups: comp.sys.raspberry-pi
Subject: Re: MicroSD-based USB boot manager for Pi?
Date: Wed, 19 Mar 2025 16:31:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <vrerg8$16sn7$2@dont-email.me>
References: <vr9eg0$d2sm$1@dont-email.me> <cuh*UNR9z@news.chiark.greenend.org.uk>
Injection-Date: Wed, 19 Mar 2025 17:31:04 +0100 (CET)
Injection-Info: dont-email.me; posting-host="2c4b82b597b3e84e92b65ef7474e560c";
logging-data="1274599"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WAQ/iISgO0DfQqpRlNxO5vcJHVnASxCk="
User-Agent: tin/2.6.4-20241224 ("Helmsdale") (FreeBSD/14.2-STABLE (arm64))
Cancel-Lock: sha1:Z2wyegy02G/R6I66bwNB9mRoRlk=
Bytes: 3733
Theo <theom+news@chiark.greenend.org.uk> wrote:
> bp@www.zefox.net wrote:
>> Is there some sort of USB boot manager for Raspberry Pi versions
>> that don't have an EEPROM? I'm thinking of armv7 Pi2 and early Pi3.
>>
>> Bootcode.bin on an otherwise blank msdos microsd partition works,
>> but seemingly only with a single USB drive connected. A second
>> USB disk left in place by mistake caused the machine to hang.
>>
>> Something installed on a microSD that finds and reports bootable
>> USB drives, defaulting to the last one used, would be ideal.
>>
>> This video from about 2016 suggests it's already been done:
>> https://www.youtube.com/watch?v=bNL1pd-rwCU
>>
>> But, no implementations turned up in a web search. All the boot
>> manager references I found seemed to involve the Pi4. I'm interested
>> in using older machines already on hand. As it happens, most of
>> my machines run FreeBSD which uses u-boot as an intermediate step
>> but I don't think that matters.
>
> There's no reason why you can't use u-boot as a boot manager for Linux too.
I'm not trying to boot Linux, but rather FreeBSD. The problem seems to be
that bootcode.bin gets stuck if there are two USB drives connected at startup.
Absent that problem, bootcode.bin finds the USB disk and starts u-boot, which
then successfully launches the FreeBSD bootchain to load a kernel from USB.
> Many non-Pi Linux boards do this. However it'll only handle the Linux
> kernel - if you have different firmware, config.txt etc then u-boot is
> unaware of that - it runs too late in the boot process to change those
> things. Really u-boot can only change the Device Tree, kernel,
> initramfs and kernel environment (variables, command line). U-boot is
> running on the CPU, and so can't affect the GPU which is booted first on Pis
> 1-3.
AIUI, the
kernel=u-boot.bin
line in config.txt tells which binary to load and run from the msdos
partition on the (single) USB disk found if there's nothing visible
on microSD.
>
> EDK2, a UEFI bootloader (similar to a PC BIOS) is also a possibility, but
> the same limitations will apply.
There's been some discussion in the FreeBSD lists about using EDK2, but I
believe it's still rather preliminary. I certainly didn't understand much.
At one time it was possible to allow bootcode.bin to start u-boot on the
microSD card and then issue
run bootcmd_usb0
to start the bootchain on a USB drive. That command seems to have been
dropped in the time since from the version of u-boot shipped with FreeBSD.
But, the problem with multiple connected disks remains.
I was hopeful that something like a microsd with grub (or equivalent)
for the Pi1-3 had been developed.
Guess not.
Thanks for writing,
bob prohaska