Hello everyone,
I am quite new to the OpenWrt world, and I am trying to learn something. I've got a Seagate GoFlex Net to hack and let become a NAS. I was able to successfully installing OpenWrt 15.05.1 "Chaos Calmer" from here using serial and tftp, and everything works perfectly.
Now I am trying to update the OpenWrt version to 18, but I am experiencing some issues. I can use the "sysupgade" tool, as it is not implemented in version 15.05.1, so I am trying to flash the new OpenWrt version using the serial + tftp and following the guides here, here and here. I am able to have the new kernel + root image flashed on the device, and the system up and running! But... at each reboot I lose every configuration and data (I even have to set the root password "for the first time" after each reboot). This happens with any sysupgade or factory bin images in OpenWrt Download section I try to use.
Is there a way to flash/install newer versions of OpenWrt on the GoFlex Net, and avoid losing configuration and data at each reboot?
For analysing the situation, I installed OpenWrt 18.01 using the very same steps for installing OpenWrt 15.05.1 with UBIfs that can be found here. In the following you may find are the flash layout I've got, some errors I have at boot, the mounted volumes and disk space, etc.
cmd: mtdparts (from uBoot)
dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "kernel"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"
cmd: df -hT
Filesystem Type Size Used Available Use% Mounted on
rootfs rootfs 57.2M 7.2M 50.0M 13% /
tmpfs tmpfs 60.2M 72.0K 60.1M 0% /tmp
tmpfs tmpfs 512.0K 0 512.0K 0% /dev
Boot output (1)
...
[ 0.735912] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[ 0.742322] nand: Micron MT29F2G08AAD
[ 0.746002] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.753677] Scanning device for bad blocks
[ 0.974759] 4 cmdlinepart partitions found on MTD device orion_nand
[ 0.981056] Creating 4 MTD partitions on "orion_nand":
[ 0.986243] 0x000000000000-0x000000100000 : "u-boot"
[ 0.991789] 0x000000100000-0x000000500000 : "kernel"
[ 0.997265] 0x000000500000-0x000002500000 : "rootfs"
[ 1.002868] mtd: device 2 (rootfs) set to be root filesystem
[ 1.008653] mtdsplit: no squashfs found in "rootfs"
[ 1.013588] 0x000002500000-0x000010000000 : "data"
...
Boot output (2)
...
[ 2.282598] UBI: auto-attach mtd3
[ 2.285942] ubi0: attaching mtd3
[ 2.608426] ubi0: scanning is finished
[ 2.621574] ubi0 error: 0xc03d0e10: too large reserved_pebs 1964, good PEBs 1752
[ 2.629009] ubi0 error: 0xc03d0fb8: volume table check failed: record 0, error 9
[ 2.636449] Volume table record 0 dump:
[ 2.640296] reserved_pebs 1964
[ 2.643631] alignment 1
[ 2.646696] data_pad 0
[ 2.649757] vol_type 1
[ 2.652831] upd_marker 0
[ 2.655895] name_len 6
[ 2.658957] name rootfs
[ 2.662466] crc 0x48a1f8fb
[ 2.666697] ubi0 error: 0xc03d4fc0: failed to attach mtd3, error -22
[ 2.673135] UBI error: cannot attach mtd3
[ 2.677351] hctosys: unable to open rtc device (rtc0)
[ 2.700104] Freeing unused kernel memory: 6144K
...
the environment configuration:
setenv baudrate '115200'
setenv bootcmd '${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_usb}; bootm 0x6400000;'
setenv bootdelay '3'
setenv ethact 'egiga0'
setenv ethaddr 'xx:xx:xx:xx:xx:xx' (it's an example here)
setenv ipaddr '192.168.x.x' (same here)
setenv serverip '192.168.x.x' (and here)
setenv stderr 'serial'
setenv stdin 'serial'
setenv stdout 'serial'
setenv x_bootargs 'console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),4M@1M(kernel),32M@5M(rootfs),-(data) rw'
setenv x_bootargs_root 'ubi.mtd=2 rootfstype=ubifs'
setenv x_bootcmd_kernel 'nand read 0x6400000 0x100000 0x400000'
setenv x_bootcmd_usb 'usb start'
setenv machid c11
saveenv
reset
Thanks for all the help, and looking forward for learning something!