UBIFS mount twice at booting

Hi all,

At my own developing device with OpenWRT 19.07.10, the overlay with UBIFS can work well.
But from the log, you can see there are twice mount operation at UBIFS, why? anyone can help? Thanks.

found overlay partition and ubifs support
[    5.556810] ubi0: attaching mtd8
[    5.998778] ubi0: scanning is finished
[    6.019222] ubi0: attached mtd8 (name "rootfs_data", size 64 MiB)
[    6.031493] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    6.045264] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    6.058858] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    6.072777] ubi0: good PEBs: 514, bad PEBs: 0, corrupted PEBs: 0
[    6.084779] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    6.099209] ubi0: max/mean erase counter: 5/2, WL threshold: 4096, image sequence number: 960923688
[    6.117282] ubi0: available PEBs: 0, total reserved PEBs: 514, PEBs reserved for bad PEB handling: 20
[    6.135710] ubi0: background thread "ubi_bgt0d" started, PID 101
UBI device number 0, total 514 LEBs (65265664 bytes, 62.2 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
[    6.795614] mount_root: loading kmods from internal overlay
[    6.818087] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    6.832443] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    7.027016] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 141
[    7.069852] UBIFS (ubi0:0): recovery needed
[    7.198819] UBIFS (ubi0:0): recovery completed
[    7.207812] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs_data"
[    7.223467] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    7.243275] UBIFS (ubi0:0): FS size: 60948480 bytes (58 MiB, 480 LEBs), journal size 3047424 bytes (2 MiB, 24 LEBs)
[    7.264222] UBIFS (ubi0:0): reserved for root: 2878747 bytes (2811 KiB)
[    7.277457] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 674B670E-F1D9-4B25-89F3-F22CF8DB53D4, small LPT model
[    7.302191] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[    7.324073] block: extroot: not configured
[    7.343677] UBIFS (ubi0:0): un-mount UBI device 0
[    7.353179] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
[    7.398116] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 143
[    7.519268] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs_data"
[    7.534962] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    7.554774] UBIFS (ubi0:0): FS size: 60948480 bytes (58 MiB, 480 LEBs), journal size 3047424 bytes (2 MiB, 24 LEBs)
[    7.575626] UBIFS (ubi0:0): reserved for root: 2878747 bytes (2811 KiB)
[    7.588948] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 674B670E-F1D9-4B25-89F3-F22CF8DB53D4, small LPT model
[    7.616236] mount_root: loading kmods from internal overlay
[    7.638041] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[    7.656986] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[    7.784193] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[    7.803113] block: extroot: not configured
[    7.825539] mount_root: switching to ubifs overlay
      if (!mount_extroot()) {                                 
          ULOG_NOTE("switched to extroot\n");                      
          return 0;                                                              
      } 

Looks like this function will mount at first time?

Confirm mount_extroot is the key point. At my test, I try to remove mount_extroot and I can see only one mount UBIFS msg show up. Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.