>Synopsis:      ARM64 / Orange Pi Zero 2: boot partition too small, relinking 
>failures, ntpd jitter, and general system instability
>Category:      arm64
>Environment:
        System      : OpenBSD 7.8
        Details     : OpenBSD 7.8 (GENERIC.MP) #38: Sun Oct 12 18:23:44 MDT 2025
                         
[email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP

        Architecture: OpenBSD.arm64
        Machine     : arm64

>Description:
        Installing and running OpenBSD 7.8 on an Orange Pi Zero 2
        (1GB RAM, SD card boot) exposes several functional and stability
        issues:

        1. **MSDOS boot partition too small**
           The installer’s default auto/whole-disk layout creates a 16MB FAT
           boot partition. During first-boot kernel relinking, the generated
           kernel images (bsd / bsd.mp) are approx. 18.1MB. The FAT partition
           is too small, causing kernel relinking to fail.

        2. **Relinking failures for base daemons**
           Relinking of base system libraries fails for at least:
             - sshd
             - smtpd
           After this failure, sshd does not start automatically, requiring
           serial console access.

        3. **ntpd jitter extremely large after reboot**
           With ntpd enabled using -s, the system clock shows 4–8 hours of
           jitter after reboot. ntpd does not stabilize the clock quickly.
           Running `rdate` manually before ntpd helps work around the issue.

        4. **General system instability under normal usage**
           Running common shells and tools (zsh, bash, package tools, etc.)
           causes the system to become unresponsive after a short period.
           When this occurs:
             - SSH stops accepting new connections
             - Existing SSH sessions may freeze
             - ICMP ping continues to respond normally
           The system appears alive at the network layer but does not accept
           new interactive workloads, suggesting a hang in userspace or a
           resource lockup.

           This instability makes the system unsuitable for day-to-day use.

>How-To-Repeat:
        1. Install OpenBSD 7.8 on the Orange Pi Zero 2 using default
           auto/whole-disk partitioning.
        2. Reboot and observe:
             - Kernel relinking fails (FAT too small)
             - sshd/smtpd relinking failures
             - ntpd reports several hours of jitter
        3. reorder_kernel fails
        4. Use the system normally:
             - run zsh or bash
             - install or run tools from ports/packages
             - perform typical interactive workloads
           System becomes unresponsive; SSH stops accepting new connections
           while ping continues to work.

>Fix:
        Workarounds:
          - Manually enlarge the MSDOS boot partition (e.g., 32–64MB).
          - Restart sshd via serial console after failed relinking.
          - Run `rdate` prior to ntpd startup for correct initial time.

        Possible areas for investigation:
          - Increase default boot partition size for arm64 platforms where
            relinked kernels exceed 16MB.
          - Determine root cause of sshd/smtpd relink failures.
          - Investigate ntpd jitter/offset handling on this hardware.
          - Examine userspace lockup or kernel scheduling issues causing
            system hangs while ping continues to respond.

dmesg:
OpenBSD 7.8 (GENERIC.MP) #38: Sun Oct 12 18:23:44 MDT 2025
    [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 1071890432 (1022MB)
avail mem = 998121472 (951MB)
random: good seed from bootblocks
mainbus0 at root: OrangePi Zero2
psci0 at mainbus0: PSCI 1.1, SMCCC 1.4
efi0 at mainbus0: UEFI 2.10
efi0: Das U-Boot rev 0x20240100
smbios0 at efi0: SMBIOS 3.0
smbios0: vendor U-Boot version "2024.01" date 01/01/2024
smbios0: Unknown Unknown Product
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 256KB 64b/line 16-way L2 cache
cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 256KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 256KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 256KB 64b/line 16-way L2 cache
"tf-a" at mainbus0 not configured
"secmon" at mainbus0 not configured
apm0 at mainbus0
"osc24M-clk" at mainbus0 not configured
"pmu" at mainbus0 not configured
agtimer0 at mainbus0: 24000 kHz
simplebus0 at mainbus0: "soc"
sxisyscon0 at simplebus0
sxiccmu0 at simplebus0
sxipio0 at simplebus0: 85 pins
ampintc0 at simplebus0 nirq 192, ncpu 4 ipi 0: "interrupt-controller"
sxirtc0 at simplebus0
sxiccmu1 at simplebus0
sxipio1 at simplebus0: 2 pins
sxirsb0 at simplebus0
axppmic0 at sxirsb0 addr 0x745: AXP305
sxidog0 at simplebus0
sximmc0 at simplebus0
sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma
com0 at simplebus0: dw16550
com0: console
"spi" at simplebus0 not configured
dwxe0 at simplebus0: address 02:00:74:8b:47:df
rgephy0 at dwxe0 phy 1: RTL8169S/8110S/8211, rev. 6
"usb" at simplebus0 not configured
"phy" at simplebus0 not configured
ehci0 at simplebus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at simplebus0: version 1.0
gpio0 at sxipio0: 32 pins
gpio1 at sxipio0: 32 pins
gpio2 at sxipio0: 32 pins
gpio3 at sxipio0: 32 pins
gpio4 at sxipio0: 32 pins
gpio5 at sxipio0: 32 pins
gpio6 at sxipio0: 32 pins
gpio7 at sxipio0: 32 pins
gpio8 at sxipio0: 32 pins
gpio9 at sxipio1: 32 pins
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
gpioleds0 at mainbus0: "power"
"vcc5v" at mainbus0 not configured
"regulator-usb1-vbus" at mainbus0 not configured
"binman" at mainbus0 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Sandisk, SR64G, 0080> removable
sd0: 60906MB, 512 bytes/sector, 124735488 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (ed4f2609842fdbb1.a) swap on sd0b dump on sd0b
WARNING: / was not properly unmounted
WARNING: bad clock chip time
WARNING: CHECK AND RESET THE DATE!

usbdevs:
Controller /dev/usb0:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub0
Controller /dev/usb1:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub1

  24 root  wheel   512B Oct 13 03:06 var
undeadly# ls -l /
total 146552
-rw-r--r--   1 root  wheel       578 Oct 13 03:06 .cshrc
-rw-r--r--   1 root  wheel       364 Oct 13 03:06 .profile
drwxr-xr-x   2 root  wheel       512 Oct 13 03:06 altroot
drwxr-xr-x   2 root  wheel      1024 Oct 13 03:08 bin
-rwx------   2 root  wheel  18962113 Dec  5 19:06 bsd
-rwx------   2 root  wheel  18962113 Dec  5 19:06 bsd.booted
-rw-------   1 root  wheel  18465885 Oct 13 05:17 bsd.rd
-rw-------   1 root  wheel  18882523 Oct 13 05:17 bsd.sp
drwxr-xr-x   6 root  wheel     16896 Dec  7 22:41 dev
drwxr-xr-x  22 root  wheel      1536 Dec  5 20:06 etc
drwxr-xr-x   4 root  wheel       512 Dec  5 18:27 home
drwx-----T   2 root  wheel      2048 Dec  5 21:28 lost+found
drwxr-xr-x   2 root  wheel       512 Oct 13 03:06 mnt
drwx------   3 root  wheel       512 Oct 13 05:20 root
drwxr-xr-x   2 root  wheel      1536 Oct 13 03:08 sbin
lrwxrwx---   1 root  wheel        11 Oct 13 03:06 sys -> usr/src/sys
drwxrwxrwt   3 root  wheel       512 Dec  7 22:51 tmp
drwxr-xr-x  15 root  wheel       512 Dec  5 17:55 usr
drwxr-xr-x  24 root  wheel       512 Oct 13 03:06 var


Reply via email to