Hold up - that works? I’ve got a SBC device that has to boot off sd card but has ssd attached.
Any pointers as to where I could read up more on how to split a fs system like that? I can copy files easily enough but presumably needs so additional magic to link/integrate it
The first step in the boot process is loading the boot firmware. On a BIOS/UEFI PC, this gives you Preboot Execution Environment (PXE) [0]. Raspberry Pi boards have something similar since the Pi 3, though it's not exactly PXE. Network booting allows you to setup a DHCP server in a way that automatically serves the machine a kernel, initramfs, and cmdline over the network. You can run a full Linux that way, though you probably want to switch_root [1] to another filesystem that has a block device backing it with more storage, for practical purposes. This is what most initramfs images do.
Once the machine can automatically retrieve those three, you're set. The initramfs can be built with whatever binaries, firmware, and kernel modules you need to initialize the network and set up an NBD or NFS share. Add `root=/dev/nbd0` or whatever, and you're running over the network.
Same concept applies to booting with a split boot partition. The boot partition contains the kernel, initramfs, and bootloader, along with the boot configuration. The kernel cmdline specifies which disk contains the root filesystem. It need not be on the same disk as the kernel, or even on the same machine.
[0] https://en.wikipedia.org/wiki/Preboot_Execution_Environment
>The kernel cmdline specifies which disk contains the root filesystem.
Here's a related bit from the kernel docs that describes the initramfs and switch_root in more detail.
https://www.kernel.org/doc/Documentation/filesystems/ramfs-r...
Interestingly, there's even a mechanism for leaving programs running even after exiting the initramfs.
It ultimately should not matter how Kernel + initramfs finds itself on RAM, or whether it was loaded from what it thinks it was loaded from. Kernel is just a baremetal program, and BIOS/firmware is just the least elaborate tool to make Kernel appear on RAM.