Extroot YASD Problem

I've been running an Asterisk server on a repurposed Pogo V4 under Arch, but in attempting a long-overdue update, I discovered Arch abandoned ARMV5 some years ago. OpenWRT seems to be the only alternative; Asterisk 19 was even among its packages. Sweet!

I installed OpenWrt 21.02.3, reenacting the 4-part saga here. I realize this is a non-standard install. The intention seems to be "boot external usb/hdd/sd, but failing that, boot OpenWRT from internal NAND and repair usb/hdd/sd image." That may be the cause of my problem.

Installation went as smooth as silk! OK, I had to do a little hand-to-hand combat with Fedora-supplied ncat on my desktop; it didn't work as expected, but Alpine's version on an old 32-bit laptop worked a treat. After booting:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 07e00000 00020000 "ubi"

root@OpenWrt:~# block info
/dev/mtdblock1: UUID="..." VERSION="1" TYPE="ubi"
/dev/ubiblock0_1: UUID="..." VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/ubi0_2: UUID="..." VERSION="w5r0" MOUNT="/overlay" TYPE="ubifs"

I confirmed things were more or less functional and played a little clicky-clicky with Luci. Then, thinking I needed a little more space for Asterisk, Python and MosQuiTTo, I attempted Extroot on a 32GiB SD card. I don't recall having any troubles despite not appending sdhci and mtk_sd to /etc/modules/boot.d/mmc.

To my delight, after rebooting there was lots of room, and Luci obliged me by installing Asterisk and Python.

I poweroff'd, pulled the plug, and went to bed. The next morning, tragedy struck. Nc said she was Starting kernel ..., and the lights-a-blinkin' seem to confirm it, but then nc went silent. The light eventually began blinking slowly, and there she stayed. For at least 4 hours. No ping response.

Nc included the lines:

MMC rescan: current device # 0 initialized OK
device mmc 0:1
** File not found /boot/uImage **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **

I think this is where she's trying to boot from SD, but all that's there is Asterisk, Python, and a copy of various files tar/untar'd from the original. Poking around the the SD card (on my desktop) reveals a healthy ext4 file system with Python, Asterisk, etc.

She still boots sans SD. Strangely, hotplugging the SD doesn't affect the /dev tree, nor do I see evidence of the event in dmesg.

Some forum posts lead me to believe that SD operation is a bit sketchy, and suggest various workarounds, but I can devise no coherent strategy to overcome this problem, and thus I seek help from those wiser and more experienced.

Anyone?

Hi @jimw.
I don't know if I can help you at all, but I'll try.
From what you've written, and as it doesn't kill any routers, I understand that you are installing OpenWRT 21.02.3 on your existing hardware.
Apparently you were able to boot OpenWRT on it and can access the LuCI interface.
I never used SD (I always use pen-drives) to increase the size of the "disk" and install more stuff.
The first thing I do after OpenWRT is up and can access LuCI, is to connect via ssh and run following:
opkg update
opkg install kmod-usb2 usbutils kmod-usb-storage kmod-fs-ext4 block-mount e2fsprogs fdisk
reboot
Then look if pen-drive (in my case) is recognized:
dmesg | grep sd
If it is recognized I can see in one of the output lines:
[ 12.890000] sd 0:0:0:0: [sda] 7864320 512-byte logical blocks: (4.02 GB/3.75 GiB)

Can you see your SD card as I?

For now, best
carliedu

Obrigado Carliedu,

The only package in your list that wasn't already installed was kmod-usb2; Installing it didn't help. Kmod-mmc (Kernel support for MMC/SD cards) and kmod-usb-ehci (an alternative to kmod-usb2?) were also already installed.

I'm actually using a microSD card in an SD card adapter. The PogoV4 appliance accepts an SD card (neatly in a slot on its side), a USB2 stick (protruding from the top), two USB3 sticks (protruding a little more safely from the rear) and/or a 2.5" SATA drive (also protruding from the top). I was hoping to use the SD card as it's far less vulnerable to accidental physical damage.

I believe the electrical characteristics of the (micro)SD and USB drives must be very similar. I have a microSD to USB adapter. Interestingly, if I insert the microSD card into the USB adapter and plug it into any USB port on the box, dmesg announces it, both /dev/sda and /dev/sda1 magically appear, and I can mount /dev/sda1 /mnt and find all the files I expect: The ones I copied from /overlay as part of configuring extroot plus Python and Asterisk that LuCI installed for me.

But using the SD adapter, nothing! No dmesg lines, no /dev/sd*, no evidence that anything happened. I'd suspect a hardware problem, but U-Boot sees it, and it affects something in OpenWRT, which hangs midboot. It smells like it's just some kmod-xxx I haven't installed, but I don't know which one it is.

As a fallback, I can always put extroot on one of those stubby little USB sticks and get the most of what I'm looking for, but it would be nice to activate the SD slot, too.

Jim

Okay, after much forum post reading, perhaps I'm beginning to see a pattern. Users complaining of problems with SD cards are often advised to ensure kmod-sdhci and kmod-sdhci-mt7620 are installed. Furthermore, the Extroot configuration page on the Wiki advises adding sdhci and mtk_sd to /etc/modules-boot.d/mmc, but I poked around /lib/modules/5.4.188 and found sdhci.ko, but mtk_sd.ko was MIA. Opkg has never heard of kmod-sdhci-mt7620.

Did kmod-sdhci-mt7620 change its name to kmod-mtk_sd or kmod-sdhci-mtk_sd and go on the lam? If so, the fugitive package must have felt me getting close and changed its name yet again so I'd be less likely to find it. Strange that dmesg has no complaint about finding it.

The search continues.

Those are exclusively for Mediatek SOCs (mt7620 and its successors), they are useless/ unusable on Marvell SOCs.

Good to know, thanks. It seemed MT made mainly wireless adapters and the like, but with all the hyperintegration in SoCs, I try not to assume the provenance of any region of silicon.

So, the mystery remains why my SD card worked the first time I booted OpenWRT, but fails each subsequent time. It fails both with and without the bogus "add(ed) two lines" imperative in the OpenWRT Wiki. You've convinced me that information is wrong (or at least misleading).

It's getting curiouser and curioser.

The best option is to hook the serial console to UART port and see what's exactly happening. From the looks of it, when SD card is connected seems like U-Boot is trying to boot from MMC/SD card which fails, and then somehow the fallback might be not executed or the SD card slot is left in such state, that kernel can't see it. When that happens, probably the userspace waits infinitely for extroot filesystem to appear.
Put bootlog from serial console here, that should have enough clues what's happening.

Tag @bobafetthotmail because he added the device in https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=c19f811c4d732f634ac18f33ae95e954ac9e8c81, so should know better than me.

Hi @jimw,
have you seen this page: https://openwrt.org/docs/guide-user/installation/installation_methods/sd_card.
It seems that there are special compilations for any devices.

I wasn't looking forward to soldering flimsy wires to those tiny vias on that SMD circuit board. Electronics tinkering is a lot less fun after they abandoned thru-hole components. But I have an FTDI cable I bought years ago for just such a purpose, and I spent $2K extra for the special cataract surgery. I decided to give it a go with my one good eye and a magnifying hood.

I'd long forgotten stty's syntax, but it didn't take long to get /dev/ttyS0 on the Pogo appliance sending data to dev/ttyUSB0 on my Fedora desktop. Reboot w.o. the SD card, and watch the messages fly by.

Plug in SD card, Reboot again. In the messages, I see: mount_root: switched to extroot, but a few lines further on: procd: - ubus - failed to chown(/var/run/ubus), and there the output stopped. Here are all 218 lines:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Using egiga0 device
host [redacted] is alive
Using egiga0 device
host [redacted] is alive
Using egiga0 device
host [redacted] is alive
Using egiga0 device
host [redacted] is alive
Using egiga0 device
host [redacted] is alive
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.188 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)) #0 Sat Apr 16 12:59:34 2022
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Cloud Engines PogoPlug Series 4
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x200000@0x0(u-boot),-@0x200000(ubi)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 121128K/131072K available (5165K kernel code, 179K rwdata, 832K rodata, 1024K init, 210K bss, 9944K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from 0xc0800b9c with crng_init=0
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000012] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.000053] Switching to timer-based delay loop, resolution 6ns
[    0.000163] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.000190] pid_max: default: 32768 minimum: 301
[    0.000484] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000515] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001826] CPU: Testing write buffer coherency: ok
[    0.003147] Setting up static identity map for 0x100000 - 0x10003c
[    0.003518] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.007783] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007819] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.007996] pinctrl core: initialized pinctrl subsystem
[    0.009832] NET: Registered protocol family 16
[    0.010537] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.011913] cpuidle: using governor ladder
[    0.012423] Feroceon L2: Enabling L2
[    0.012481] Feroceon L2: Cache support initialised.
[    0.017847] No ATAGs?
[    0.043534] SCSI subsystem initialized
[    0.044773] usbcore: registered new interface driver usbfs
[    0.044846] usbcore: registered new interface driver hub
[    0.044919] usbcore: registered new device driver usb
[    0.048372] clocksource: Switched to clocksource orion_clocksource
[    0.049309] thermal_sys: Registered thermal governor 'step_wise'
[    0.049617] NET: Registered protocol family 2
[    0.049799] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.050576] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.050620] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.050650] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.050676] TCP: Hash tables configured (established 1024 bind 1024)
[    0.050793] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.050825] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.051033] NET: Registered protocol family 1
[    0.051072] PCI: CLS 0 bytes, default 32
[    0.054461] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.062208] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.062225] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.074061] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.076369] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.077619] mvebu-gpio f1010140.gpio: IRQ index 3 not found
[    0.078156] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.078180] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.078195] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.078209] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    0.078330] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    0.078440] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    0.079861] PCI: bus0: Fast back to back transfers disabled
[    0.079882] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.080046] pci 0000:01:00.0: [1b73:1009] type 00 class 0x0c0330
[    0.080096] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
[    0.080122] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit]
[    0.080147] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit]
[    0.080240] pci 0000:01:00.0: supports D1
[    0.080254] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[    0.080298] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    0.081650] PCI: bus1: Fast back to back transfers disabled
[    0.081672] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.081947] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.081966] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    0.081987] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe000ffff 64bit]
[    0.082012] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0010000-0xe0010fff 64bit]
[    0.082037] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0011000-0xe0011fff 64bit]
[    0.082060] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.082078] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.082147] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.082175] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    0.085935] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.088340] printk: console [ttyS0] disabled
[    0.088513] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 10416666) is a 16550A
[    0.648211] printk: console [ttyS0] enabled
[    0.653166] Loading iSCSI transport class v2.0-870.
[    0.660797] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    0.667125] nand: Hynix H27U1G8F2BTR-BC
[    0.670993] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.678576] Scanning device for bad blocks
[    0.691756] Bad eraseblock 81 at 0x000000a20000
[    0.801523] 2 cmdlinepart partitions found on MTD device orion_nand
[    0.807759] Creating 2 MTD partitions on "orion_nand":
[    0.812899] 0x000000000000-0x000000200000 : "u-boot"
[    0.818791] 0x000000200000-0x000008000000 : "ubi"
[    0.832089] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.559069] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:25:31:05:ef:b2
[    2.408369] random: fast init done
[    2.648382] rtc-mv f1010300.rtc: internal RTC not ticking
[    2.653882] i2c /dev entries driver
[    2.658175] orion_wdt: Initial timeout 25 sec
[    2.667311] marvell-cesa f1030000.crypto: CESA device successfully registered
[    2.675811] NET: Registered protocol family 10
[    2.682742] Segment Routing with IPv6
[    2.686499] NET: Registered protocol family 17
[    2.691022] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.704135] 8021q: 802.1Q VLAN Support v1.8
[    2.711968] UBI: auto-attach mtd1
[    2.715284] ubi0: attaching mtd1
[    2.923214] ubi0: scanning is finished
[    2.941410] ubi0: attached mtd1 (name "ubi", size 126 MiB)
[    2.946879] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    2.953764] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    2.960459] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    2.967215] ubi0: good PEBs: 1007, bad PEBs: 1, corrupted PEBs: 0
[    2.973299] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    2.980505] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1008582241
[    2.989610] ubi0: available PEBs: 0, total reserved PEBs: 1007, PEBs reserved for bad PEB handling: 19
[    2.999870] block ubiblock0_1: created from ubi0:1(rootfs)
[    3.005336] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    3.012308] hctosys: unable to open rtc device (rtc0)
[    3.017821] ubi0: background thread "ubi_bgt0d" started, PID 463
[    3.030607] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    3.042103] Freeing unused kernel memory: 1024K
[    3.046788] Run /sbin/init as init process
[    3.466660] init: Console is alive
[    3.470338] init: - watchdog -
[    3.932771] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.083555] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.093418] ehci-fsl: Freescale EHCI Host controller driver
[    4.101883] ehci-orion: EHCI orion driver
[    4.106122] orion-ehci f1050000.ehci: EHCI Host Controller
[    4.111667] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    4.119503] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    4.148408] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    4.155155] hub 1-0:1.0: USB hub found
[    4.159257] hub 1-0:1.0: 1 port detected
[    4.166585] ehci-platform: EHCI generic platform driver
[    4.179819] sata_mv f1080000.sata: slots 32 ports 1
[    4.187001] scsi host0: sata_mv
[    4.190567] ata1: SATA max UDMA/133 irq 32
[    4.519732] ata1: SATA link down (SStatus 0 SControl F300)
[    4.534932] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    4.540238] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    4.548899] xhci_hcd 0000:01:00.0: hcc params 0x200073a1 hci version 0x100 quirks 0x0000000000080010
[    4.559274] hub 2-0:1.0: USB hub found
[    4.563275] hub 2-0:1.0: 2 ports detected
[    4.567690] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    4.572953] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    4.580350] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    4.587019] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.595821] hub 3-0:1.0: USB hub found
[    4.599930] hub 3-0:1.0: 2 ports detected
[    4.619610] mvsdio f1090000.mvsdio: Got CD GPIO
[    4.624201] mvsdio f1090000.mvsdio: Got WP GPIO
[    4.656073] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.673743] init: - preinit -
[    4.882378] mmc0: new high speed SDHC card at address 0001
[    4.935705] mmcblk0: mmc0:0001 00000 29.8 GiB 
[    5.025705]  mmcblk0: p1
[    5.086511] random: procd: uninitialized urandom read (4 bytes read)
[    5.777777] random: jshn: uninitialized urandom read (4 bytes read)
[    5.893385] random: jshn: uninitialized urandom read (4 bytes read)
[    6.105985] urandom_read: 6 callbacks suppressed
[    6.105993] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    9.859354] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    9.869216] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   11.097317] UBIFS (ubi0:2): Mounting in unauthenticated mode
[   11.134398] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 632
[   11.173662] UBIFS (ubi0:2): recovery needed
[   11.354300] UBIFS (ubi0:2): recovery completed
[   11.358872] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[   11.366674] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.376566] UBIFS (ubi0:2): FS size: 120379392 bytes (114 MiB, 933 LEBs), journal size 6064128 bytes (5 MiB, 47 LEBs)
[   11.387147] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[   11.393752] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID 309ECCCC-E20B-4B88-81A8-40CA7DC9C384, small LPT model
[   11.410041] mount_root: loading kmods from internal overlay
[   11.473282] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   11.494065] sdhci: Secure Digital Host Controller Interface driver
[   11.500272] sdhci: Copyright(c) Pierre Ossman
[   11.507560] sdhci-pltfm: SDHCI platform and OF driver helper
[   11.526672] usbcore: registered new interface driver usb-storage
[   11.535327] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   11.644252] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   11.695029] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: 
[   11.738122] UBIFS (ubi0:2): un-mount UBI device 0
[   11.742886] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" stops
[   11.752101] mount_root: switched to extroot
[   11.760572] urandom-seed: Seeding with /etc/urandom.seed
[   11.867441] procd: - early -
[   11.870502] procd: - watchdog -
[   12.504196] procd: - watchdog -
[   12.508630] procd: - ubus -
[   12.511519] procd: - ubus - failed to chown(/var/run/ubus)

"What do you mean, 'failed to chown?'" I thought. "I'm root, dammit!" Then I recalled seeing a little sliding tab on the micro-to-full-size-SD adapter and thinking, "I wonder if that's some sort of write-protect." Now I have another data point.

The tab was write-protect, but writing was enabled. I flipped it to the other position, plugged it back in and it booted. And, /dev/mmcblk0 and /dev/mmcblk0p1 are there, but they can't be mounted with mount /dev/... /mnt because they're "read only". But they're there.

If I remove the SD card, they go away. If I reinsert (with the tab in either position), they don't come back.

Are we getting closer?

No, I hadn't, but I think that describes installing and/or running from an external drive. I'm trying to boot from on-board flash and just use extroot. I guess running everything from the SD card is an alternative, since u-boot seems ready and willing to load something from there.

But, I think I like your earlier suggestion better, extroot on a USB mini stick, as a backup plan.

Jim

The OpenWrt version You are using should have fall-back for chowning that dir, this is the code responsible for it: https://git.openwrt.org/?p=project/procd.git;a=blob;f=state.c;hb=HEAD#l139. Check permissions on that directory or if it's actually there, try to remove whole /var/run on the SD card. For reference, these are the permissions on my system

drwxr-xr-x    2 81       81              60 Jul 27 17:06 ubus

The 81 UID and GID is ubus.

Well, that's fascinating. I guess. I don't have a firm grasp on this overlay file system concept. I have the general idea, but finding /var/run on the SD card took a little spelunking. Working on my Fedora box. I mounted the first and only SD partition, and found var hanging off /upper. That's where things got weird:

[root@jim upper]# ls
etc  lib  rwm  sbin  srv  usr  var
[root@jim upper]# cd var
bash: cd: var: Not a directory
[root@jim upper]# file var
var: character special (0/0)
[root@jim upper]# ls -l var
c---------. 1 root root 0, 0 Jul 30 20:57 var

Whoa! That would make chown pretty tricky. Oh well, tmn505 says I can remove it I did. It booted! Twice in a row; it might be working! Python runs!. Asterisk runs (V18, I was mistaken earlier),

Now, I can do battle with Asterisk. (They've 'improved' the format of one of the config files, but provided some Python to convert from the old format. Old file: 32 lines; New file: 350. Improved?)

Thanks tmn. You've been very helpful.