OpenWrt 17+ versions on a GoFlexNet, but configuration and data is lost at every reboot. How to correctly install newer OpenWrt versions on GoFlex Net?

Hello everyone,

an update: after restoring the original GoFlex Net firmware and installing again OpenWrt 18.06.1 on my GoFlex Net, I am still stuck with the problem of loosing data/configurations after reboot.

Btw, I was able to solve the "ubi"-related error "UBI error: cannot attach mtd3" by formatting the mtd3 partition in the OpenWrt console, giving the commands "ubiformat /dev/mtd0". I'm not sure about what I did, to be sincere, but I have not that error anymore when booting. But I have still the same problem of loosing data on reboot.

I ran out of ideas...
I don't know why it is not working...

Anyone can help me?

I think you may find those files here: https://dwaves.org/2015/03/30/hacking-seagate-freeagent-goflex-net-as-nas-with-debian-or-openwrt/

(the link of the jffs2 image is malformed, here is the corrected link: https://dwaves.org/software/recovery/SeagateGoFlexNet/openwrt-kirkwood-generic-jffs2-nand-2048-128k.img)

1 Like

Thanks for the pointers.

I managed to download

openwrt-kirkwood-generic-jffs2-nand-2048-128k.img

and

openwrt-kirkwood-uImage

The filenames are slightly different so am not sure if they refer to the same files.

I can't help but wonder why the guide does not include a direct link to these files or at least show their sizes or dates...

I'm concerned that these may not be the correct versions and that I may brick my device.

Hello again,

I am still trying to understand what is not working here.
An update: I re-flashed the kernel (uBoot) and the OS (sysupdate) images, to the adresses/partitions 0x100000/mtd1/"kernel", and 0x500000/mtd2/"rootfs". I have also another patition "data"/mtd3 at 0x2500000.
The result is the same: I continue loosing configurations and data after a reboot, even after having solved the error I was getting with ubi (which now attaches mtd3 partition as ubi0 - but maybe that doesn't mean that the partition is mounted).

My hypotesis is that the "data"/mtd3 partition is not mounted. As far as I understood, the data partition is mounted with "rootfs" partition using an "overlayfs" filesystem. For some reason this is not happening. In fact, the "df" command shows no sign of the expected 219MB of the data partition:

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   57.2M      7.2M     50.0M  13% /
tmpfs                    60.2M     72.0K     60.1M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev

Any idea of what is happening?
Some hypothesis I've got are:

  • the UBI is somehow interfering with the correct behavior of the OS (UBI coming from a previous OpenWrt 15.05 installation using UBIfs) and needs to be disabled
  • there is some part of the system which is read-only
  • the system is loaded only in RAM and data are stored in RAM and not on the permanent memory (thus being entirely volatile)

The next steps I will try:

  • install again OpenWrt 15.05.1 as from the guide on the OpenWrt GoFlex Net page, and notice the differences with the 17+ OpenWrt installation
  • try to disable UBIfs and install again OpenWrt 17+

Any other ideas?

Ok, I already did this:

The differences I am noticing are the following:

  • there is a line more in the kernel boot saying that also "orion_nand" has no squashfs
[    0.789683] 4 cmdlinepart partitions found on MTD device orion_nand
[    0.795976] Creating 4 MTD partitions on "orion_nand":
[    0.801156] 0x000000000000-0x000000100000 : "u-boot"
[    0.806897] 0x000000100000-0x000000500000 : "kernel"
[    0.812602] 0x000000500000-0x000002500000 : "rootfs"
[    0.818259] mtd: device 2 (rootfs) set to be root filesystem
[    0.824066] mtdsplit: no squashfs found in "rootfs"
[    0.829070] mtdsplit: no squashfs found in "orion_nand"
[    0.834328] 0x000002500000-0x000010000000 : "data"
  • the UBI system attaches the "rootfs" partition instead of the "data" partition as ubi0
[    1.025678] UBI: attaching mtd2 to ubi0
[    1.088180] UBI: scanning is finished
[    1.103686] UBI: attached mtd2 (name "rootfs", size 32 MiB) to ubi0
[    1.110011] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.116830] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.123488] UBI: VID header offset: 512 (aligned 512), data offset: 2048
[    1.130227] UBI: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
[    1.136170] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[    1.143343] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[    1.151652] UBI: available PEBs: 0, total reserved PEBs: 256, PEBs reserved for bad PEB handling: 40
[    1.161013] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    1.168380] UBI: background thread "ubi_bgt0d" started, PID 779
[    1.202036] UBIFS: background thread "ubifs_bgt0_0" started, PID 784
[    1.288370] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    1.294432] UBIFS: LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    1.303619] UBIFS: FS size: 25933824 bytes (24 MiB, 201 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
[    1.313321] UBIFS: reserved for root: 0 bytes (0 KiB)
[    1.318398] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 910BF25D-BEAF-40CE-B84A-3220E8E2EAC5, small LPT model
[    1.329816] VFS: Mounted root (ubifs filesystem) on device 0:10.
  • there is an operation called "mount_root"
[    4.650148] mount_root: mounting /dev/root

The df -hT command gives this output:

root@OpenWrt:/# df -hT

Filesystem           Type            Size      Used Available Use% Mounted on
rootfs               rootfs         22.6M      3.6M     19.0M  16% /
ubi0:rootfs          ubifs          22.6M      3.6M     19.0M  16% /
tmpfs                tmpfs          61.1M    912.0K     60.2M   1% /tmp
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev

So, still no "data" partition and no sign of the 219MB of such partition, which is weird to me... but configuration and data are saved after a reboot...

Here is the output of the "mount" command:

root@OpenWrt:/# mount

rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,noatime)
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)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

I am really puzzled...

Anyone can help here?

At first glance, you'll need to look at the partitioning of the device, as well as board-specific scripts to mount "other" partitions.

That mtdsplit doesn't find a squashfs file system isn't a problem by itself -- it may be within the UBI bundle as another volume. To resolve this you may need to look into how your device is partitioned (.dts and .dtsi files) and how the image is composed (./target/linux/<platform>/image/Makefile)

What does ls /dev/ubi* show?

I'm not sure what the "data" partition is. Assuming it is the "data to be shared" then it can be mounted with fstab or the like. It could also be handled in an appropriate .target/linux/<platform>/base-files/etc/board.d/ file or similar.


Edit:

Looking at your mounts, you're writing directly to what would ordinarily be a read-only ROM.

ubi0:rootfs on / type ubifs (rw,noatime)

A "more typical" set of mounts would have an overlay filesystem, r/w, over a r/o ROM

Hello jeff,

thanks for your reply.

I will try the steps you wrote about and let you know if it works.

About your edit:

Looking at your mounts, you're writing directly to what would ordinarily be a read-only ROM.

ubi0:rootfs on / type ubifs (rw,noatime)

A "more typical" set of mounts would have an overlay filesystem, r/w, over a r/o ROM

Be careful: those are partitions from the OpenWrt 15.05.1 version, which works normally (i.e., configuration and data are actually saved after each reboot) :slight_smile:

I will post here and in the first post the output of "mount" command from OpenWrt 17+ versions.

1 Like

Anyone can help here? :frowning:

2 posts were split to a new topic: Installing OpenWrt on a GoFlexNet device