Sujet : Re: How to boot from SD but run from USB?
De : cl (at) *nospam* isbd.net (Chris Green)
Groupes : comp.sys.raspberry-piDate : 24. Jan 2025, 00:32:50
Autres entêtes
Message-ID : <260b6l-e1g1.ln1@q957.zbmc.eu>
References : 1 2
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-29-amd64 (x86_64))
yeti <
yeti@tilde.institute> wrote:
Chris Green <cl@isbd.net> wrote:
Is it simply a matter of leaving /boot on the SD card and changing /
to being a USB drive or does one need to edit something in /boot
somewhere?
That would work, but I think there is an even simpler way:
Put only "bootcode.bin" on a FAT partition on the SD and a complete OS
image on the USB drive.
When you see "/boot/bootcode.bin" on your USB drive being updated,
update the other one too. A script for that should not need dark magic,
but it still is on my to do list.
I know it had to be pretty simple! :-) I have some other old Pi
systems lying around here so I can try it on them. The Pi that I
actually want to do this on is in France and I won't be there for a
couple of weeks.
A script to update the bootcode.bin on the FAT drive should be pretty
simple, just put it in /etc/rc.local and it will be run every time you
boot. It won't matter running it if /boot/bootcode.bin hasn't been
updated, though I suppose you might complain that it's writing to the
SD card unnecessarily. OK, use rsync and the file will only be
written if it has changed.
-- Chris Green·