One day i had to get back to this topic...
I took another step on reviving this little beast (not sure why ), but i managed to create a flash-recovery-hdd using my router successfully (at least i think so, as i didn't see any error)...
root@XiaoQiang:/usr/local/NAS7820-Tools-master/flash-recovery-hdd/MedionNAS# bash -x ./build.sh /dev/sdb 00:11:41:30:3A:12
+ device=/dev/sdb
+ macaddr=00:11:41:30:3A:12
+ '[' x00:11:41:30:3A:12 == x ']'
+ echo 'Deleting partitions on device'
Deleting partitions on device
+ dd if=/dev/zero of=/dev/sdb bs=512 seek=0 count=34 conv=notrunc status=noxfer
+ echo 'Adding MBR to device'
Adding MBR to device
+ dd if=../mbr.bin of=/dev/sdb bs=512 seek=0 conv=notrunc status=noxfer
+ echo 'Adding stage1'
Adding stage1
+ dd if=stage1.wrapped750 of=/dev/sdb bs=512 seek=34 conv=notrunc status=noxfer
+ echo 'Adding U-Boot'
Adding U-Boot
+ dd if=../u-boot.wrapped of=/dev/sdb bs=512 seek=154 bs=512 conv=notrunc status=noxfer
+ echo 'Generating NAND U-Boot Environment'
Generating NAND U-Boot Environment
+ echo -en 'bootargs= console=ttyS0,115200 elevator=cfq mac_addr=0x00,0x30,0xe0,0x00,0x00,0x01\0'
+ echo -en 'bootcmd=run boot_nand\0'
+ echo -en 'bootdelay=2\0'
+ echo -en 'baudrate=115200\0'
+ echo -en 'ipaddr=192.168.50.100\0'
+ echo -en 'serverip=192.168.50.59\0'
+ echo -en 'autoload=n\0'
+ echo -en 'netmask=255.255.0.0\0'
+ echo -en 'bootfile="uImage"\0'
+ echo -en 'load_nand=nboot 61000000 0 440000\0'
+ echo -en 'boot=bootm 61000000\0'
+ echo -en 'boot_nand=run load_nand boot\0'
+ echo -en 'MODEL_ID=AB03\0'
+ echo -en 'PRODUCT_NAME=STG-212\0'
+ echo -en 'VENDOR_NAME=MitraStar Technology Corp.\0'
+ echo -en 'ethaddr=00:11:41:30:3A:12\0'
+ echo -en '\0'
+ dd if=/dev/zero of=mtd3.data conv=notrunc seek=131067 bs=1 count=1 status=noxfer
+ cksum
+ read CRC32 REMAINDER
+ CRC32_OCTAL0L=7
+ CRC32_OCTAL0M=4
+ CRC32_OCTAL0H=3
+ CRC32_OCTAL1L=5
+ CRC32_OCTAL1M=3
+ CRC32_OCTAL1H=3
+ CRC32_OCTAL2L=7
+ CRC32_OCTAL2M=4
+ CRC32_OCTAL2H=3
+ CRC32_OCTAL3L=3
+ CRC32_OCTAL3M=4
+ CRC32_OCTAL3H=1
+ CRC32_STRING='\0347'
+ CRC32_STRING='\0347\0335'
+ CRC32_STRING='\0347\0335\0347'
+ CRC32_STRING='\0347\0335\0347\0143'
+ echo -en '\0347\0335\0347\0143'
+ cat mtd3.crc mtd3.data
+ echo 'Adding MTD1 data (stage1)'
Adding MTD1 data (stage1)
+ dd if=mtd1.backup of=/dev/sdb bs=512 seek=1024 bs=512 conv=notrunc status=noxfer
+ echo 'Adding MTD2 data (NAND U-Boot)'
Adding MTD2 data (NAND U-Boot)
+ dd if=mtd2.backup of=/dev/sdb bs=512 seek=1536 bs=512 conv=notrunc status=noxfer
+ echo 'Adding MTD3 data (U-Boot Environment)'
Adding MTD3 data (U-Boot Environment)
+ dd if=mtd3.bin of=/dev/sdb bs=512 seek=8704 bs=512 conv=notrunc status=noxfer
+ echo 'Adding MTD4 data (Kernel)'
Adding MTD4 data (Kernel)
+ dd if=mtd4.backup of=/dev/sdb bs=512 seek=9728 bs=512 conv=notrunc status=noxfer
+ echo 'Adding MTD6 data (info)'
Adding MTD6 data (info)
+ dd if=mtd6.backup of=/dev/sdb bs=512 seek=30208 bs=512 conv=notrunc status=noxfer
+ echo 'Adding MTD7 data (sysdisk)'
Adding MTD7 data (sysdisk)
+ dd if=mtd7.backup of=/dev/sdb bs=512 seek=50688 bs=512 conv=notrunc status=noxfer
+ rm mtd3.data mtd3.crc mtd3.bin cksum.data
+ echo 'Generate SATA U-Boot Environment'
Generate SATA U-Boot Environment
+ echo -en 'bootcmd=run select0 erase_nand mtd1 mtd2 mtd3 mtd4 mtd6 mtd7 clear_mbr\0'
+ echo -en 'bootdelay=2\0'
+ echo -en 'baudrate=115200\0'
+ echo -en 'ipaddr=192.168.50.100\0'
+ echo -en 'serverip=192.168.50.59\0'
+ echo -en 'autoload=n\0'
+ echo -en 'netmask=255.255.0.0\0'
+ echo -en 'bootfile="uImage"\0'
+ echo -en 'select0=ide dev 0\0'
+ echo -en 'selectnand=nand device 0\0'
+ echo -en 'erase_nand=nand erase\0'
+ echo -en 'mtd1=run load_mtd1 flash_mtd1\0'
+ echo -en 'mtd2=run load_mtd2 flash_mtd2\0'
+ echo -en 'mtd3=run load_mtd3 flash_mtd3\0'
+ echo -en 'mtd4=run load_mtd4 flash_mtd4\0'
+ echo -en 'mtd6=run load_mtd6 flash_mtd6\0'
+ echo -en 'mtd7=run load_mtd7 flash_mtd7\0'
+ echo -en 'ethaddr=00:11:41:30:3A:12\0'
+ echo -en 'load_mtd1=ide read 61000000 400 200\0'
+ echo -en 'load_mtd2=ide read 61000000 1c00 400\0'
+ echo -en 'load_mtd3=ide read 61000000 2200 400\0'
+ echo -en 'load_mtd4=ide read 61000000 2600 5000\0'
+ echo -en 'load_mtd6=ide read 61000000 7600 5000\0'
+ echo -en 'load_mtd7=ide read 61000000 c600 2ee00\0'
+ echo -en 'flash_mtd1=nand write 61000000 0 40000\0'
+ echo -en 'flash_mtd2=nand write 61000000 40000 380000\0'
+ echo -en 'flash_mtd3=nand write 61000000 3C0000 80000\0'
+ echo -en 'flash_mtd4=nand write 61000000 440000 a00000\0'
+ echo -en 'flash_mtd6=nand write 61000000 1840000 a00000\0'
+ echo -en 'flash_mtd7=nand write 61000000 2240000 5dc0000\0'
+ echo -en 'clear_mbr=ide write 0x60000000 0 1\0'
+ echo -en 'MODEL_ID=AB03\0'
+ echo -en 'PRODUCT_NAME=STG-212\0'
+ echo -en 'VENDOR_NAME=MitraStar Technology Corp.\0'
+ echo -en '\0'
+ dd if=/dev/zero of=mtd3.data conv=notrunc seek=8187 bs=1 count=1 status=noxfer
+ cksum
+ read CRC32 REMAINDER
+ CRC32_OCTAL0L=5
+ CRC32_OCTAL0M=4
+ CRC32_OCTAL0H=3
+ CRC32_OCTAL1L=6
+ CRC32_OCTAL1M=2
+ CRC32_OCTAL1H=2
+ CRC32_OCTAL2L=0
+ CRC32_OCTAL2M=0
+ CRC32_OCTAL2H=0
+ CRC32_OCTAL3L=4
+ CRC32_OCTAL3M=3
+ CRC32_OCTAL3H=1
+ CRC32_STRING='\0345'
+ CRC32_STRING='\0345\0226'
+ CRC32_STRING='\0345\0226\0000'
+ CRC32_STRING='\0345\0226\0000\0134'
+ echo -en '\0345\0226\0000\0134'
+ cat env.crc env.data
+ echo 'Integrating SATA U-Boot Environment'
Integrating SATA U-Boot Environment
+ dd if=env.bin of=/dev/sdb bs=512 seek=558 conv=notrunc status=noxfer
+ rm env.data env.crc env.bin cksum.data
root@XiaoQiang:/usr/local/NAS7820-Tools-master/flash-recovery-hdd/MedionNAS#
...and NAS is booting from HDD, but stops at...
Stage-1 Bootloader Mon Nov 14 22:17:29 EST 2011
Attempting to set PLLA to 725MHz ...
plla_ctrl0 : 0x0000011A
plla_ctrl1 : 0x003A0000
plla_ctrl2 : 0x007300D0
plla_ctrl3 : 0x000000B6
PLLA Set
Setup memory, testing
Reading disk 0, Image 0
Sector : 0x0000009A
Hdr len: 0x0001F854
Hdr CRC: 0x55B449B2
OK
Initialising disks
SATA PHY not ready for device 1
Detecting SATA busses:
Bus 0: Found first device OK
Device 0: Model: ST1500DL003-9VT16L Firm: CC4A Ser#: 5YD5WQJS
Type: Hard Disk
Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
Device 1: not available
Failed to read valid environment from disk, using built-in default
U-Boot 1.1.2 (Dec 30 2011 - 14:55:54)
U-Boot code: 60D00000 -> 60D1F854 BSS: -> 60D24074
RAM Configuration:
Bank #0: 60000000 128 MB
SRAM Configuration:
64KB at 0x50000000
NAND:128 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Setting Linux mem= boot arg value
IDE read: device 0 block # 288, count 1 ... 1 blocks read: OK
Hit any key to stop autoboot: 0
IDE device 0: Model: ST1500DL003-9VT16L Firm: CC4A Ser#: 5YD5WQJS
Type: Hard Disk
Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
... is now current device
IDE read: device 0 block # 1290, count 10152 ... 10152 blocks read: OK
## Booting image at 60500000 ...
Bad Magic Number
IDE device 0: Model: ST1500DL003-9VT16L Firm: CC4A Ser#: 5YD5WQJS
Type: Hard Disk
Capacity: 131071.9 MB = 127.9 GB (268435455 x 512)
... is now current device
IDE read: device 0 block # 58344, count 10152 ... 10152 blocks read: OK
## Booting image at 60500000 ...
Bad Magic Number
Light LED
IDE device 1: not available
Light LED
IDE device 1: not available
Unknown command 'lightled' - try 'help'
$
...when doing now...
$ setenv bootcmd 'nboot 60500000 0 440000; bootm'
$ saveenv
Saving Environment to Disk...
$ setenv serverip 192.168.50.2
$ setenv ipaddr 192.168.50.1
$ tftp 64000000 initramfs-uImage
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.2; our IP address is 192.168.50.1
Filename 'initramfs-uImage'.
Load address: 0x64000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
########
done
Bytes transferred = 5698471 (56f3a7 hex)
$ bootm 64000000
## Booting image at 64000000 ...
Image Name: ARM OpenWrt Linux-4.14.209
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5698407 Bytes = 5.4 MB
Load Address: 60008000
Entry Point: 60008000
Verifying Checksum ... OK
OK
Starting kernel ...
I'm still stuck!
Any help is very welcome. Thanks i.a.!
Alex