Re: Race condition with Raspberry Pi 3 root on NFS

2022-10-30 Thread Aaron B.
On Sun, 30 Oct 2022 16:54:34 -0700
Andy Ruhl  wrote:

> On Sun, Oct 30, 2022 at 2:18 PM Aaron B.  wrote:

> There used to be a way to build a kernel with a hardcoded NFS root
> option. I dug around in evbarm and aarch64 and didn't see something
> familiar to me (from like 15 years ago when I was doing this).
> 

It's a good thought - I have an O-Droid C1+ still on 7.1.2 booting
exactly that way.

The issue, though, is that the mue0 simply isn't in the device tree -
not yet. The kernel boots up, looks for mue0, doesn't find it, then
drops to a prompt. A few seconds later the USB bus stabilizes and mue0
attaches.

I assume attempting to use a USB key or USB-to-SATA device as root
would result in the same behavior.

-- 
Aaron B. 


Re: Race condition with Raspberry Pi 3 root on NFS

2022-10-30 Thread Andy Ruhl
On Sun, Oct 30, 2022 at 2:18 PM Aaron B.  wrote:
> This looks less like a bug and more working as designed - but in an
> weird edge case. Are there any magic workarounds to get multiuser
> without human attention?

There used to be a way to build a kernel with a hardcoded NFS root
option. I dug around in evbarm and aarch64 and didn't see something
familiar to me (from like 15 years ago when I was doing this).

Maybe someone can comment on if this still exists.

Andy


Race condition with Raspberry Pi 3 root on NFS

2022-10-30 Thread Aaron B.


My desired state is: kernel and bootstrap on the SD card, except with
the root filesystem on an NFS server.

I started with the official 9.3 aarch64 image, modified cmdline.txt to:

> root=mue0 console=fb

It tries, but fails. Seems the network interface is actually USB, which
doesn't attach before the kernel goes looking for the root filesystem:

[   5.6071214] boot device: ld0
[   5.6171226] unknown device major 0x
[   5.6171226] root device (default ld0a): mue0 at uhub2 port 1
[   7.0072744] mue0: vendor 0424 (0x424) product 7800 (0x7800), rev 2.10/3.00, 
addr 4 [   7.3151316] mue0: LAN7800 id 0x7800 rev 0x2
[   7.3329710] ukphy0 at mue0 phy 1: OUI 0x00800f, model 0x0013, rev. 2
[   7.3584591] ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 
1000baseT, 1000baseT-FDX, auto 
[   7.3862316] mue0: Ethernet address b8:27:eb:f5:f3:a8 
[  19.2917853] mue0
[  20.4919454] dump device: mue0
[  23.5923589] file system (default generic): 
[  24.6524995] root on mue0 dumps on mue0
[  24.6562647] nfs_boot: trying DHCP/BOOTP
[  27.7029083] nfs_boot: DHCP next-server: 192.168.102.20

The 'mue0' at 19.29 seconds is me typing my preferred root device into
a prompt that I believe prints at 5.61 seconds, two seconds before the
network interface attaches.

The Pi 3 reaches multiuser after that, but I have to manually retype
the root FS each time it boots.

This looks less like a bug and more working as designed - but in an
weird edge case. Are there any magic workarounds to get multiuser
without human attention?

-- 
Aaron B.