Update: there are a couple of routes (at least) to go down:
- Pure nfsroot, skip initrd, boot kernel with
nfsroot=...
set- this requires a custom kernel config for rpi4 to include GENET builtin
- Leverage nixos stage-1
- just put needed network, etc drivers into initramfs
- let stage-1 setup network
- let stage-1 mount with busybox
I chose option 2, since I don’t have experience with modifying existing kernel configs. For completeness I might circle back around and see about accomplishing the first approach, as well.
On option 2, I’m getting close:
loading module dm_mod...
[ 3.753016] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel@redhat.com
loading module af_packet...
running udev...
Starting version 247
bringing up network interface eth0...
[ 4.148318] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[ 4.157219] bcmgenet fd580000.ethernet eth0: Link is Down
acquiring IP address via DHCP on eth0...
udhcpc: started, v1.32.1
udhcpc: sending discover
udhcpc: sending discover
[ 8.256446] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 8.264700] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: sending discover
udhcpc: no lease, failing
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
starting device mapper and LVM...
[ 13.684725] random: lvm: uninitialized urandom read (4 bytes read)
mounting 192.168.1.2:/export/rpifour2 on /...
mount: mounting 192.168.1.2:/export/rpifour2 on /mnt-root/ failed: Network is unreachable
An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2. Press one
of the following keys:
r) to reboot immediately
*) to ignore the error and continue