Welcome! Log In Create A New Profile

Advanced

revive Medion oxnas stg-212

Posted by alexinc 
Re: revive Medion oxnas stg-212
November 12, 2022 04:38PM
alexinc,

Try booting Debian rootfs again.

setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(ubi)'
setenv bootargs 'console=ttyS0,115200 $mtdparts'
tftpboot 0x60500000 uImage
bootm 0x60500000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
December 08, 2022 07:48AM
still no success... :-(

i even miserably fail in getting an debian rescue-hdd working, after reading hours of hours in here with creating partitions, different kernels, envs, "magic" startup code on first sectors, etc, etc by jumping between all the old posts from shv, WarheadsSE and yours of course. It's getting more and more confusing - although everyone writes it's unbrickable...

OX820 # setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(ubi)'
OX820 # setenv bootargs 'console=ttyS0,115200 $mtdparts'
OX820 # tftpboot 0x60500000 uImage
Speed: 1000, full duplex
Using dwmac.40400000 device
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uImage'.
Load address: 0x60500000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #########################################################
         3.4 MiB/s
done
Bytes transferred = 5596715 (55662b hex)
OX820 # bootm 0x60500000
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-5.4.210-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5596651 Bytes = 5.3 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted

Re: revive Medion oxnas stg-212
December 08, 2022 04:27PM
alexinc,

Try booting kernel 4.4.201.

Quote

Updated 16 Nov 2019:

Kernel linux-4.4.201-oxnas-tld-1 package was uploaded.

New/Update features:

- Pickup security patches from mainline.
- This kernel header now can be installed and used to build modules, without any special tweaks (this issue was described here).

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox

linux-4.4.201-oxnas-tld-1.bodhi.tar.bz2

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
March 17, 2023 12:37PM
Alright, after quite a messy time of try and error and getting back to real life things, i'm still trying to fight this box down once more. this time with the help of @schnee rescue hdd installer i'm getting to boot from hdd.
i changed kernel and uImage from pogoplug-classic to stg212, but still without success. as it still fails to decompress kernel, do i somehow need to erase complete nand?

still any help much appreciated! :)

###pogoplug-classic-kernel + uImage###
U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB   
IDE:   Bus 0: OK 
  Device 0: Model: ST1500DL003-9VT16L Firm: CC4A Ser#: 5YD5WQJS
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1430799.3 MB = 1397.2 GB (-1364690128 x 512)
NAND:  128 MiB   
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0
4102704 bytes read in 760 ms (5.1 MiB/s)
7033 bytes read in 17 ms (403.3 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x1b79 (7033)
off_dt_struct:          0x38
off_dt_strings:         0x18d4
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x2a5
size_dt_struct:         0x189c
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e26000, end 67e2ab78 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted
###stg212-kernel + uImage###
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img

U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB   
IDE:   Bus 0: OK 
  Device 0: Model: ST1500DL003-9VT16L Firm: CC4A Ser#: 5YD5WQJS
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1430799.3 MB = 1397.2 GB (-1364690128 x 512)
NAND:  128 MiB   
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0
4609927 bytes read in 769 ms (5.7 MiB/s)
9479 bytes read in 23 ms (402.3 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x2507 (9479)
off_dt_struct:          0x38
off_dt_strings:         0x217c
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x38b
size_dt_struct:         0x2144
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4609863 Bytes = 4.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e26000, end 67e2b506 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted
OX820 # printenv 
SET_dtb=fdt addr ${fdtaddr} ; fdt header
autoload=no
baudrate=115200
bootcmd=run ideboot
bootdelay=3
bootnew=bootm 60000000 - 61000000
bootold=bootm 60000000
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=74:F0:6D:6A:1D:17
ext2_dtb=ext2load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext2_ideboot=run ext2_uimage ; run ext2_dtb ; run SET_dtb ; run bootnew
ext2_uimage=ext2load ide 0:2 60000000 /boot/uImage
ext4_dtb=ext4load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext4_ideboot=run ext4_uimage ; run ext4_dtb ; run SET_dtb ; run bootnew
ext4_uimage=ext4load ide 0:2 60000000 /boot/uImage
fdtaddr=61000000
filesize=1b79
ideboot=run ext4_ideboot
idebootold=${loadold} ;${bootold}
imgaddr=60000000
ipaddr=10.0.0.71
keypressed=1
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
preboot=run safeboot
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
stderr=serial
stdin=serial
stdout=serial
updboot=bootp;tftp 60000000 u-boot.img;ide write 60000000 400 400

Environment size: 1267/16380 bytes
OX820 # help
?       - alias for 'help'
askenv  - get environment variables from stdin
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootmenu- ANSI terminal bootmenu
bootp   - boot image via network using BOOTP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
chpart  - change active partition
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dhcp    - boot image via network using DHCP/TFTP protocol
diskboot- boot from IDE device
echo    - echo args to console
editenv - edit environment variable
env     - environment handling commands
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
ext4load- load binary file from a Ext4 filesystem
ext4ls  - list files in a directory (default /)
ext4write- create a file in the root directory
false   - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatwrite- write file into a dos filesystem
fdt     - flattened device tree utility commands
gettime - get timer val elapsed,
go      - start application at address 'addr'
grepenv - search environment variables
hash    - compute hash message digest
help    - print command description/usage
ide     - IDE sub-system
iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ini     - parse an ini file in memory and merge the specified section into the env
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
md5sum  - compute MD5 message digest
mdio    - MDIO utility commands
mii     - MII utility commands
mm      - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
pxe     - commands to get and boot from pxe files
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
setexpr - set environment variable as the result of eval expression
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
sysboot - command to get and boot from syslinux files
terminal- start terminal emulator
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
time    - run commands and summarize execution time
true    - do nothing, successfully
ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
unzip   - unzip a memory region
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
zip     - zip a memory region
OX820 #

this kernel seems to be deleted from dropbox?

bodhi Wrote:
-------------------------------------------------------
> alexinc,
>
> Try booting kernel 4.4.201.
>
>
Quote

Updated 16 Nov 2019:
>
> Kernel linux-4.4.201-oxnas-tld-1 package was
> uploaded.
>
> New/Update features:
>
> - Pickup security patches from mainline.
> - This kernel header now can be installed and used
> to build modules, without any special tweaks (this
> issue was described here).
>
> Latest Linux kernel 4.x general release
> information can be found at:
> LinuxChanges log
>
> Download at Dropbox
>
> linux-4.4.201-oxnas-tld-1.bodhi.tar.bz2
Re: revive Medion oxnas stg-212
March 17, 2023 03:22PM
alex,

I think Bitly expired a bunch of my old links. I did delete a lot of uploaded files on my Dropbox, but always keep the interesting version.

Download at Dropbox:

https://www.dropbox.com/s/jcbhzhyig314o60/linux-4.4.201-oxnas-tld-1.bodhi.tar.bz2

And use the same hash in the kernel release thread.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
March 18, 2023 08:55AM
once again, thanks for your ongoing support!

as expected i also didn't succeed with 4.4.201
U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB   
IDE:   Bus 0: OK 
  Device 0: Model: ST1500DL003-9VT16L Firm: CC4A Ser#: 5YD5WQJS
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1430799.3 MB = 1397.2 GB (-1364690128 x 512)
NAND:  128 MiB   
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0 
4240576 bytes read in 918 ms (4.4 MiB/s)
7224 bytes read in 17 ms (414.1 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x1c38 (7224)
off_dt_struct:          0x38
off_dt_strings:         0x1974
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x2c4
size_dt_struct:         0x193c
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-4.4.201-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4240512 Bytes = 4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e26000, end 67e2ac37 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted

there must be something wrong with nand (ramfs?) when it comes to uncompression. :-/ i'm trying to upgrade @schnee
rescue hdd now with latest u-boot+rootfs+kernel, but i doubt it may help, as it won't change partitions in nand i guess.
Re: revive Medion oxnas stg-212
March 21, 2023 09:59PM
i also tried with "original" pogoplug-classic kernel 3.17, as i read that eith 4.x kernels and original u-boot there#s not enough space anymore, but same problem... :-/ what i'm wondering, if everything is booted and loaded from sata, why uncompression error? shouldn't it load linux from rootfs then without uncompression? to boot from sata i had to change rootfs to ext2, which seems to work. otherwise it wouldn't start kernel. strange! :-?

If i cange values in /boot/u-boot.env i'm getting
reading u-boot.env
*** Warning - bad CRC, using default environment
which then leads to using the default envs and keeps hanging at
In:    serial
Out:   serial
Err:   serial
Net:   mii0
switch to net console
so it seems i can't edit u-boot.env to
ideboot=run ext2_ideboot
instead of ext4_ideboot - not sure if that matters, but would make sense to me for booting linux rootfs from ext2 partition!?

U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK
  Device 0: Model: SAMSUNG HD502HI  Firm: 1AG01113 Ser#: S1VZJ90S227302
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476938.9 MB = 465.7 GB (976771055 x 512)
NAND:  128 MiB
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0
OX820 # printenv
SET_dtb=fdt addr ${fdtaddr} ; fdt header
autoload=no
baudrate=115200
bootcmd=run ideboot
bootdelay=3
bootnew=bootm 60000000 - 61000000
bootold=bootm 60000000
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=74:F0:6D:6A:1D:17
ext2_dtb=ext2load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext2_ideboot=run ext2_uimage ; run ext2_dtb ; run SET_dtb ; run bootnew
ext2_uimage=ext2load ide 0:2 60000000 /boot/uImage
ext4_dtb=ext4load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext4_ideboot=run ext4_uimage ; run ext4_dtb ; run SET_dtb ; run bootnew
ext4_uimage=ext4load ide 0:2 60000000 /boot/uImage
fdtaddr=61000000
filesize=1b79
ideboot=run ext4_ideboot
idebootold=${loadold} ;${bootold}
imgaddr=60000000
ipaddr=10.0.0.71
keypressed=1
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
preboot=run safeboot
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
stderr=serial
stdin=serial
stdout=serial
updboot=bootp;tftp 60000000 u-boot.img;ide write 60000000 400 400

Environment size: 1267/16380 bytes
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK
  Device 0: Model: SAMSUNG HD502HI  Firm: 1AG01113 Ser#: S1VZJ90S227302
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476938.9 MB = 465.7 GB (976771055 x 512)
NAND:  128 MiB
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0
4102704 bytes read in 1466 ms (2.7 MiB/s)
7033 bytes read in 41 ms (167 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x1b79 (7033)
off_dt_struct:          0x38
off_dt_strings:         0x18d4
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x2a5
size_dt_struct:         0x189c
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e26000, end 67e2ab78 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted



Edited 1 time(s). Last edit at 03/21/2023 10:02PM by alexinc.
Re: revive Medion oxnas stg-212
March 21, 2023 10:25PM
Quote

there must be something wrong with nand (ramfs?) when it comes to uncompression. :-/ i'm trying to upgrade @schnee
rescue hdd now with latest u-boot+rootfs+kernel, but i doubt it may help, as it won't change partitions in nand i guess.

No it does not have anything to do with NAND. This is the problem with load addresses. And it's been so long ago, I can no longer remember exactly what need to be done. This SoC is different from all others.

Note how my instruction to load kernel at 60500000? That's 5MB.

And the image was built with the entry point

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK

For whatever reason, I guess the STG-212 is different. So what you probably need to look for how OpenWrt boot this box to find some hints.

For testing, we can force the kernel to relocate back to 60000000 by playing with the load adresses (i.e load uImage at 10MB location 60A00000) and move the DTB further out. Do something like that. And keep moving it to 15MB, 20MB,.... to test.

IIRC, the kernel load address was intentionally "played" by kref so that there is no relocation during decompression.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/21/2023 10:27PM by bodhi.
Re: revive Medion oxnas stg-212
March 22, 2023 12:26AM
What gave me hope was https://forum.doozan.com/read.php?2,16044,23122#msg-23122 and the following comment by FileDescriptor, that he revived his Medion STG212 with that installer... so there should be one way somehow, but FileDescriptor doesn't seem to be registrated in here anymore. :-( hunting for more information continuous...



Edited 2 time(s). Last edit at 03/23/2023 01:10PM by alexinc.
Re: revive Medion oxnas stg-212
March 22, 2023 05:52PM
For the pogo plug v4 i had similar errors when I forgot to specify the arcNumber and machig in uboot. Can this be a similar problem?

Schnee
Re: revive Medion oxnas stg-212
March 25, 2023 04:49AM
Quote
For testing, we can force the kernel to relocate back to 60000000 by playing with the load adresses (i.e load uImage at 10MB location 60A00000) and move the DTB further out. Do something like that. And keep moving it to 15MB, 20MB,.... to test.

IIRC, the kernel load address was intentionally "played" by kref so that there is no relocation during decompression.


As i found in https://forum.doozan.com/read.php?3,35709,54099#msg-54099 and everywhere else i was searching for kernel entry point related to stg-212/medion, it should be fine with
Load Address: 60008000
Entry Point:  60008000
It seems @dietgert was using the same rescue disk from @schnee but managed to boot a second time, when kernel 3.17 gets updated to 4.4.54 through .1stboot.sh. It seems i have to cross check envs again, although i didn't edit them from @schnee's pakage. :-?
Re: revive Medion oxnas stg-212
March 25, 2023 12:44PM
> As i found in
> https://forum.doozan.com/read.php?3,35709,54099#msg-54099
> and everywhere else i was searching for kernel
> entry point related to stg-212/medion, it should
> be fine with
> Load Address: 60008000
> Entry Point: 60008000

Correct. Those are image load and entry point address for all OXNAS boards. What I mentioned above is the addresss that we use in bootm. It'll make a difference in decompression when you load the image at a certain location.

For example,

bootm 0x60A00000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 03/25/2023 12:46PM by bodhi.
Re: revive Medion oxnas stg-212
March 31, 2023 07:23AM
I'm really, really, really trying that hard, but always failing! It's frustrating!

I've tried the USB boot with older 3.17.0, changing addresses, kernels between pgogplug-classic and stg-212, different u-boot and envs, tftp uImage and uInitrd and whatever i came across in this forum... :'(

I can jump from u-boot to u-boot without any trouble (so booting from ide/usb works), but as soon as it tries to uncompress initramfs it's stuck. I also tried to get the old school path and using openwrt u-boot + initramfs again - no luck either. What is the missing brick in this whole construct??? I'm really going crazy. I also still don't get it, why it's not completely booting from ide, when it shouldn't write to anything nand-related?

:-/

my latest try was rescue hdd with addresses i found in older posts, but then it doesn't even kernel and initramfs.

OX820 # printenv
SET_dtb=fdt addr ${fdtaddr} ; fdt header
autoload=no
baudrate=115200
bootcmd=run ideboot
bootdelay=3
bootnew=bootm 60000000 - 61000000
bootold=bootm 60000000
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=00:11:41:30:3A:12
ext2_dtb=ext2load ide 0:2 62c00000 /boot/dts/ox820-pogoplug-classic.dtb
ext2_ideboot=run ext2_uimage ; run ext2_dtb ; run SET_dtb ; run bootnew
ext2_uimage=ext2load ide 0:2 60500000 /boot/uImage
fdtaddr=61000000
filesize=1b79
ideboot=run ext2_ideboot
idebootold=${loadold} ;${bootold}
imgaddr=60000000
ipaddr=192.168.50.100
keypressed=1
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
preboot=run safeboot
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
stderr=serial
stdin=serial
stdout=serial
updboot=bootp;tftp 60000000 u-boot.img;ide write 60000000 400 400

Environment size: 1071/16380 bytes
OX820 # run ideboot
4102704 bytes read in 1400 ms (2.8 MiB/s)
7033 bytes read in 83 ms (82 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x1b79 (7033)
off_dt_struct:          0x38
off_dt_strings:         0x18d4
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x2a5
size_dt_struct:         0x189c
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
so back to:
OX820 # printenv
SET_dtb=fdt addr ${fdtaddr} ; fdt header
autoload=no
baudrate=115200
bootcmd=run ideboot
bootdelay=3
bootnew=bootm 60000000 - 61000000
bootold=bootm 60000000
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=00:11:41:30:3A:12
ext2_dtb=ext2load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext2_ideboot=run ext2_uimage ; run ext2_dtb ; run SET_dtb ; run bootnew
ext2_uimage=ext2load ide 0:2 60000000 /boot/uImage
fdtaddr=61000000
filesize=1b79
ideboot=run ext2_ideboot
idebootold=${loadold} ;${bootold}
imgaddr=60000000
ipaddr=192.168.50.100
keypressed=1
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
preboot=run safeboot
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
stderr=serial
stdin=serial
stdout=serial
updboot=bootp;tftp 60000000 u-boot.img;ide write 60000000 400 400

Environment size: 1071/16380 bytes
OX820 # run ideboot
4102704 bytes read in 1476 ms (2.7 MiB/s)
7033 bytes read in 82 ms (83 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x1b79 (7033)
off_dt_struct:          0x38
off_dt_strings:         0x18d4
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x2a5
size_dt_struct:         0x189c
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e26000, end 67e2ab78 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted



Edited 2 time(s). Last edit at 03/31/2023 07:36AM by alexinc.
Re: revive Medion oxnas stg-212
March 31, 2023 08:15AM
so trying tftp openwrt again (https://archive.openwrt.org/releases/17.01.7/targets/oxnas/generic/lede-17.01.7-oxnas-stg212-u-boot-initramfs.bin):
OX820 # tftp 64000000 initramfs.bin
Using mii0 device
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'initramfs.bin'.
Load address: 0x64000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################
         1.3 MiB/s
done
Bytes transferred = 4194304 (400000 hex)
OX820 # go 64000000
## Starting application at 0x64000000 ...


U-Boot 2014.10 (Oct 18 2017 - 12:51:43) for OXNAS

DRAM:  128 MiB
NAND:  128 MiB
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: attached mtd1 (name "mtd=1", size 114 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 512 (aligned 512), data offset: 2048
UBI: good PEBs: 911, bad PEBs: 1, corrupted PEBs: 0
UBI: user volume: 5, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 77/43, WL threshold: 4096, image sequence number: 1342704460
UBI: available PEBs: 0, total reserved PEBs: 911, PEBs reserved for bad PEB handling: 19
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
IDE:   SATA PHY not ready for device 1
Bus 0: OK
  Device 0: Model: SAMSUNG HD502HI  Firm: 1AG01113 Ser#: S1VZJ90S227302
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476938.9 MB = 465.7 GB (976771055 x 512)
  Device 1: not available
Hit any key to stop autoboot:  0

Loading from nand0, offset 0x440000
** Unknown image type
Wrong Image Format for bootm command
ERROR: can't get kernel image!
OX820 # printenv
autoload=no
baudrate=115200
boot_dhcp=run load_kernel_dhcp && run boot_kernel;
boot_kernel=bootm 0x62000000;
boot_openwrt=nand read 0x62000000 0x42000000 0x90000 ; go 62000000
boot_rescue=run load_kernel_rescue && run boot_kernel;
boot_stage2=nand read 64000000 440000 90000; go 64000000
boot_ubi=run load_kernel_ubi && run boot_kernel;
bootargs=console=ttyS0,115200n8 earlyprintk=serial
bootcmd=nboot 60500000 0 440000; bootm
bootdelay=1
console=console=ttyS0,115200n8 earlyprintk=serial
ethact=dwmac.40400000
ethaddr=00:11:41:30:3a:12
fileaddr=64000000
filesize=420000
ipaddr=192.168.50.100
load_kernel_dhcp=dhcp 0x62000000 oxnas-rescue.bin;
load_kernel_rescue=nand read 0x62000000 0x4e0000 0x400000;
load_kernel_ubi=ubi readvol 0x62000000 kernel;
mtddevname=boot
mtddevnum=0
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(ubi)
normalboot=run boot_ubi; run boot_rescue; run boot_dhcp;
partition=nand0,0
serverip=192.168.50.59
stderr=serial
stdin=serial
stdout=serial

Environment size: 1054/16379 bytes
I'm getting closer! Openwrt until 17.01.7 tries to start being tftp-ed at 64000000. Then it can't start kernel from 62000000, which i tftp then too (uImage at 62000000). I'm then getting a bit closer again, but still fails:
OX820 # tftp 62000000 uImage
Speed: 1000, full duplex
Using dwmac.40400000 device
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uImage'.
Load address: 0x62000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################
         1.3 MiB/s
done
Bytes transferred = 1745076 (1aa0b4 hex)
OX820 # nboot 60500000 0 440000; bootm

Loading from nand0, offset 0x440000
** Unknown image type
## Loading kernel from FIT Image at 62000000 ...
   Using 'config@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM OpenWrt Linux-4.4.182
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x620000e4
     Data Size:    1736393 Bytes = 1.7 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x60008000
     Entry Point:  0x60008000
     Hash algo:    crc32
     Hash value:   5d7d6d0e
     Hash algo:    sha1
     Hash value:   c1bbc74fd078c5f30e69637dfabca85ffda4e7c8
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 62000000 ...
   Using 'config@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  ARM OpenWrt stg212 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x621a80e0
     Data Size:    7344 Bytes = 7.2 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   9e3646c3
     Hash algo:    sha1
     Hash value:   e2af51adb0dd3dc23ad370df23d8b7708964f298
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x621a80e0
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 67e1e000, end 67e22caf ... OK

Starting kernel ...

Uncompressing Linux...

XZ-compressed data is corrupt

 -- System halted
just in case it matters:
OX820 # mtdparts 

device nand0 <41000000.nand>, # parts = 2
 #: name                size            offset          mask_flags
 0: boot                0x00e00000      0x00000000      0
 1: ubi                 0x07200000      0x00e00000      0

active partition: nand0,0 - (boot) 0x00e00000 @ 0x00000000

defaults:
mtdids  : nand0=41000000.nand
mtdparts: mtdparts=41000000.nand:14m(boot),-(ubi)



Edited 3 time(s). Last edit at 03/31/2023 08:54AM by alexinc.
Re: revive Medion oxnas stg-212
March 31, 2023 03:57PM
alexinc,

The Pogo Pro/Classic V3 boots fine with the HDD u-boot using schnee's installation.

The difference is that you are running STG-212. So I would suggest trying these

1. Create the rootfs Debian-4.14.180-oxnas-tld-1-rootfs-bodhi.tar.bz2 on USB. After booting HDD u-boot, at the u-boot prompt, boot the kernel from USB rootfs, with the load addresses that I have in the installation procedure for NAND u-boot

https://forum.doozan.com/read.php?3,16017

The default envs in text format are in this file: uboot.2013.10-tld-5.ox820.environment

So
setenv bootdev usb
setenv device 0:1
setenv dtb_file /boot/dts/ox820-stg212.dtb
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x62c00000 $dtb_file'
setenv load_initrd echo loading uInitrd ...; ext2load $bootdev $device 0x60e00000 /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; ext2load $bootdev $device 0x60500000 /boot/uImage'
run load_uimage
run load_initrd
run load_dtb
bootm 0x60500000 0x60e00000 0x62c00000

2. Since you already have the HDD rootfs, you can try booting it with the HDD rootfs with the above envs. But using the USB rootfs will eliminate uncertainly about the HDD raw sectors.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 01, 2023 07:23AM
can't say enough thanks for the time you already spent with me, but still no success... :-/

OX820 # printenv
SET_dtb=fdt addr ${fdtaddr} ; fdt header
autoload=no
baudrate=115200
bootcmd=run ideboot
bootdelay=3
bootdev=usb
bootnew=bootm 60000000 - 61000000
bootold=bootm 60000000
console=console=ttyS0,115200n8
device=0:1
dtb_file=/boot/dts/ox820-stg212.dtb
ethact=mii0
ethaddr=00:11:41:30:3A:12
ext2_dtb=ext2load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext2_ideboot=run ext2_uimage ; run ext2_dtb ; run SET_dtb ; run bootnew
ext2_uimage=ext2load ide 0:2 60000000 /boot/uImage
fdtaddr=61000000
filesize=1b79
ideboot=run ext2_ideboot
idebootold=${loadold} ;${bootold}
imgaddr=60000000
ipaddr=192.168.50.100
keypressed=1
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x60500000 /boot/uImage
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
preboot=run safeboot
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
serverip=192.168.50.59
stderr=serial
stdin=serial
stdout=serial
updboot=bootp;tftp 60000000 u-boot.img;ide write 60000000 400 400

Environment size: 1632/16380 bytes
OX820 # usb start
(Re)start USB... 
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
OX820 # run load_uimage
loading uImage ...
4609927 bytes read in 662 ms (6.6 MiB/s)
OX820 # run load_initrd
loading uInitrd ...
6464907 bytes read in 790 ms (7.8 MiB/s)
OX820 # run load_dtb
loading DTB /boot/dts/ox820-stg212.dtb ...
9479 bytes read in 216 ms (42 KiB/s)
OX820 # bootm 0x60500000 0x60e00000 0x62c00000
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4609863 Bytes = 4.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6464843 Bytes = 6.2 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 67801000, end 67e2b54b ... OK
   Loading Device Tree to 677fb000, end 67800506 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted



Edited 1 time(s). Last edit at 04/01/2023 07:38AM by alexinc.
Re: revive Medion oxnas stg-212
April 01, 2023 11:54AM
so i cleared ubifs now, besides the last volume that doesn't get erased for whatever reason!?
OX820 # ubi info layout 
Volume information dump:
        vol_id          2147479551
        reserved_pebs   2
        alignment       1
        data_pad        0
        vol_type        3
        name_len        13
        usable_leb_size 129024
        used_ebs        2
        used_bytes      258048
        last_eb_bytes   2
        corrupted       0
        upd_marker      0
        name            layout volume
I'm about doing a nand erase.chip if nothing helps anymore... i don't get it! whatever i tried, read a million threads/post and trying everything else bit by bit... hopefully erasing will manage to get a clear start somehow. :-(



Edited 1 time(s). Last edit at 04/01/2023 11:55AM by alexinc.
Re: revive Medion oxnas stg-212
April 01, 2023 02:19PM
alexinc,

> I'm about doing a nand erase.chip if nothing helps
> anymore...

OK. You got nothing to loose :) Here is how to flash the ox820 u-boot NAND version in serial console:

https://forum.doozan.com/read.php?3,42599,44024#msg-44024

Note that you can use an Ext3 USB to copy the u-boot image and envs. Should work the same with

ext2load usb 0:1 .........

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 01, 2023 04:56PM
nand is empty now, no u-boot on it and booting only possible throught rescue sata. i couldn't perform u-boot install with usb, as it always timeout while writing (seems a known problem with external devices). so i decided going with ide, when booting from rescue disk anyways. everything seems to run smooth, but rebooting without disk doesn't load anything...
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK
  Device 0: Model: SAMSUNG HD502HI  Firm: 1AG01113 Ser#: S1VZJ90S227302
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476938.9 MB = 465.7 GB (976771055 x 512)
NAND:  128 MiB
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0
OX820 # ide reset

Reset IDE: Bus 0: OK
  Device 0: Model: SAMSUNG HD502HI  Firm: 1AG01113 Ser#: S1VZJ90S227302
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476938.9 MB = 465.7 GB (976771055 x 512)
OX820 # ext2ls ide 0:2 /uboot
<DIR>       4096 .
<DIR>       4096 ..
            2641 uboot.2015.10-tld-2.ox820.environment
          131072 uboot.2015.10-tld-2.ox820.environment.img
          524288 uboot.2015.10-tld-2.ox820.mtd0.img
          131072 uboot.spl.2013.10.ox820.850mhz.mtd0.img
OX820 # nand erase 0x0 0xC0000

NAND erase: device 0 offset 0x0, size 0xc0000
Erasing at 0xa0000 -- 100% complete.
OK
OX820 # ext2load ide 0:2 0x800000  /uboot/uboot.spl.2013.10.ox820.850mhz.mtd0.img
131072 bytes read in 91 ms (1.4 MiB/s)
OX820 # nand write 0x800000 0x0 0x20000

NAND write: device 0 offset 0x0, size 0x20000
 131072 bytes written: OK
OX820 # ext2load ide 0:2 0x800000  /uboot/uboot.2015.10-tld-2.ox820.mtd0.img
524288 bytes read in 190 ms (2.6 MiB/s)
OX820 # nand write 0x800000 0x40000 0x80000

NAND write: device 0 offset 0x40000, size 0x80000
 524288 bytes written: OK
OX820 # nand erase 0x100000 0x20000

NAND erase: device 0 offset 0x100000, size 0x20000
Erasing at 0x100000 -- 100% complete.
OK
OX820 # ext2load ide 0:2 0x800000  /uboot/uboot.2015.10-tld-2.ox820.environment.img
131072 bytes read in 56 ms (2.2 MiB/s)
OX820 # nand write 0x800000 0x100000 0x20000

NAND write: device 0 offset 0x100000, size 0x20000
 131072 bytes written: OK
trying to load dtb,uinitrd and uimage from usb again, ends in the beloved extraction error again. so erasing nand didn't seem to be the problem.

What i also don't understand: after erasing NAND and booting/loading openwrt-u-boot via tftp it mounts ubi to mtd=1 again, which then contains again only the last remaining volume i couldn't delete before. Also it warns that volume 1 and volume 2 don't exist anymore (both contained u-boot-env and u-boot-env backup). So when and what wrote those volumes and why didn't they get completely deleted after erasing NAND? It's all getting a big mystery more and more. :-(
All other tests with loading different images or booting from rootfs remained ending in uncompressing error. So nand erase.chip didn't succeed besides wiping original u-boot from NAND which i didn't manage to replace for now.



Edited 2 time(s). Last edit at 04/01/2023 07:01PM by alexinc.
Re: revive Medion oxnas stg-212
April 01, 2023 10:40PM
Maybe you should check the power supply. Use a reliable power supply to power it
Re: revive Medion oxnas stg-212
April 03, 2023 01:52PM
just for the record, booting with latest u-boot from rescue disk and latest rootfs from usb doesn't work either and i didn't managed to write u-boot to nand again as of yet... is changing power supply a realistic scenario?
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: Bus 0: OK
  Device 0: Model: Crucial_CT275MX300SSD1 Firm:  M0CR070 Ser#: 17251799E2D8
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 262321.6 MB = 256.1 GB (537234768 x 512)

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     32              120164320       0104b1f9-01     83
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

Partition Map for IDE device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            32768           00008000-01     83
  2     34816           8388608         00008000-02     83
  3     8423424         528811344       00008000-03     83
loading envs from ide 0 ...
reading /boot/uEnv.txt
** Unable to read file /boot/uEnv.txt **
4600448 bytes read in 365 ms (12 MiB/s)
6464907 bytes read in 373 ms (16.5 MiB/s)
9479 bytes read in 216 ms (42 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Created:      2020-05-15   3:58:34 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4600384 Bytes = 4.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.14.180-oxnas-tld-1
   Created:      2020-05-15   3:58:49 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6464843 Bytes = 6.2 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 677fc000, end 67e2654b ... OK
   Loading Device Tree to 677f6000, end 677fb506 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted
OX820> printenv
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run bootcmd_uenv; run dt_bootcmd_usb; reset
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
console=console=ttyS0,115200n8
devices=usb ide
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-stg212.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dtb_addr=0x62c00000
ethact=dwmac.40400000
ethaddr=00:11:41:30:3A:12
if_netconsole=ping $serverip
ipaddr=192.168.50.100
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.50.59
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x60500000  $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_device=0:1
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10

Environment size: 1993/131068 bytes
Re: revive Medion oxnas stg-212
April 03, 2023 03:28PM
Well, when decompression starts, it will use a lot more power, if the power supply is not good, system might die.

I had a few failed boxes, after I changed the power supply, they came back to life.
Re: revive Medion oxnas stg-212
April 03, 2023 03:32PM
daviddyer Wrote:
-------------------------------------------------------
> Well, when decompression starts, it will use a lot
> more power, if the power supply is not good,
> system might die.
>
> I had a few failed boxes, after I changed the
> power supply, they came back to life.

sounds interesting as i simply can't find any other solution anymore. for now i'm using the original one of course. should be difficult to find 12v and higher 1,5a output with matching plug. :-/

at the same time it doesn't answer, why i can't even save new u-boot from ram to nand for booting again without rescue disk... :-?



Edited 2 time(s). Last edit at 04/03/2023 03:47PM by alexinc.
Re: revive Medion oxnas stg-212
April 03, 2023 10:23PM
These boxes are at least 10 years old.

The power supply materials are not as good as those in the box. Most of the times, the capacitor fails.

Just try with a good 12V/1A power supply. If you don't use hard drive, just boot from usb flash drive, 12V/1A is good enough.

You have nothing to lose. Why not try it?
Re: revive Medion oxnas stg-212
April 03, 2023 10:46PM
> at the same time it doesn't answer, why i can't
> even save new u-boot from ram to nand for booting
> again without rescue disk... :-?

The u-boot you are running is SATA boot build. The image header is not the same as NAND built u-boot.

I forgot, if you have tried flashing OpenWrt u-boot to NAND?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 04, 2023 02:52AM
daviddyer Wrote:
-------------------------------------------------------
> These boxes are at least 10 years old.
>
> The power supply materials are not as good as
> those in the box. Most of the times, the capacitor
> fails.
>
> Just try with a good 12V/1A power supply. If you
> don't use hard drive, just boot from usb flash
> drive, 12V/1A is good enough.
>
> You have nothing to lose. Why not try it?

Of course I'm trying, just have to find a fitting power supply first. Already using SSD now for that reason...
Re: revive Medion oxnas stg-212
April 04, 2023 02:58AM
bodhi Wrote:
-------------------------------------------------------
> The u-boot you are running is SATA boot build. The
> image header is not the same as NAND built
> u-boot.
>
> I forgot, if you have tried flashing OpenWrt
> u-boot to NAND?

Yesterday i changed u-boot from Rescue disk /boot partition with your latest one, which comes with envs including usb boot. I thought this one may be the "all in one solution"... ;-)

As i tried so many things, i forgot that too, but will try again to flash the OpenWRT u-boot to nand and get back. :-)



Edited 1 time(s). Last edit at 04/04/2023 03:18AM by alexinc.
Re: revive Medion oxnas stg-212
April 04, 2023 11:16AM
bodhi Wrote:
-------------------------------------------------------
> I forgot, if you have tried flashing OpenWrt
> u-boot to NAND?

so i have flashed spl from your latest u-boot and u-boot from openwrt without any success. if i'm right first thing loading should be spl, right? so already writing spl to nand fails somehow? i also tried writing uboot.spl.2013.10.ox820.mtd0.img to nand (to get rid of the overclocked cpu).

also tried once more:
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0
OX820> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
OX820> setenv dt_load_dtb 'ext2load usb 0:1 $dtb_addr /boot/dts/ox820-stg212.dtb'
OX820> setenv bootcmd 'run dt_bootcmd_usb'
OX820> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
4600448 bytes read in 363 ms (12.1 MiB/s)
6464907 bytes read in 372 ms (16.6 MiB/s)
9479 bytes read in 215 ms (43 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Created:      2020-05-15   3:58:34 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4600384 Bytes = 4.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.14.180-oxnas-tld-1
   Created:      2020-05-15   3:58:49 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6464843 Bytes = 6.2 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 677fc000, end 67e2654b ... OK
   Loading Device Tree to 677f6000, end 677fb506 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted
@daviddyer
I also switched power supply - having exactly the same power output, but from my smart speaker and just 1-2 years old. guess power supply shouldn't be the culprit!? i still have a feeling, that nand was somehow partitioned with ubifs and part of that didn't get erased by nand clear.chip so that extracting kernel doesn't have enough space. but as i have almost zero knowledge besides the information i got over the last months, i may be completely wrong. it's just funny, that everywhere gets written the device is unbrickable and how to unbrick it again, but no matter what way i chose, it always fails to uncompress linux to ram. :-(
Re: revive Medion oxnas stg-212
April 04, 2023 02:14PM
alexinc,

> be the culprit!? i still have a feeling, that nand
> was somehow partitioned with ubifs and part of
> that didn't get erased by nand clear.chip so that
> extracting kernel doesn't have enough space.

No. NAND has nothing to do with kernel decompression. The decompression always takes place in RAM.

> it's just funny, that everywhere
> gets written the device is unbrickable

That statement is only about Cloudengine Pogo V3 Pro/Classic.

======

Also, if you look at how OpenWrt load and boot its kernel, it is different . If you can find the OpenWrt uImage location in their tree, download it. And then after you started the HDD u-boot and boot to the prompt, follow their way of loading uImage (but loading from HDD or USB storage), and booting (it is definitely different from booting Debian). That will at least get you to boot the kernel, the OpenWrt rootfs in NAND will come in to play much later.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 04, 2023 03:42PM
bodhi Wrote:
-------------------------------------------------------
> > it's just funny, that everywhere
> > gets written the device is unbrickable
>
> That statement is only about Cloudengine Pogo V3
> Pro/Classic.

i thought pogoplug classic shares the same base?

> Also, if you look at how OpenWrt load and boot its
> kernel, it is different . If you can find the
> OpenWrt uImage location in their tree, download
> it. And then after you started the HDD u-boot and
> boot to the prompt, follow their way of loading
> uImage (but loading from HDD or USB storage), and
> booting (it is definitely different from booting
> Debian). That will at least get you to boot the
> kernel, the OpenWrt rootfs in NAND will come in to
> play much later.

not sure if i got your point here. i tried the following.

OpenWRT 15.05.1 (last working version on my NAS) hangs
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0
OX820> ide reset

Reset IDE: Bus 0: OK
  Device 0: Model: Crucial_CT275MX300SSD1 Firm:  M0CR070 Ser#: 17251799E2D8
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 262321.6 MB = 256.1 GB (537234768 x 512)
OX820> ext2load ide 0:2 64000000 /owrt15/openwrt-15.05.1-oxnas-stg212-fit-uImage-initramfs.itb
3151576 bytes read in 405 ms (7.4 MiB/s)
OX820> bootm 64000000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
OX820> go 64000000
## Starting application at 0x64000000 ...

OpenWRT 19.07.5 (like in their tutorial https://openwrt.org/toh/medion/md86587) hangs
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0
OX820> ide reset

Reset IDE: Bus 0: OK
  Device 0: Model: Crucial_CT275MX300SSD1 Firm:  M0CR070 Ser#: 17251799E2D8
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 262321.6 MB = 256.1 GB (537234768 x 512)
OX820> ext2load ide 0:2 64000000 /owrt19/openwrt-19.07.5-oxnas-ox820-mitrastar_stg-212-initramfs-uImage
5698471 bytes read in 729 ms (7.5 MiB/s)
OX820> bootm 64000000
## Booting kernel from Legacy Image at 64000000 ...
   Image Name:   ARM OpenWrt Linux-4.14.209
   Created:      2020-12-06   7:31:03 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5698407 Bytes = 5.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: