We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Added a persistent, user partition to the Omega2+ firmware



  • According to the Omega Firmware Changelog the v0.3.2 b225 firmvare has got a 512 KiB persistent, user partition.
    It's mounted on /mnt/mtdblock7 and it's using jffs2 filesystem.

    Persistent: every files of the /mnt/mtdblock7/ directory is able to survive any system restore process (firstboot, long RESET BUTTON press, to enter failsafe mode) and any system up or downgrade (between b225 and newer FWs of course).

    # Omega2+ v0.3.2 b225
    
    root@Omega-5BE1:/# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00030000 00010000 "u-boot"
    mtd1: 00010000 00010000 "u-boot-env"
    mtd2: 00010000 00010000 "factory"
    mtd3: 01f30000 00010000 "firmware"
    mtd4: 0017ff78 00010000 "kernel"
    mtd5: 01db0088 00010000 "rootfs"
    mtd6: 01610000 00010000 "rootfs_data"
    mtd7: 00080000 00010000 "user"
    
    
    root@Omega-5BE1:/# fdisk -l /dev/mtdblock7
    Disk /dev/mtdblock7: 512 KiB, 524288 bytes, 1024 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    root@Omega-5BE1:/# mount | grep ^/dev/mtdblock7
    /dev/mtdblock7 on /mnt/mtdblock7 type jffs2 (rw,relatime)
    

    @Lazar-Demin
    The up/downgrade to b225 or b226 is successful but there are a few error messages in the Serial Console log.

    System upgrade with oupgrade -l -f from b225 to b226

    # Omega2+ v0.3.2 b225
    
    root@Omega-5BE1:/# oupgrade -l -f
    > Device Firmware Version: 0.3.2 b225
    > Checking latest version online...
    url: https://api.onioniot.com/firmware/omega2p/latest
    > Repo Firmware Version: 0.3.2 b226
    > New firmware version available, need to upgrade device firmware
    > Downloading new firmware ...
    --2019-07-20 14:28:26--  http://repo.onioniot.com/omega2/images/omega2p-v0.3.2-b226.bin
    Resolving repo.onioniot.com... 52.216.139.218
    Connecting to repo.onioniot.com|52.216.139.218|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 9699504 (9.2M) [application/octet-stream]
    Saving to: '/tmp/omega2p-v0.3.2-b226.bin'
    
    /tmp/omega2p-v0.3.2 100%[===================>]   9.25M  1.65MB/s    in 5.9s    
    
    2019-07-20 14:28:32 (1.56 MB/s) - '/tmp/omega2p-v0.3.2-b226.bin' saved [9699504/9699504]
    
    > Starting firmware upgrade....
    Saving config files...
    Commencing upgrade. Closing all shell sessions.
    Watchdog handover: fd=3
    - watchdog -
    killall: telnetd: no process killed
    Sending TERM to remaining processes ... logd rpcd blockd netifd odhcpd uhttpd onion-helper avahi-daemon mosquitto dnsmasq ntpd shellinaboxd ap_client ubusd 
    Sending KILL to remaining processes ... 
    Switching to ramdisk...
    mount: mounting /dev/mtdblock6 on /overlay failed: Resource busy
    [14137.489990] BUG: Dentry 879f4880{i=65,n=banner}  still in use (1) [unmount of jffs2 jffs2]
    [14137.498379] ------------[ cut here ]------------
    [14137.503166] WARNING: CPU: 0 PID: 3266 at fs/dcache.c:1502 umount_check+0x78/0x90
    [14137.510732] Modules linked in: pppoe ppp_async option w1_therm w1_gpio uvcvideo usb_wwan snd_usb_audio pppox ppp_generic pl2303 nf_conntrack_ipv6 lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio cp210x ch341 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD wire videobuf2_v4l2 usbserial usblp usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uinput spidev snd_usbmidi_lib slhc rfcomm pwm_mediatek_ramips nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo_decompress lzo_compress iptable_mangle
    [14137.582550]  iptable_filter ip_tables hwmon hidp hid_generic hci_uart crc_ccitt cdc_acm btusb btintel bnep bluetooth p44_ledchain snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s snd_soc_wm8960 videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev snd_soc_core mt_wifi ralink_gdma virt_dma ledtrig_oneshot ledtrig_morse ledtrig_heartbeat ledtrig_gpio ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfs msdos snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd input_core soundcore vfat fat ntfs lockd sunrpc grace configfs autofs4 nls_utf8 nls_iso8859_1 nls_cp437 regmap_spi regmap_i2c dma_shared_buffer ecdh_generic kpp ecb cmac crypto_acompress
    [14137.654878]  mmc_block usb_storage sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ledtrig_transient ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc16 aead crypto_null cryptomgr crc32c_generic crypto_hash
    [14137.681081] CPU: 0 PID: 3266 Comm: busybox Not tainted 4.14.81 #0
    [14137.687260] Stack : 804d3660 803adeb4 00000000 00000000 80416e04 85e81d24 87c218dc 80471967
    [14137.695799]         80412aec 00000cc2 804d3660 000005de 00000001 804d0000 85e81cd8 75f364ec
    [14137.704304]         00000000 00000000 804d0000 0000013e 00000000 65746e69 2e342064 382e3431
    [14137.712850]         7263206c 00200014 ffffff80 6f747079 80000000 00000000 800e6394 8041e664
    [14137.721361]         00000009 000005de 00000001 00000000 00000000 801f0048 001b3a1f 001b3a5f
    [14137.729856]         ...
    [14137.732338] Call Trace:
    [14137.734847] [<8000e624>] show_stack+0x74/0x104
    [14137.739389] [<80025700>] __warn+0x110/0x118
    [14137.743635] [<8002579c>] warn_slowpath_null+0x1c/0x30
    [14137.748802] [<800e6394>] umount_check+0x78/0x90
    [14137.753439] [<800e504c>] d_walk+0x104/0x1e8
    [14137.757718] [<800e6184>] do_one_tree+0x2c/0x44
    [14137.762247] [<800e6660>] shrink_dcache_for_umount+0x48/0x84
    [14137.767944] [<800d142c>] generic_shutdown_super+0x24/0xfc
    [14137.773450] [<80211eb4>] kill_mtd_super+0x14/0x30
    [14137.778239] [<80143adc>] jffs2_kill_sb+0x3c/0x54
    [14137.782940] [<800d1a2c>] deactivate_locked_super+0x50/0x98
    [14137.788522] [<800ed848>] cleanup_mnt+0x54/0x78
    [14137.793131] [<8003c378>] task_work_run+0x90/0xc8
    [14137.797824] [<80009510>] work_notifysig+0x10/0x18
    [14137.802640] ---[ end trace 019df5132d9841ef ]---
    [14137.807332] BUG: Dentry 879f7a18{i=73,n=libiwinfo.so}  still in use (1) [unmount of jffs2 jffs2]
    [14137.816285] ------------[ cut here ]------------
    [14137.820993] WARNING: CPU: 0 PID: 3266 at fs/dcache.c:1502 umount_check+0x78/0x90
    [14137.828486] Modules linked in: pppoe ppp_async option w1_therm w1_gpio uvcvideo usb_wwan snd_usb_audio pppox ppp_generic pl2303 nf_conntrack_ipv6 lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio cp210x ch341 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD wire videobuf2_v4l2 usbserial usblp usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uinput spidev snd_usbmidi_lib slhc rfcomm pwm_mediatek_ramips nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo_decompress lzo_compress iptable_mangle
    [14137.900394]  iptable_filter ip_tables hwmon hidp hid_generic hci_uart crc_ccitt cdc_acm btusb btintel bnep bluetooth p44_ledchain snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s snd_soc_wm8960 videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev snd_soc_core mt_wifi ralink_gdma virt_dma ledtrig_oneshot ledtrig_morse ledtrig_heartbeat ledtrig_gpio ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfs msdos snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd input_core soundcore vfat fat ntfs lockd sunrpc grace configfs autofs4 nls_utf8 nls_iso8859_1 nls_cp437 regmap_spi regmap_i2c dma_shared_buffer ecdh_generic kpp ecb cmac crypto_acompress
    [14137.972691]  mmc_block usb_storage sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ledtrig_transient ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc16 aead crypto_null cryptomgr crc32c_generic crypto_hash
    [14137.998925] CPU: 0 PID: 3266 Comm: busybox Tainted: G        W       4.14.81 #0
    [14138.006365] Stack : 804d3660 803adeb4 00000000 00000000 80416e04 85e81d24 87c218dc 80471967
    [14138.014899]         80412aec 00000cc2 804d3660 000005de 00000001 804d0000 85e81cd8 75f364ec
    [14138.023408]         00000000 00000000 804d0000 0000015b 00000000 20202020 34312e34 2031382e
    [14138.031907]         7263206c 03bf0000 f8000000 6f747079 80000000 00000000 800e6394 8041e664
    [14138.040407]         00000009 000005de 00000001 00000000 00000002 801f0048 00000000 804d0000
    [14138.048893]         ...
    [14138.051386] Call Trace:
    [14138.053895] [<8000e624>] show_stack+0x74/0x104
    [14138.058472] [<80025700>] __warn+0x110/0x118
    [14138.062778] [<8002579c>] warn_slowpath_null+0x1c/0x30
    [14138.067907] [<800e6394>] umount_check+0x78/0x90
    [14138.072568] [<800e504c>] d_walk+0x104/0x1e8
    [14138.076818] [<800e6184>] do_one_tree+0x2c/0x44
    [14138.081345] [<800e6660>] shrink_dcache_for_umount+0x48/0x84
    [14138.087008] [<800d142c>] generic_shutdown_super+0x24/0xfc
    [14138.092505] [<80211eb4>] kill_mtd_super+0x14/0x30
    [14138.097292] [<80143adc>] jffs2_kill_sb+0x3c/0x54
    [14138.102075] [<800d1a2c>] deactivate_locked_super+0x50/0x98
    [14138.107658] [<800ed848>] cleanup_mnt+0x54/0x78
    [14138.112232] [<8003c378>] task_work_run+0x90/0xc8
    [14138.116934] [<80009510>] work_notifysig+0x10/0x18
    [14138.121756] ---[ end trace 019df5132d9841f0 ]---
    [14138.126447] BUG: Dentry 879f7660{i=6f,n=iwinfo.rt}  still in use (1) [unmount of jffs2 jffs2]
    [14138.135103] ------------[ cut here ]------------
    [14138.139799] WARNING: CPU: 0 PID: 3266 at fs/dcache.c:1502 umount_check+0x78/0x90
    [14138.147292] Modules linked in: pppoe ppp_async option w1_therm w1_gpio uvcvideo usb_wwan snd_usb_audio pppox ppp_generic pl2303 nf_conntrack_ipv6 lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio cp210x ch341 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD wire videobuf2_v4l2 usbserial usblp usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uinput spidev snd_usbmidi_lib slhc rfcomm pwm_mediatek_ramips nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo_decompress lzo_compress iptable_mangle
    [14138.219187]  iptable_filter ip_tables hwmon hidp hid_generic hci_uart crc_ccitt cdc_acm btusb btintel bnep bluetooth p44_ledchain snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s snd_soc_wm8960 videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev snd_soc_core mt_wifi ralink_gdma virt_dma ledtrig_oneshot ledtrig_morse ledtrig_heartbeat ledtrig_gpio ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfs msdos snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd input_core soundcore vfat fat ntfs lockd sunrpc grace configfs autofs4 nls_utf8 nls_iso8859_1 nls_cp437 regmap_spi regmap_i2c dma_shared_buffer ecdh_generic kpp ecb cmac crypto_acompress
    [14138.291418]  mmc_block usb_storage sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ledtrig_transient ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc16 aead crypto_null cryptomgr crc32c_generic crypto_hash
    [14138.317560] CPU: 0 PID: 3266 Comm: busybox Tainted: G        W       4.14.81 #0
    [14138.325032] Stack : 804d3660 803adeb4 00000000 00000000 80416e04 85e81d24 87c218dc 80471967
    [14138.333544]         80412aec 00000cc2 804d3660 000005de 00000001 804d0000 85e81cd8 75f364ec
    [14138.342043]         00000000 00000000 804d0000 00000178 00000000 20202020 34312e34 2031382e
    [14138.350541]         7263206c 03bf0000 f8000000 6f747079 80000000 00000000 800e6394 8041e664
    [14138.359029]         00000009 000005de 00000001 00000000 00000002 801f0048 001b7d9f 001b7ddf
    [14138.367562]         ...
    [14138.370060] Call Trace:
    [14138.372568] [<8000e624>] show_stack+0x74/0x104
    [14138.377097] [<80025700>] __warn+0x110/0x118
    [14138.381401] [<8002579c>] warn_slowpath_null+0x1c/0x30
    [14138.386555] [<800e6394>] umount_check+0x78/0x90
    [14138.391193] [<800e504c>] d_walk+0x104/0x1e8
    [14138.395436] [<800e6184>] do_one_tree+0x2c/0x44
    [14138.399952] [<800e6660>] shrink_dcache_for_umount+0x48/0x84
    [14138.405614] [<800d142c>] generic_shutdown_super+0x24/0xfc
    [14138.411175] [<80211eb4>] kill_mtd_super+0x14/0x30
    [14138.415964] [<80143adc>] jffs2_kill_sb+0x3c/0x54
    [14138.420689] [<800d1a2c>] deactivate_locked_super+0x50/0x98
    [14138.426306] [<800ed848>] cleanup_mnt+0x54/0x78
    [14138.430857] [<8003c378>] task_work_run+0x90/0xc8
    [14138.435548] [<80009510>] work_notifysig+0x10/0x18
    [14138.440331] ---[ end trace 019df5132d9841f1 ]---
    [14138.446525] VFS: Busy inodes after unmount of jffs2. Self-destruct in 5 seconds.  Have a nice day...
    Performing system upgrade...
    Unlocking firmware ...
    
    Writing from <stdin> to firmware ...     
    Appending jffs2 data from /tmp/sysupgrade.tgz to firmware..
    .
    Writing from <stdin> to firmware ...     
    Upgrade completed
    Rebooting system...
    umount: can't unmount /dev: Resource busy
    umount: can't unmount /tmp: Resource busy
    [14211.668365] reboot: Restarting system
     ...
    

    System upgrade with sysupgrade from b225 to b226

    # Omega2+ v0.3.2 b225
    
    root@Omega-5BE1:/# cd /tmp
    root@Omega-5BE1:/tmp# sysupgrade omega2p-v0.3.2-b226.bin
    Saving config files...
    Commencing upgrade. Closing all shell sessions.
    Watchdog handover: fd=3
    - watchdog -
    killall: telnetd: no process killed
    Sending TERM to remaining processes ... logd rpcd blockd netifd odhcpd uhttpd onion-helper avahi-daemon mosquitto ntpd dnsmasq shellinaboxd ap_client ubusd 
    Sending KILL to remaining processes ... 
    Switching to ramdisk...
    mount: mounting /dev/mtdblock6 on /overlay failed: Resource busy
    [  505.951100] BUG: Dentry 87973aa0{i=63,n=banner}  still in use (1) [unmount of jffs2 jffs2]
    [  505.959647] ------------[ cut here ]------------
    [  505.964405] WARNING: CPU: 0 PID: 2579 at fs/dcache.c:1502 umount_check+0x78/0x90
    [  505.971944] Modules linked in: pppoe ppp_async option w1_therm w1_gpio uvcvideo usb_wwan snd_usb_audio pppox ppp_generic pl2303 nf_conntrack_ipv6 lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio cp210x ch341 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD wire videobuf2_v4l2 usbserial usblp usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uinput spidev snd_usbmidi_lib slhc rfcomm pwm_mediatek_ramips nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo_decompress lzo_compress iptable_mangle
    [  506.043817]  iptable_filter ip_tables hwmon hidp hid_generic hci_uart crc_ccitt cdc_acm btusb btintel bnep bluetooth p44_ledchain snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s snd_soc_wm8960 videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev snd_soc_core mt_wifi ralink_gdma virt_dma ledtrig_oneshot ledtrig_morse ledtrig_heartbeat ledtrig_gpio ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfs msdos snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd input_core soundcore vfat fat ntfs lockd sunrpc grace configfs autofs4 nls_utf8 nls_iso8859_1 nls_cp437 regmap_spi regmap_i2c dma_shared_buffer ecdh_generic kpp ecb cmac crypto_acompress
    [  506.116072]  mmc_block usb_storage sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ledtrig_transient ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc16 aead crypto_null cryptomgr crc32c_generic crypto_hash
    [  506.142250] CPU: 0 PID: 2579 Comm: busybox Not tainted 4.14.81 #0
    [  506.148454] Stack : 804d3660 803adeb4 00000000 00000000 80416e04 85d89d24 85d8cddc 80471967
    [  506.157011]         80412aec 00000a13 804d3660 000005de 00000001 804d0000 85d89cd8 eb1726f2
    [  506.165540]         00000000 00000000 804d0000 0000013e 00000000 65746e69 2e342064 382e3431
    [  506.174059]         7263206c 00200016 ffffff80 6f747079 80000000 00000000 800e6394 8041e664
    [  506.182587]         00000009 000005de 00000001 00000000 00000000 801f0048 00000000 804d0000
    [  506.191092]         ...
    [  506.193574] Call Trace:
    [  506.196084] [<8000e624>] show_stack+0x74/0x104
    [  506.200615] [<80025700>] __warn+0x110/0x118
    [  506.204878] [<8002579c>] warn_slowpath_null+0x1c/0x30
    [  506.210003] [<800e6394>] umount_check+0x78/0x90
    [  506.214629] [<800e504c>] d_walk+0x104/0x1e8
    [  506.218873] [<800e6184>] do_one_tree+0x2c/0x44
    [  506.223393] [<800e6660>] shrink_dcache_for_umount+0x48/0x84
    [  506.229054] [<800d142c>] generic_shutdown_super+0x24/0xfc
    [  506.234552] [<80211eb4>] kill_mtd_super+0x14/0x30
    [  506.239383] [<80143adc>] jffs2_kill_sb+0x3c/0x54
    [  506.244097] [<800d1a2c>] deactivate_locked_super+0x50/0x98
    [  506.249712] [<800ed848>] cleanup_mnt+0x54/0x78
    [  506.254262] [<8003c378>] task_work_run+0x90/0xc8
    [  506.259028] [<80009510>] work_notifysig+0x10/0x18
    [  506.264004] ---[ end trace 53e2a5dcbf11d50c ]---
    [  506.268702] BUG: Dentry 879f7a18{i=71,n=libiwinfo.so}  still in use (1) [unmount of jffs2 jffs2]
    [  506.277685] ------------[ cut here ]------------
    [  506.282395] WARNING: CPU: 0 PID: 2579 at fs/dcache.c:1502 umount_check+0x78/0x90
    [  506.289888] Modules linked in: pppoe ppp_async option w1_therm w1_gpio uvcvideo usb_wwan snd_usb_audio pppox ppp_generic pl2303 nf_conntrack_ipv6 lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio cp210x ch341 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD wire videobuf2_v4l2 usbserial usblp usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uinput spidev snd_usbmidi_lib slhc rfcomm pwm_mediatek_ramips nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo_decompress lzo_compress iptable_mangle
    [  506.361724]  iptable_filter ip_tables hwmon hidp hid_generic hci_uart crc_ccitt cdc_acm btusb btintel bnep bluetooth p44_ledchain snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s snd_soc_wm8960 videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev snd_soc_core mt_wifi ralink_gdma virt_dma ledtrig_oneshot ledtrig_morse ledtrig_heartbeat ledtrig_gpio ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfs msdos snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd input_core soundcore vfat fat ntfs lockd sunrpc grace configfs autofs4 nls_utf8 nls_iso8859_1 nls_cp437 regmap_spi regmap_i2c dma_shared_buffer ecdh_generic kpp ecb cmac crypto_acompress
    [  506.433948]  mmc_block usb_storage sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ledtrig_transient ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc16 aead crypto_null cryptomgr crc32c_generic crypto_hash
    [  506.460128] CPU: 0 PID: 2579 Comm: busybox Tainted: G        W       4.14.81 #0
    [  506.467574] Stack : 804d3660 803adeb4 00000000 00000000 80416e04 85d89d24 85d8cddc 80471967
    [  506.476077]         80412aec 00000a13 804d3660 000005de 00000001 804d0000 85d89cd8 eb1726f2
    [  506.484609]         00000000 00000000 804d0000 0000015b 00000000 20202020 34312e34 2031382e
    [  506.493115]         7263206c 03bf0000 f8000000 6f747079 80000000 00000000 800e6394 8041e664
    [  506.501611]         00000009 000005de 00000001 00000000 00000002 801f0048 00000000 804d0000
    [  506.510095]         ...
    [  506.512623] Call Trace:
    [  506.515134] [<8000e624>] show_stack+0x74/0x104
    [  506.519661] [<80025700>] __warn+0x110/0x118
    [  506.523930] [<8002579c>] warn_slowpath_null+0x1c/0x30
    [  506.529057] [<800e6394>] umount_check+0x78/0x90
    [  506.533680] [<800e504c>] d_walk+0x104/0x1e8
    [  506.537926] [<800e6184>] do_one_tree+0x2c/0x44
    [  506.542442] [<800e6660>] shrink_dcache_for_umount+0x48/0x84
    [  506.548173] [<800d142c>] generic_shutdown_super+0x24/0xfc
    [  506.553687] [<80211eb4>] kill_mtd_super+0x14/0x30
    [  506.558522] [<80143adc>] jffs2_kill_sb+0x3c/0x54
    [  506.563234] [<800d1a2c>] deactivate_locked_super+0x50/0x98
    [  506.568876] [<800ed848>] cleanup_mnt+0x54/0x78
    [  506.573438] [<8003c378>] task_work_run+0x90/0xc8
    [  506.578130] [<80009510>] work_notifysig+0x10/0x18
    [  506.582925] ---[ end trace 53e2a5dcbf11d50d ]---
    [  506.587645] BUG: Dentry 879f7660{i=6d,n=iwinfo.rt}  still in use (1) [unmount of jffs2 jffs2]
    [  506.596336] ------------[ cut here ]------------
    [  506.601044] WARNING: CPU: 0 PID: 2579 at fs/dcache.c:1502 umount_check+0x78/0x90
    [  506.608536] Modules linked in: pppoe ppp_async option w1_therm w1_gpio uvcvideo usb_wwan snd_usb_audio pppox ppp_generic pl2303 nf_conntrack_ipv6 lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio cp210x ch341 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD wire videobuf2_v4l2 usbserial usblp usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uinput spidev snd_usbmidi_lib slhc rfcomm pwm_mediatek_ramips nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo_decompress lzo_compress iptable_mangle
    [  506.680415]  iptable_filter ip_tables hwmon hidp hid_generic hci_uart crc_ccitt cdc_acm btusb btintel bnep bluetooth p44_ledchain snd_soc_simple_card snd_soc_simple_card_utils snd_soc_ralink_i2s snd_soc_wm8960 videobuf2_vmalloc videobuf2_memops videobuf2_core hid v4l2_common videodev evdev snd_soc_core mt_wifi ralink_gdma virt_dma ledtrig_oneshot ledtrig_morse ledtrig_heartbeat ledtrig_gpio ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfs msdos snd_pcm_dmaengine snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd input_core soundcore vfat fat ntfs lockd sunrpc grace configfs autofs4 nls_utf8 nls_iso8859_1 nls_cp437 regmap_spi regmap_i2c dma_shared_buffer ecdh_generic kpp ecb cmac crypto_acompress
    [  506.752643]  mmc_block usb_storage sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ledtrig_transient ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc16 aead crypto_null cryptomgr crc32c_generic crypto_hash
    [  506.778870] CPU: 0 PID: 2579 Comm: busybox Tainted: G        W       4.14.81 #0
    [  506.786326] Stack : 804d3660 803adeb4 00000000 00000000 80416e04 85d89d24 85d8cddc 80471967
    [  506.794860]         80412aec 00000a13 804d3660 000005de 00000001 804d0000 85d89cd8 eb1726f2
    [  506.803366]         00000000 00000000 804d0000 00000178 00000000 20202020 34312e34 2031382e
    [  506.811861]         7263206c 03bf0000 f8000000 6f747079 80000000 00000000 800e6394 8041e664
    [  506.820347]         00000009 000005de 00000001 00000000 00000002 801f0048 001b7e5f 001b7e9f
    [  506.828848]         ...
    [  506.831339] Call Trace:
    [  506.833849] [<8000e624>] show_stack+0x74/0x104
    [  506.838379] [<80025700>] __warn+0x110/0x118
    [  506.842638] [<8002579c>] warn_slowpath_null+0x1c/0x30
    [  506.847763] [<800e6394>] umount_check+0x78/0x90
    [  506.852433] [<800e504c>] d_walk+0x104/0x1e8
    [  506.856681] [<800e6184>] do_one_tree+0x2c/0x44
    [  506.861246] [<800e6660>] shrink_dcache_for_umount+0x48/0x84
    [  506.866937] [<800d142c>] generic_shutdown_super+0x24/0xfc
    [  506.872443] [<80211eb4>] kill_mtd_super+0x14/0x30
    [  506.877292] [<80143adc>] jffs2_kill_sb+0x3c/0x54
    [  506.882019] [<800d1a2c>] deactivate_locked_super+0x50/0x98
    [  506.887599] [<800ed848>] cleanup_mnt+0x54/0x78
    [  506.892283] [<8003c378>] task_work_run+0x90/0xc8
    [  506.896979] [<80009510>] work_notifysig+0x10/0x18
    [  506.901782] ---[ end trace 53e2a5dcbf11d50e ]---
    [  506.907977] VFS: Busy inodes after unmount of jffs2. Self-destruct in 5 seconds.  Have a nice day...
    Performing system upgrade...
    Unlocking firmware ...
    
    Writing from <stdin> to firmware ...     
    Appending jffs2 data from /tmp/sysupgrade.tgz to firmware..
    .
    Writing from <stdin> to firmware ...     
    Upgrade completed
    Rebooting system...
    umount: can't unmount /dev: Resource busy
    umount: can't unmount /tmp: Resource busy
    [  580.001959] reboot: Restarting system
     ...
    

    Have a nice day... 😉



  • @György-Farkas thanks for the info. i'm not running that version firmware yet, but it got me to thinking about compression software. i know very little about what the max compression available with these compression tools but curious to know how large an uncompressed folder and all files and sub folders can be that would become a 500KB compressed file that would then be stored in mtd7 as a sort of backup. any idea if it would be an original size of 1MB or perhaps larger? thanks.



  • @Douglas-Kryder Sorry, I was too lazy to read any documentation. 😉

    Trial and Error
    I've split a "big" file into smaller pieces and copied them to the /mnt/mtdblock7/ directory.
    It seems we can write one (1) 500 KiB file or five (5) 100 KiB files and so on ... into it - safely.

    root@Omega-5BE1:~# ./busybox-mipsel split -b 500k -a 1 busybox-mipsel
    root@Omega-5BE1:~# ./busybox-mipsel split -b 100k -a 2 busybox-mipsel
    root@Omega-5BE1:~# ls -l
    -rwxr-xr-x    1 root     root       1629080 Jun 10 14:02 busybox-mipsel
    -rw-r--r--    1 root     root        512000 Jul 21 05:46 xa
    -rw-r--r--    1 root     root        512000 Jul 21 05:46 xb
     ...
    -rw-r--r--    1 root     root        102400 Jul 21 05:47 xaa
    -rw-r--r--    1 root     root        102400 Jul 21 05:47 xab
    -rw-r--r--    1 root     root        102400 Jul 21 05:47 xac
    -rw-r--r--    1 root     root        102400 Jul 21 05:47 xad
    -rw-r--r--    1 root     root        102400 Jul 21 05:47 xae
    -rw-r--r--    1 root     root        102400 Jul 21 05:47 xaf
     ...
    
    # ---------------------------------------------------------------------------------------
    root@Omega-5BE1:~# rm /mnt/mtdblock7/*
    
    root@Omega-5BE1:~# df -h
    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock7          512.0K    216.0K    296.0K  42% /mnt/mtdblock7 # it's empty
    
    root@Omega-5BE1:~# cp xa /mnt/mtdblock7/xa
    root@Omega-5BE1:~# df -h
    /dev/mtdblock7          512.0K    468.0K     44.0K  91% /mnt/mtdblock7 # it's almost full
    
    root@Omega-5BE1:~# ls -l /mnt/mtdblock7
    -rw-r--r--    1 root     root        512000 Jul 21 05:50 xa
    
    # ---------------------------------------------------------------------------------------
    root@Omega-5BE1:~# rm /mnt/mtdblock7/*
    
    root@Omega-5BE1:~# df -h
    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock7          512.0K    216.0K    296.0K  42% /mnt/mtdblock7 # it's empty
    
    root@Omega-5BE1:~# cp xaa /mnt/mtdblock7/xaa
    root@Omega-5BE1:~# df -h
    /dev/mtdblock7          512.0K    248.0K    264.0K  48% /mnt/mtdblock7
    root@Omega-5BE1:~# cp xab /mnt/mtdblock7/xab
    /dev/mtdblock7          512.0K    300.0K    212.0K  59% /mnt/mtdblock7
    root@Omega-5BE1:~# cp xac /mnt/mtdblock7/xac
    /dev/mtdblock7          512.0K    356.0K    156.0K  70% /mnt/mtdblock7
    root@Omega-5BE1:~# cp xad /mnt/mtdblock7/xad
    /dev/mtdblock7          512.0K    412.0K    100.0K  80% /mnt/mtdblock7
    root@Omega-5BE1:~# cp xae /mnt/mtdblock7/xae
    /dev/mtdblock7          512.0K    468.0K     44.0K  91% /mnt/mtdblock7 # it's almost full
    root@Omega-5BE1:~# cp xaf /mnt/mtdblock7/xaf
    cp: write error: No space left on device
    
    root@Omega-5BE1:~# ls -l /mnt/mtdblock7
    -rw-r--r--    1 root     root        102400 Jul 21 05:57 xaa
    -rw-r--r--    1 root     root        102400 Jul 21 05:57 xab
    -rw-r--r--    1 root     root        102400 Jul 21 05:58 xac
    -rw-r--r--    1 root     root        102400 Jul 21 05:58 xad
    -rw-r--r--    1 root     root        102400 Jul 21 05:58 xae
    -rw-r--r--    1 root     root         53248 Jul 21 05:58 xaf
    


  • @György-Farkas yeah, i was lazy also after i asked google and got results dealing with percentages. like ~50% to ~90%. i was thinking you may have some real world experience cause i do not. thank you for the response though.



  • @Douglas-Kryder
    The answer you will find universally for this questions is: "It depends." 😉
    Specifically, it depends on the "compressibility" of the source you are compressing.
    Some things compress well, eg. text
    Some things don't compress at all (or so little as to be meaningless): eg. compressed files

    Once you have a reasonably good idea about what you intend to store in the partition in a compressed format, you will have to do some trial and error to determine how well it compresses and whether or not it will fit.

    I don't think there's any other way to determine an answer to your question, but if there is, I'd be interested to know as well. 🙂



  • @cas @Douglas-Kryder
    Another trial and error.
    I've copied the random.txt file five times into the /mnt/mtdblock7/ directory.
    random.txt 100,000 characters, randomly selected from [a-z|A-Z|0-9|!| ] (alphabet size 64)

    root@Omega-5BE1:~# rm /mnt/mtdblock7/*
    root@Omega-5BE1:~# df -h
    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock7          512.0K    196.0K    316.0K  38% /mnt/mtdblock7 # empty
    
    root@Omega-5BE1:~# cp random.txt /mnt/mtdblock7/random1.txt
    /dev/mtdblock7          512.0K    272.0K    240.0K  53% /mnt/mtdblock7 # cut from df -h
    root@Omega-5BE1:~# cp random.txt /mnt/mtdblock7/random2.txt
    /dev/mtdblock7          512.0K    352.0K    160.0K  69% /mnt/mtdblock7
    root@Omega-5BE1:~# cp random.txt /mnt/mtdblock7/random3.txt
    /dev/mtdblock7          512.0K    432.0K     80.0K  84% /mnt/mtdblock7
    root@Omega-5BE1:~# cp random.txt /mnt/mtdblock7/random4.txt
    /dev/mtdblock7          512.0K    508.0K      4.0K  99% /mnt/mtdblock7 # almost full
    root@Omega-5BE1:~# cp random.txt /mnt/mtdblock7/random5.txt
    cp: write error: No space left on device
    /dev/mtdblock7          512.0K    512.0K         0 100% /mnt/mtdblock7 # full
    
    root@Omega-5BE1:~# ls -l /mnt/mtdblock7
    -rw-r--r--    1 root     root        100000 Jul 21 12:09 random1.txt
    -rw-r--r--    1 root     root        100000 Jul 21 12:09 random2.txt
    -rw-r--r--    1 root     root        100000 Jul 21 12:09 random3.txt
    -rw-r--r--    1 root     root        100000 Jul 21 12:10 random4.txt
    -rw-r--r--    1 root     root          4096 Jul 21 12:10 random5.txt
    

    Hmm...

    jffs2 - maybe wear-leveling and journalling are most important features than the file compressing.



  • @György-Farkas
    Is there supposed to be some level of compression built in there? I don't think so, but I haven't been following along to closely recently.

    fwiw, I understood @Douglas-Kryder 's question to be more along the lines of: Given a 500K persistent storage facility, how much of my data could I store there compressed as a backup.
    Apologies if I misunderstood.

    Anyway, that potential misunderstanding aside, looking at your figures regarding the persistent storage, I'm a bit confused with the values that you've posted.
    eg. Here:

    root@Omega-5BE1:~# rm /mnt/mtdblock7/*
    root@Omega-5BE1:~# df -h
    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock7          512.0K    196.0K    316.0K  38% /mnt/mtdblock7 # empty
    

    The size: 512.0K - That's ok
    The used: 196.0K - That's not empty

    So something looks off with that partition.



  • @cas You wrote:

    Is there supposed to be some level of compression built in there?

    Yes, I think so.
    See also in OpenWrt's Filesystems
    0_1564057975946_OpenWrt_docs_JFFF2.png

    About my second 'Trial and Error' example
    You wrote:

    The size: 512.0K - That's ok
    The used: 196.0K - That's not empty
    So something looks off with that partition.

    Unfortunately I don't know the jffs2 filesystem too well. (Frankly speaking I don't know it at all 😉
    I guess the "used 196.0K" on this "empty" mtd7 can be some kind of 'system administration area' - eg. for journalling and so.

    Please look at the 'Used / Available' figures during the whole process.
    It's quite funny interesting - isn't it?

    # cp random.txt (100,000 bytes) five times into/mnt/mtdblock7/
    # cut from the output of df -h
    Filesystem                Size      Used Available Use% Mounted on
    /dev/mtdblock7          512.0K    196.0K    316.0K  38% /mnt/mtdblock7 # empty
    /dev/mtdblock7          512.0K    272.0K    240.0K  53% /mnt/mtdblock7 # after cp the first file 
    /dev/mtdblock7          512.0K    352.0K    160.0K  69% /mnt/mtdblock7 # after cp the second file
    /dev/mtdblock7          512.0K    432.0K     80.0K  84% /mnt/mtdblock7 # after cp the third file
    /dev/mtdblock7          512.0K    508.0K      4.0K  99% /mnt/mtdblock7 # after cp the fourth file - almost full
    
    cp random.txt /mnt/mtdblock7/random5.txt
    cp: write error: No space left on device
    /dev/mtdblock7          512.0K    512.0K         0 100% /mnt/mtdblock7 # after cp the fifth file - full
    

    BTW I'm only interested on wear leweling now.



Looks like your connection to Community was lost, please wait while we try to reconnect.