What is the logic to mount overlay at booting?

Hi all,

[    9.919896] block: extroot: not configured
[    9.925195] mount_root: no usable overlay filesystem found, using tmpfs overlay
[    9.933388] mount_root: BUG: no suitable fs found

Check mount_root, it support mounting jffs2 for overlay. But it always fail to mount, why?

It is okay to mount with manual mount.

root@OmniVision OA8000-101c:~# mount -t jffs2 /dev/mtdblock2 /overlay/
cat /p[  229.062545] jffs2: notice: (1130) jffs2_build_xattr_subsystem: complete building xattr 
subsystem, 0 of xdatum (0 unchec.


root@OmniVision OA8000-101c:~# mount
none on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock4 on /etc/factory type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,erro)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
tmpfs on /mnt type tmpfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
/dev/mmcblk0p1 on /mnt type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=)
/dev/mtdblock2 on /overlay type jffs2 (rw,relatime)

Check partition name.

root@OmniVision OA8000-101c:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 01000000 00001000 "FW"
mtd1: 00032000 00001000 "Env"
mtd2: 00dbb000 00001000 "rootfs_data"
mtd3: 00010000 00001000 "WIFI"
mtd4: 00200000 00001000 "factory"

Any suggestion to resolve this issue? Thanks.

Any modifications (settings, passwords, ...) you make are stored on the overlay. Without the overlay no modification is possible. Possible causes for a broken overlay are often lack of space.

1 Like

Hi @Borromini

Thanks and do you know why my rootfs_data partition always fails to mount?

At ubifs, I know I have to create rootfs_data volume name for overlay partition.
At jffs2, I don't know how to create volume for my overlay partition.
Looks like this is the reason why fail to mount overly. Any suggestion? Thanks.

I use jffs2 as overlay file system.
At booting, device always fail to mount overlay. The log are

[    9.796357] jffs2: notice: (144) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orph.
[    9.812820] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[    9.820127] block: unable to load configuration (fstab: Entry not found)
[    9.827169] block: attempting to load /tmp/jffs_cfg/etc/config/fstab
[    9.833917] block: unable to load configuration (fstab: Entry not found)
[    9.840812] block: attempting to load /etc/config/fstab
[    9.846963] block: extroot: not configured
[   12.511919] jffs2: notice: (142) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orph.
[   13.174377] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   13.181559] block: unable to load configuration (fstab: Entry not found)
[   13.188678] block: attempting to load /tmp/jffs_cfg/etc/config/fstab
[   13.195454] block: unable to load configuration (fstab: Entry not found)
[   13.202360] block: attempting to load /etc/config/fstab
[   13.208619] block: extroot: not configured
[   13.215058] mount_root: overlay filesystem has not been fully initialized yet
[   13.223421] mount_root: switching to jffs2 overlay
[   13.231436] overlayfs: upper fs does not support tmpfile.
[   13.240871] mount_root: pivot_root failed /mnt /mnt/rom: Invalid argument
[   13.247968] mount_root: switching to jffs2 failed - fallback to ramoverlay
[   13.255582] mount_root: opening /proc/filesystems failed: No such file or directory
[   13.263532] mount_root: BUG: no suitable fs found

Anyone can help to debug which part is wrong? at kernel option or ? Please help. Thanks.