Ok, figured out the dmesg-problem. When trying to mount my extroot, I get different behaviour/messages depending if I try to mount it (in /etc/config/fstab) as "overlay" or "/overlay".
When mounted with "overlay", my /dev/sda1 drive is mounted to /overlay (and I can access it there) but is not replacing the root-filesystem (/dev/ubi0_1 continues to be mounted and is acting as the upper overlay directory). Relevant dmesg-lines:
[ 10.562273] block: extroot: not configured
[ 10.594243] mount_root: switching to jffs2 overlay
<...other stuff...>
[ 12.718480] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 12.759308] EXT4-fs (sda1): mounted filesystem without journal. Opts:
When mounted with "/overlay", my /dev/sda1 drive is not mounted at all and /dev/ubi0_1 continues to be mounted as overlay-root-fs (as it would be without any extroot). Relevant dmesg-lines:
[ 10.705470] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 10.730547] EXT4-fs (sda1): mounted filesystem without journal. Opts:
[ 10.737473] block: extroot: unable to lookup root device /dev/mtdblock7
[ 10.804481] mount_root: switching to jffs2 overlay
Any pointers? There should be no jff2 involved I think (original overlay is on ubifs)? What's /dev/mtdblock7?
Many thanks!
Below the full dmesg-log from "overlay" for reference. The above is the only difference.
[ 0.148372] pci 0000:03:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[ 0.148393] pci 0000:03:00.0: reg 0x18: [mem 0x00000000-0x000fffff 64bit pref]
[ 0.148479] pci 0000:03:00.0: supports D1 D2
[ 0.148488] pci 0000:03:00.0: PME# supported from D0 D1 D3hot D3cold
[ 0.148640] PCI: bus3: Fast back to back transfers disabled
[ 0.148653] pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03
[ 0.148757] pci 0000:00:01.0: BAR 8: assigned [mem 0xf8000000-0xf80fffff]
[ 0.148769] pci 0000:00:02.0: BAR 8: assigned [mem 0xf8200000-0xf83fffff]
[ 0.148779] pci 0000:00:03.0: BAR 8: assigned [mem 0xf8400000-0xf85fffff]
[ 0.148791] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf8007fff 64bit]
[ 0.148812] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 0.148823] pci 0000:00:01.0: bridge window [mem 0xf8000000-0xf80fffff]
[ 0.148837] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8200000-0xf82fffff 64bit pref]
[ 0.148859] pci 0000:02:00.0: BAR 2: assigned [mem 0xf8300000-0xf83fffff 64bit pref]
[ 0.148878] pci 0000:00:02.0: PCI bridge to [bus 02]
[ 0.148888] pci 0000:00:02.0: bridge window [mem 0xf8200000-0xf83fffff]
[ 0.148902] pci 0000:03:00.0: BAR 0: assigned [mem 0xf8400000-0xf84fffff 64bit pref]
[ 0.148921] pci 0000:03:00.0: BAR 2: assigned [mem 0xf8500000-0xf85fffff 64bit pref]
[ 0.148938] pci 0000:00:03.0: PCI bridge to [bus 03]
[ 0.148948] pci 0000:00:03.0: bridge window [mem 0xf8400000-0xf85fffff]
[ 0.148992] pci 0000:00:01.0: enabling device (0140 -> 0142)
[ 0.149014] pci 0000:01:00.0: enabling device (0140 -> 0142)
[ 0.149171] mv_xor f1060900.xor: Marvell shared XOR driver
[ 0.171563] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[ 0.211536] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[ 0.211628] mv_xor f10f0900.xor: Marvell shared XOR drivabilityer
[ 0.251534] mv_xor f10f0900.xor: Marvell XOR: ( xor cpy )
[ 0.291533] mv_xor f10f0900.xor: Marvell XOR: ( xor cpy )
[ 0.291722] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.293414] console [ttyS0] disabled
[ 0.313426] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 20, base_baud = 15625000) is a 16550A
[ 0.970224] console [ttyS0] enabled
[ 0.974448] pxa3xx-nand f10d0000.nand: This platform can't do DMA on this device
[ 0.982066] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[ 0.988439] nand: AMD/Spansion S34ML01G1
[ 0.992392] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[ 0.998070] pxa3xx-nand f10d0000.nand: ECC strength 16, ECC step size 2048
[ 1.005311] Bad block table found at page 65472, version 0x01
[ 1.011505] Bad block table found at page 65408, version 0x01
[ 1.017480] nand_read_bbt: bad block at 0x000002e40000
[ 1.022833] 9 ofpart partitions found on MTD device pxa3xx_nand-0
[ 1.028944] Creating 9 MTD partitions on "pxa3xx_nand-0":
[ 1.034393] 0x000000000000-0x000000100000 : "u-boot"
[ 1.039828] 0x000000100000-0x000000140000 : "u_env"
[ 1.045160] 0x000000140000-0x000000180000 : "s_env"
[ 1.050467] 0x000000900000-0x000000a00000 : "devinfo"
[ 1.055962] 0x000000a00000-0x000003200000 : "kernel1"
[ 1.061531] 0x000000d00000-0x000003200000 : "ubi"
[ 1.066736] 0x000003200000-0x000005a00000 : "kernel2"
[ 1.072305] 0x000003500000-0x000005a00000 : "rootfs2"
[ 1.077864] 0x000005a00000-0x000008000000 : "syscfg"
[ 1.083875] m25p80 spi0.0: mr25h256 (32 Kbytes)
[ 1.089537] libphy: Fixed MDIO Bus: probed
[ 1.093803] libphy: orion_mdio_bus: probed
[ 1.099173] mvneta f1070000.ethernet eth0: Using random mac address 26:8e:e2:5a:b5:0f
[ 1.108228] mvneta f1074000.ethernet eth1: Using random mac address 7a:e4:e8:17:47:d3
[ 1.123261] TCP: cubic registered
[ 1.126606] NET: Registered protocol family 17
[ 1.131133] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 1.143881] Bridge firewalling registered
[ 1.147923] 8021q: 802.1Q VLAN Support v1.8
[ 1.152286] Registering SWP/SWPB emulation handler
[ 1.159930] UBI: auto-attach mtd5
[ 1.163354] UBI: attaching mtd5 to ubi0
[ 1.729811] UBI: scanning is finished
[ 1.757412] UBI: attached mtd5 (name "ubi", size 37 MiB) to ubi0
[ 1.763506] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 1.770322] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 1.777094] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 1.784043] UBI: good PEBs: 295, bad PEBs: 1, corrupted PEBs: 0
[ 1.789988] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
[ 1.797196] UBI: max/mean erase counter: 7/3, WL threshold: 4096, image sequence number: 1946813262
[ 1.806322] UBI: available PEBs: 0, total reserved PEBs: 295, PEBs reserved for bad PEB handling: 19
[ 1.815598] UBI: background thread "ubi_bgt0d" started, PID 321
[ 1.822381] UBI: ubiblock0_0 created from ubi0:0(rootfs)
[ 1.827734] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[ 1.835884] mvsw61xx 1000000003.mvsw61xx: Found MV88E6172 at f1072004.mdio-mi:10
[ 1.843373] mvsw61xx 1000000003.mvsw61xx: Using direct addressing
[ 1.849612] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 1.867980] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 1.875514] Freeing unused kernel memory: 204K (c03fd000 - c0430000)
[ 2.568325] init: failed to symlink /tmp -> /var
[ 2.573207] init: Console is alive
[ 3.912837] usbcore: registered new interface driver usbfs
[ 3.918435] usbcore: registered new interface driver hub
[ 3.923960] usbcore: registered new device driver usb
[ 3.934576] SCSI subsystem initialized
[ 3.941022] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.948379] ehci-platform: EHCI generic platform driver
[ 3.954653] ehci-orion: EHCI orion driver
[ 3.958918] orion-ehci f1050000.usb: EHCI Host Controller
[ 3.964430] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[ 3.972176] orion-ehci f1050000.usb: irq 26, io mem 0xf1050000
[ 3.991598] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[ 3.998540] hub 1-0:1.0: USB hub found
[ 4.002469] hub 1-0:1.0: 1 port detected
[ 4.012542] libata version 3.00 loaded.
[ 4.014234] sata_mv f10a0000.sata: version 1.28
[ 4.014484] sata_mv f10a0000.sata: slots 32 ports 1
[ 4.020423] scsi host0: sata_mv
[ 4.023970] ata1: SATA max UDMA/133 irq 29
[ 4.371598] ata1: SATA link down (SStatus 0 SControl F300)
[ 4.380394] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 4.385742] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[ 4.394470] hub 2-0:1.0: USB hub found
[ 4.398338] hub 2-0:1.0: 2 ports detected
[ 4.402945] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 4.408228] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[ 4.416741] hub 3-0:1.0: USB hub found
[ 4.420600] hub 3-0:1.0: 2 ports detected
[ 4.438777] usbcore: registered new interface driver usb-storage
[ 4.582513] init: - preinit -
[ 4.761693] usb 2-2: new high-speed USB device number 2 using xhci_hcd
[ 4.968794] usb-storage 2-2:1.0: USB Mass Storage device detected
[ 4.975661] scsi host1: usb-storage 2-2:1.0
[ 4.987532] random: procd urandom read with 106 bits of entropy available
[ 5.941258] random: nonblocking pool is initialized
[ 5.974133] scsi 1:0:0:0: Direct-Access Mass Storage Device PQ: 0 ANSI: 0 CCS
[ 5.986698] sd 1:0:0:0: [sda] 15523839 512-byte logical blocks: (7.94 GB/7.40 GiB)
[ 5.995319] sd 1:0:0:0: [sda] Write Protect is off
[ 6.000172] sd 1:0:0:0: [sda] Mode Sense: 03 00 00 00
[ 6.002024] sd 1:0:0:0: [sda] No Caching mode page found
[ 6.007393] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 6.041785] sda: sda1
[ 6.047009] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 9.240738] UBIFS: background thread "ubifs_bgt0_1" started, PID 459
[ 9.359938] UBIFS: recovery needed
[ 9.707169] UBIFS: recovery completed
[ 9.710964] UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[ 9.717487] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 9.726722] UBIFS: FS size: 30855168 bytes (29 MiB, 243 LEBs), journal size 1523712 bytes (1 MiB, 12 LEBs)
[ 9.736458] UBIFS: reserved for root: 1457365 bytes (1423 KiB)
[ 9.742384] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 63508186-72F7-47FD-A164-E3BF7EF1BF26, small LPT model
[ 9.779387] mount_root: loading kmods from internal overlay
[ 10.541285] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[ 10.562273] block: extroot: not configured
[ 10.594243] mount_root: switching to jffs2 overlay
[ 10.901140] UBI: attaching mtd8 to ubi1
[ 11.471583] UBI: scanning is finished
[ 11.497727] UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 2, need 12
[ 11.509519] UBI: attached mtd8 (name "syscfg", size 38 MiB) to ubi1
[ 11.515871] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 11.522745] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 11.529633] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 11.536582] UBI: good PEBs: 296, bad PEBs: 8, corrupted PEBs: 0
[ 11.542573] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 11.549740] UBI: max/mean erase counter: 13/10, WL threshold: 4096, image sequence number: 1344184781
[ 11.559047] UBI: available PEBs: 0, total reserved PEBs: 296, PEBs reserved for bad PEB handling: 2
[ 11.568241] UBI: background thread "ubi_bgt1d" started, PID 473
[ 11.598573] UBIFS: background thread "ubifs_bgt1_0" started, PID 478
[ 11.946644] UBIFS: mounted UBI device 1, volume 0, name "syscfg"
[ 11.952739] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 11.961954] UBIFS: FS size: 35680256 bytes (34 MiB, 281 LEBs), journal size 1777664 bytes (1 MiB, 14 LEBs)
[ 11.971687] UBIFS: reserved for root: 1685265 bytes (1645 KiB)
[ 11.977552] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 74FC1652-AEE4-415E-A3DD-C3A6E6830FA9, small LPT model
[ 12.006853] procd: - early -
[ 12.718480] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 12.726788] procd: - ubus -
[ 12.759308] EXT4-fs (sda1): mounted filesystem without journal. Opts:
[ 13.735561] procd: - init -
[ 14.854082] NET: Registered protocol family 10
[ 14.872783] tun: Universal TUN/TAP device driver, 1.6
[ 14.877873] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 14.887594] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 14.901881] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[ 14.909837] Backport generated by backports.git backports-20150129-0-gdd4a670
[ 14.926170] cfg80211: Calling CRDA to update world regulatory domain
[ 14.932786] cfg80211: World regulatory domain updated:
[ 14.937958] cfg80211: DFS Master region: unset
[ 14.942447] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 14.952305] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 14.960368] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 14.968444] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 14.976526] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 14.984613] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 14.994178] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 15.002342] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 15.010379] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 15.020164] i2c /dev entries driver
[ 15.112211] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 15.127952] nf_conntrack version 0.5.0 (3989 buckets, 15956 max)
[ 16.221585] rtc-mv f1010300.rtc: internal RTC not ticking
[ 16.268330] xt_time: kernel timezone is -0000
[ 16.283069] PPP generic driver version 2.4.2
[ 16.288739] NET: Registered protocol family 24
[ 17.301585] rtc-mv f1010300.rtc: internal RTC not ticking
[ 18.341585] rtc-mv f1010300.rtc: internal RTC not ticking
[ 19.381584] rtc-mv f1010300.rtc: internal RTC not ticking
[ 23.451957] device eth0 entered promiscuous mode
[ 23.458288] br-lan: port 1(eth0) entered forwarding state
[ 23.463800] br-lan: port 1(eth0) entered forwarding state
[ 23.483986] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 24.432113] br-lan: port 1(eth0) entered disabled state
[ 25.441610] mvneta f1070000.ethernet eth0: link up
[ 25.446464] br-lan: port 1(eth0) entered forwarding state
[ 25.451981] br-lan: port 1(eth0) entered forwarding state
[ 25.481642] mvneta f1074000.ethernet eth1: link up
[ 25.486492] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 27.451534] br-lan: port 1(eth0) entered forwarding state