Welcome! Log In Create A New Profile

Advanced

Possible to get Debian on a Medion NAS P89654 2x4 TB?

Posted by saschbaer 
Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 01, 2017 02:31AM
Hello,
I own a Medion NAS with 2x4TB WD Harddisk Model WDC WD40EZRX-22SPEB0.
I studied the forum about flashing several NAS to use Debian on it, but I'm unsure if my NAS has the possibility to do it.
I have root access to my box and was able to install ipkg and other (so it can be used like an open stora.)
The kernel is based on HipServ Axentra, version 2.6.31.8 (so very old...:-/)

Processor	: Feroceon 88FR131 rev 1 (v5l)
BogoMIPS	: 999.42
Features	: swp half thumb fastmult edsp 
CPU implementer	: 0x56
CPU architecture: 5TE
CPU variant	: 0x2
CPU part	: 0x131
CPU revision	: 1

Hardware	: Feroceon-KW
Revision	: 0000
Serial		: 0000000000000000


The mtd partition is
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "rootfs"


If you need more informations, do not hesitate to contact me and I will post more infos.
Regards from Germany
Saschbaer
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 01, 2017 03:21PM
saschbaer,

Quote

> Processor : Feroceon 88FR131 rev 1 (v5l)
> BogoMIPS : 999.42
> Features : swp half thumb fastmult edsp
> CPU implementer : 0x56
> CPU architecture: 5TE
> CPU variant : 0x2
> CPU part : 0x131
> CPU revision : 1
>
> Hardware : Feroceon-KW
> Revision : 0000
> Serial : 0000000000000000

Yes, it is possible to run Debian on this box. It is a Kirkwood SoC like every other boxes I supported here. However, most likely, there are differences in hardwarre peripherals and GPIOs, so a new DTS for this box is needed, which can be based on existing DTS for other boxes. This might be easy, or hard, I'm not sure, until I see the boot log.

And also, you should get GPL source for this box from the manufacturer or from other public sources. Sometime, a few minor details can only be found by looking at the GPL source code. We can only find things such as GPIOs (to control hardware) from GPL source.


Do you have serial console connected? if yes, please post the entire serial console boot log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 09, 2017 10:22AM
__  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00                             
                                                                                
Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz                       
SysClock = 400Mhz , TClock = 166Mhz                                             
                                                                                
DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6                            
DRAM CS[0] base 0x00000000   size 256MB                                         
DRAM Total size 256MB  16bit width                                              
Addresses 8M - 0M are saved for the U-Boot usage.                               
Mem malloc Initialization (8M - 7M): Done                                       
NAND:256 MB                                                                     
*** Warning - bad CRC or NAND, using default environment                        
                                                                                
Flash:  0 kB                                                                    
                                                                                
CPU : Marvell Feroceon (Rev 1)                                                  
                                                                                
Streaming disabled                                                              
Write allocate disabled                                                         
                                                                                
                                                                                
USB 0: host mode                                                                
PEX 0: PCI Express Root Complex Interface                                       
PEX interface detected Link X1                                                  
Net:   egiga0 [PRIME]                
Marvell>> printenv                                                              
baudrate=115200                                                                 
loads_echo=0                                                                    
ipaddr=10.4.52.165                                                              
serverip=10.4.52.7                                                              
rootpath=/srv/ubuntu                                                            
netmask=255.255.255.0                                                           
run_diag=yes                                                                    
stdin=serial                                                                    
stdout=serial                                                                   
stderr=serial                                                                   
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x1)
mainlineLinux=no                                                                
enaMonExt=no                                                                    
enaCpuStream=no                                                                 
enaWrAllo=no                                                                    
pexMode=RC                                                                      
disL2Cache=no                                                                   
setL2CacheWT=yes                                                                
disL2Prefetch=yes                                                               
enaICPref=yes                                                                   
enaDCPref=yes                                                                   
sata_dma_mode=yes                                                               
MALLOC_len=1                                                                    
ethprime=egiga0                                                                 
netbsd_en=no                                                                    
vxworks_en=no                                                                   
bootargs_root=root=/dev/nfs rw                                                  
bootargs_end=:::DB88FXX81:eth0:none                                             
image_name=uImage                                                               
bootcmd=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs 
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/;
bootdelay=3                                                                     
disaMvPnp=no                                                                    
ethaddr=00:50:43:00:02:02                                                       
ethmtu=1500                                                                     
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo                             
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500                  
usb0Mode=host                                                                   
yuk_ethaddr=00:00:00:EE:51:81                                                   
nandEcc=1bit                                                                    
netretry=no                                                                     
rcvrip=169.254.100.100                                                          
loadaddr=0x02000000                                                             
autoload=no                                                                     
image_multi=yes                                                                 
enaAutoRecovery=yes                                                             
pcieTune=no                                                                     
ethact=egiga0                                                                   
                                                                                
Environment size: 1367/131068 bytes
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 09, 2017 10:41AM
Sorry for answering so late, but it seems that i bricked or damaged the uboot...
i get this:

__  __                      _ _                                        
        |  \/  | __ _ _ ____   _____| | |                                       
        | |\/| |/ _` | '__\ \ / / _ \ | |                                       
        | |  | | (_| | |   \ V /  __/ | |                                       
        |_|  |_|\__,_|_|    \_/ \___|_|_|                                       
 _   _     ____              _                                                  
| | | |   | __ )  ___   ___ | |_                                                
| | | |___|  _ \ / _ \ / _ \| __|                                               
| |_| |___| |_) | (_) | (_) | |_                                                
 \___/    |____/ \___/ \___/ \__|                                               
 ** MARVELL BOARD: DB6702A-GMtech LE                                            
                                                                                
U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0                    
                                                                                
U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00                             
                                                                                
Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz                       
SysClock = 400Mhz , TClock = 166Mhz                                             
                                                                                
DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6                            
DRAM CS[0] base 0x00000000   size 256MB                                         
DRAM Total size 256MB  16bit width                                              
Addresses 8M - 0M are saved for the U-Boot usage.                               
Mem malloc Initialization (8M - 7M): Done                                       
NAND:256 MB                                                                     
*** Warning - bad CRC or NAND, using default environment                        
                                                                                
Flash:  0 kB                                                                    
                                                                                
CPU : Marvell Feroceon (Rev 1)                                                  
                                                                                
Streaming disabled                                                              
Write allocate disabled                                                         
                                                                                
                                                                                
USB 0: host mode                                                                
PEX 0: PCI Express Root Complex Interface                                       
PEX interface detected Link X1                                                  
Net:   egiga0 [PRIME]                                                           
Hit any key to stop autoboot:  0                                                
egiga0 no link                                                                  
Using egiga0 device                                                             
TFTP from server 10.4.52.7; our IP address is 10.4.52.165                       
Filename 'uImage'.                                                              
Load address: 0x2000000                                                         
Loading: T T T T T T T T T T                                                    
Retry count exceeded; starting again                                            
## Booting image at 02000000 ...                                                
Bad Magic Number                                                                
Unknown command '<NULL>' - try 'help'

so what to do now?
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 09, 2017 03:08PM
saschbaer,


Quote

> ** MARVELL BOARD: DB6702A-GMtech LE

> Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @
> 500Mhz
> SysClock = 400Mhz , TClock = 166Mhz

This is a close cousin of the NSA310S and Pogo V4. We should be able to get a this running with new kernel. And then how complete it is will be depending on how much informtion you can find (i.e access to GPL source).


Quote

> *** Warning - bad CRC or NAND, using default
> environment
>

Yes, you have a corrupted NAND area where the envs are. But I hope it is not serious.

Look back to the printenv you did in serial console when you first boot up this box with it (before the corruption). Did you list the envs and keep the log of that?

1. Usually, you can just reenter them one by one at serial console and then save it. That will create a new copy with a good checksum. If the NAND sector is not really bad, just the checksum is bad, then it will be back to normal.

2. If the NAND sector is actually bad, then that's a more complicate issue. You need to use the good set of envs (which you enter manually at serial console prompt in number 1 above), boot all the way in to stock OS, or new Debian rootfs. And then we'll take a look to see how to proceed.

3. If the NAND sector is bad, one way to recover is trying to scrub it in serial console. Hopefully it will be back.

4. If there is no way to recover that NAND sector, then we'll need new u-boot for this box to completely fix it (ie. I do use a different NAND area for u-boot envs for Kirkwood boxes).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 02:17AM
Look back to the printenv you did in serial
console when you first boot up this box with it
(before the corruption). Did you list the envs and
keep the log of that?

Im not sure what you mean with list and log... I just did the printenv which is listed in here. I have to admit that I didn't save the original env list and log :-(

I remember that in the fw_env.conf file there was just one line which autoconfigs the box with IP and so...

1. Usually, you can just reenter them one
by one at serial console and then save it. That
will create a new copy with a good checksum. If
the NAND sector is not really bad, just the
checksum is bad, then it will be back to normal.


You really mean just copy paste the printenv line by line? But how to save then?
Ànother question is where is the Definition of my jbod stored - in one of the uboot-files?
I tried to attach them on my ubuntu Laptop but just get the info that theres a GPT Format and I cannot re-assemble them with mdadm...


2. If the NAND sector is actually bad, then that's
a more complicate issue. You need to use the good
set of envs (which you enter manually at serial
console prompt in number 1 above), boot all the
way in to stock OS, or new
Debian
rootfs. And then we'll take a look to see
how to proceed.
Do I Need to prepare an USB stick for that and boot from it?


3. If the NAND sector is bad, one way to recover
is trying to scrub it in serial console. Hopefully
it will be back.
How to do?


4. If there is no way to recover that NAND sector,
then we'll need new u-boot for this box to
completely fix it (ie. I do use a different NAND
area for u-boot envs for Kirkwood boxes).


Okay, so how will I proceed the best way - as you numbered?



Edited 1 time(s). Last edit at 11/10/2017 02:36AM by saschbaer.
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 02:45AM
saschbaer,

> Im not sure what you mean with list and log... I
> just did the printenv which is listed in here.

What you listed were the u-boot internal envs. That's what u-boot uses when encountered a bad CRC checksum, or a bad NAND sector where the envs are stored.

What actually stored in that NAND sector is the envs that used for booting. Thus, you could not boot because the internal envs are just some default values, not good enough for booting stock OS.

## Booting image at 02000000 ...                                                
Bad Magic Number

What I meant by listing and log: normally, the first thing we want to do after we connect serial console or boot into stock OS, is to list the envs, and then keep a log of that for recovery purpose. Without that log, you can't restore a good set of envs to boot into stock OS, now that the current envs NAND area is bad.


> 1. Usually, you can just reenter them one
> by one at serial console and then save it. That
> will create a new copy with a good checksum. If
> the NAND sector is not really bad, just the
> checksum is bad, then it will be back to normal.
> [/code]
>
>
> You really mean just copy paste the printenv line
> by line? But how to save then?

Yes, line-by-line. Once you can boot into stock OS then worry about saving them.

At this point, number 1 what you need to do to recover. After that, you will have many options.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 02:56AM
What I meant by listing and log: normally, the
first thing we want to do after we connect
serial console or boot into stock OS, is to list
the envs, and then keep a log of that for recovery
purpose. Without that log, you can't restore a
good set of envs to boot into stock OS, now that
the current envs NAND area is bad.

As I wrote, I have to admit I haven't saved the original printenv log :-(
So how to proceed now?

I remember I entered a set of envs for using nc without Serial terminal.
With that I changed the Server and Client IP and entered the NC commands as posted.
Any possibility to undo that action?



Edited 1 time(s). Last edit at 11/10/2017 03:11AM by saschbaer.
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 03:24AM
1. Google for this box name, hopefully that in some forum, someone has the same box in working order, and you can ask for a listing of the current envs.

2. If 1 fails, contact the manufacturer or visit their website to find the recovery Firmware.

3. If 1 and 2 fail (I will not be surpised because either the box might be too old, or nobody has hacked it), come back and we'll try the UART booting method using kwboot to see if you can boot with one of my released u-boots. And then go from there.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 03:32AM
We have to do Option 3.
Nobody has hacked the box before, and Medion hasn't a recovery Firmware.
The autorecovery function doesnt work anymore because of the bricked fw. :-(

So what to prepare?
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 03:35AM
saschbaer Wrote:
-------------------------------------------------------

> I remember I entered a set of envs for using nc
> without Serial terminal.
> With that I changed the Server and Client IP and
> entered the NC commands as posted.
> Any possibility to undo that action?

No way to undo that without knowing what a good set of envs is supposed to be.

And netconsole does not work in stock u-boot (I have never seen a stock u-boot that supports netconsole). So you don't want do that for any box that still had stock u-boot.


Anyhow, that must have been why the envs are corrupted (what being entered was not what stock u-boot expected, as far as the checksum is concerned). So in a way, that is good news! that told us the CRC checksum is wrong, not a bad NAND sector.

By the way, you should have posted this fact when you see the booting problem yesterday.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 10, 2017 02:58PM
saschbaer,

Dowload the NSA310S u-boot:
https://forum.doozan.com/read.php?3,12381

Read this UART booting mentioned in that thread:

Quote

UART Booting: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

You will need another Linux box to connect serial console, Windows PC cannot run kwboot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 02:44AM
Morning...

I got kwboot from my ubuntu distrib and downloaded the file.
But if I start to use kwboot, I get special characters like this:

Execute kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa310s.mtd0.kwb

Output of Minicom:
* MARVLL BARD: DB702A-GMtech LE                                               
                                                                                
U-Boot 1.1.4 un  5 213 - 10:49:39) Marvell ersi3.6.0                            
                                                                                
UBoot code: 00600000 > 0067FFF0  BSS: -> 006CB00                                
                                                                                
Sc: 88F672 A1 C runni @ 1000hz L2 rnning @ 500Mhz                               
ysClock  400Mh , TClok = 166Mhz                                                 
                                                                                
DAM (DDR) CAS Latcy = 5tRP = 5 tRAS = 18 tRCD=6                                 
DRAM C[0] bae 0x0000000   ize 256M                                              
DRAM Total sze 256M 16bit dth                                                   
Addresses 8M - 0M re saved for the U-Boot usage.                                
*** Warnin-badCRC oNAN,sinfau envroment MB                                      
                                                                                
Flsh:  kB                                                                       
                                                                                
CP: MrvFroo v                                                                   
remibled                                                                        
llisl                                                                           
U md                                                                            
Hit any key op ao:  3  0Marvell>> "3DUwDUfwDU�3w�Dw�"3Dw�"�"3�"3Uf"DUw�"3
you see there characters are missing or getting strange while kwboot tries to submit the file.

baudrate is 115200 on minicom

I did also a md md ff00003c, but got zeros back...

What to try else?
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 03:33AM
saschbaer,

Quote

* MARVLL BARD: DB702A-GMtech LE

U-Boot 1.1.4 un 5 213 - 10:49:39) Marvell ersi3.6.0

UBoot code: 00600000 > 0067FFF0 BSS: -> 006CB00

Sc: 88F672 A1 C runni @ 1000hz L2 rnning @ 500Mhz
ysClock 400Mh , TClok = 166Mhz

DAM (DDR) CAS Latcy = 5tRP = 5 tRAS = 18 tRCD=6
DRAM C[0] bae 0x0000000 ize 256M
DRAM Total sze 256M 16bit dth
Addresses 8M - 0M re saved for the U-Boot usage.
*** Warnin-badCRC oNAN,sinfau envroment MB

Flsh: kB

CP: MrvFroo v
remibled
llisl
U md
Hit any key op ao: 3 0Marvell>> "3DUwDUfwDU�3w�Dw�"3Dw�"�"3�"3Uf"DUw�"3

This indicated that kwboot did not handshake with box. So it did not run. Stock u-boot has started and running.

This is the correct command:
kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa310s.mtd0.kwb -p

And minicom should not be run. Only kwboot command should be executed. kwboot is the serial console while you are running it.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/11/2017 03:36AM by bodhi.
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 03:49AM
Hello again...
I closed minicom, started your command (with and without -p)
But theres only the fast spinning character, no feedback from the nas...

I also checked TXD/RXD, and if i changed and started the spinning character went really slow then.
as i changed back TXD/RXD its running fast again...
any idea?
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 04:19AM
saschbaer,

You already have the correct RXD and TXD connection when you used minicom, and could interrupt stock u-boot at countdown. And when kwboot slows down, it senses some character at the port that it can't recognize. So it is not RXD/TXD.

I think the bad news is most likely your box does not support UART booting (same as some of the Kirkwood boxes such as Dockstar, Pogo E02,...).

However, you could keep trying to control-C and then restart kwboot for 10, 20 times (without recycling power) to see if it helps.

And also try running kwboot while gently pressing down on the TXD and RXD wire connectors (at the board serial header).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 04:53AM
bodhi,
may you have a look here
https://forum.doozan.com/read.php?2,32877,33022,quote=1

helge seems to have nanddumped the original md0,1,2 from a Medion Nas.

May it be an idea testing if those uboot dumps can be flashed on my nas?
seems the same confuguration just that he has a 2x2 TB and me 2x4 TB.
What do you think, and if you agree, how do I get the dumps flashed then?
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 05:14AM
========= helge's log

 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  3  2  1  0

It's a different Medion NAS model, but u-boot does look identical.

But you don't need to reflash u-boot. Just use helge's posted envs to restore your box to a a good default set. See the envs text file attached in the 1st post: https://forum.doozan.com/read.php?2,32877,32877#msg-32877

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 10:02AM
Happy News bodhi...
with the help of helge i managed to set the NAS back to factory setting, reflashing the origin sys AND kept my data *bigsighofrelief*

So, we may can start to manage Debian on the NAS.
So ..what do we need at first now?
It would be very nice if you can assist :-D and many many thanks for your help up to this point.
Regards
Saschbaer
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 11, 2017 02:57PM
saschbaer,

Cool :)

Now you can read helge's thread to see how the new Debian rootfs can be booted on USB.

1. Create the Debian rootfs on USB first:
https://forum.doozan.com/read.php?2,12096

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb

And remember to check the hash of what you download, as always.


2. Verify your u-boot can boot USB:

Power up interrupt serial console and

usb start

3. Repeat what helge did in setting up the envs. You might want to list the setenv commands that you will execute here, so I can help look over for any error or things that we want to avoid doing at serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 12, 2017 05:13AM
Well I created the USB Stick (Intenso 32 GB) as root with ext3, extracted the tar...
i choosed kirkwood320s, did the build on my Ubuntu x64 laptop,
root@SaschSamsung:/media/sdd1/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt  uImage
Image Name:   Linux-4.12.1-kirkwood-tld-1
Created:      Sun Nov 12 12:43:05 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3834820 Bytes = 3744.94 kB = 3.66 MB
Load Address: 00008000
Entry Point:  00008000
root@SaschSamsung:/media/sdd1/boot# sync
and then brought it to my Medion.

I entered that:
setenv mainlineLinux yes
setenv set_bootargs 'setenv bootargs console=ttyS0,115200'
setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
setenv usb_boot 'usb start; run set_bootargs; run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000'
run usb_boot

and the bootlog after that made:
USB:   scanning bus for devices... 1 USB Device(s) found                        
Waiting for storage device(s) to settle before scanning...                      
0 Storage Device(s) found
USB part made:
print_part of 0                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 1                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 2                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 3                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 4                                                                 
## Unknown partition table

when I boot up with plugged USB stick i get this:
       __  __                      _ _                                        
        |  \/  | __ _ _ ____   _____| | |                                       
        | |\/| |/ _` | '__\ \ / / _ \ | |                                       
        | |  | | (_| | |   \ V /  __/ | |                                       
        |_|  |_|\__,_|_|    \_/ \___|_|_|                                       
 _   _     ____              _                                                  
| | | |   | __ )  ___   ___ | |_                                                
| | | |___|  _ \ / _ \ / _ \| __|                                               
| |_| |___| |_) | (_) | (_) | |_                                                
 \___/    |____/ \___/ \___/ \__|                                               
 ** MARVELL BOARD: DB6702A-GMtech LE                                            
                                                                                
U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0                    
                                                                                
U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00                             
                                                                                
Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz                       
SysClock = 400Mhz , TClock = 166Mhz                                             
                                                                                
DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6                            
DRAM CS[0] base 0x00000000   size 256MB                                         
DRAM Total size 256MB  16bit width                                              
Addresses 8M - 0M are saved for the U-Boot usage.                               
Mem malloc Initialization (8M - 7M): Done                                       
NAND:256 MB                                                                     
Flash:  0 kB                                                                    
                                                                                
CPU : Marvell Feroceon (Rev 1)                                                  
                                                                                
Streaming disabled                                                              
Write allocate disabled                                                         
                                                                                
                                                                                
USB 0: host mode                                                                
PEX 0: PCI Express Root Complex Interface                                       
PEX interface detected Link X1                                                  
Net:   egiga0 [PRIME]                                                           
Hit any key to stop autoboot:  0                                                
                                                                                
NAND read: device 0 offset 0x100000, size 0x400000                              
                                                                                
Reading data from 0x4ff800 -- 100% complete.                                    
 4194304 bytes read: OK                                                         
## Booting image at 00800000 ...                                                
   Image Name:   Linux-2.6.31.8                                                 
   Created:      2014-02-19  22:12:57 UTC                                       
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    3163392 Bytes =  3 MB                                          
   Load Address: 00008000                                                       
   Entry Point:  00008000                                                       
   Verifying Checksum ... OK                                                    
OK                                                                              
                                                                                
Starting kernel ...                                                             
                                                                                
Linux version 2.6.31.8 (mostafah@es5x86.axentra.com) (gcc version 4.3.2 (sdk3.34
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977              
CPU: VIVT data cache, VIVT instruction cache                                    
Machine: Feroceon-KW                                                            
Using UBoot passing parameters structure                                        
Memory policy: ECC disabled, Data cache writeback                               
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 65024     
Kernel command line: console=ttyS0,115200 ubi.mtd=2,2048 root=ubi0:rootfs rootfc
PID hash table entries: 1024 (order: 10, 4096 bytes)                            
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)                 
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)                   
Memory: 256MB = 256MB total                                                     
Memory: 247680KB available (4784K code, 283K data, 720K init, 0K highmem)       
Hierarchical RCU implementation.                                                
NR_IRQS:128                                                                     
Console: colour dummy device 80x30                                              
Calibrating delay loop... 999.42 BogoMIPS (lpj=4997120)                         
Mount-cache hash table entries: 512                                             
CPU: Testing write buffer coherency: ok                                         
NET: Registered protocol family 16                                              
Feroceon L2: Enabling L2                                                        
Feroceon L2: Cache support initialised.                                         
[BlueDBG] mvBoardIdGet()= 0x<NULL>                                              
                                                                                
CPU Interface                                                                   
-------------                                                                   
SDRAM_CS0 ....base 00000000, size 256MB                                         
SDRAM_CS1 ....disable                                                           
SDRAM_CS2 ....disable                                                           
SDRAM_CS3 ....disable                                                           
PEX0_MEM ....base e0000000, size 128MB                                          
PEX0_IO ....base f2000000, size   1MB                                           
PEX1_MEM ....no such                                                            
PEX1_IO ....no such                                                             
INTER_REGS ....base f1000000, size   1MB                                        
NFLASH_CS ....base fa000000, size   2MB                                         
SPI_CS ....base f4000000, size  16MB                                            
BOOT_ROM_CS ....no such                                                         
DEV_BOOTCS ....no such                                                          
CRYPT_ENG ....base f0000000, size   2MB                                         
                                                                                
  Marvell Development Board (LSP Version KW_LSP_5.1.3_patch30)-- DB6702A-GMtechE
                                                                                
 Detected Tclk 166666667 and SysClk 400000000                                   
MV Buttons Device Load                                                          
btns_init_data - DB 6702A                                                       
btns_init_data - Number of configured buttons: 2                                
Marvell USB EHCI Host controller #0: c8040740                                   
PEX0 interface detected Link X1                                                 
PCI: bus0: Fast back to back transfers disabled                                 
mvPexLocalBusNumSet: ERR. Invalid PEX interface 1                               
bio: create slab <bio-0> at 0                                                   
SCSI subsystem initialized                                                      
usbcore: registered new interface driver usbfs                                  
usbcore: registered new interface driver hub                                    
usbcore: registered new device driver usb                                       
NET: Registered protocol family 2                                               
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)                  
TCP established hash table entries: 8192 (order: 4, 65536 bytes)                
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)                       
TCP: Hash tables configured (established 8192 bind 8192)                        
TCP reno registered                                                             
NET: Registered protocol family 1                                               
RTC has been updated!!!                                                         
rtc mv_rtc: rtc core: registered kw-rtc as rtc0                                 
RTC registered                                                                  
cpufreq: Init kirkwood cpufreq driver                                           
XOR registered 4 channels                                                       
XOR 2nd invalidate WA enabled                                                   
cesadev_init(c000e0bc)                                                          
mvCesaInit: sessions=640, queue=64, pSram=f0000000                              
Warning: TS unit is powered off.                                                
MV Buttons Driver Load                                                          
SGI XFS with security attributes, large block/inode numbers, no debug enabled   
msgmni has been set to 484                                                      
alg: No test for cipher_null (cipher_null-generic)                              
alg: No test for ecb(cipher_null) (ecb-cipher_null)                             
alg: No test for digest_null (digest_null-generic)                              
alg: No test for compress_null (compress_null-generic)                          
alg: No test for stdrng (krng)                                                  
alg: No test for hmac(digest_null) (hmac(digest_null-generic))                  
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)            
io scheduler noop registered                                                    
io scheduler anticipatory registered (default)                                  
Initializing ths8200_init                                                       
Initializing dove_adi9889_init                                                  
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled                        
serial8250.0: ttyS0 at MMIO 0xf1012100 (irq = 34) is a 16550A                   
console [ttyS0] enabled                                                         
Integrated Sata device found                                                    
IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs                   
scsi0 : Marvell SCSI to SATA adapter                                            
scsi1 : Marvell SCSI to SATA adapter                                            
Loading Marvell Ethernet Driver:                                                
  o Cached descriptors in DRAM                                                  
  o DRAM SW cache-coherency                                                     
  o 1 Giga ports supported                                                      
  o Single RX Queue support - ETH_DEF_RXQ=0                                     
  o Single TX Queue support - ETH_DEF_TXQ=0                                     
  o TCP segmentation offload (TSO) supported                                    
  o Large Receive offload (LRO) supported                                       
  o Receive checksum offload supported                                          
  o Transmit checksum offload supported                                         
  o Network Fast Processing (Routing) supported - (Disabled)                    
  o Driver ERROR statistics enabled                                             
  o Proc tool API enabled                                                       
  o SKB Reuse supported - (Disabled)                                            
  o SKB Recycle supported - (Disabled)                                          
  o Rx descripors: q0=128                                                       
  o Tx descripors: q0=532                                                       
  o Loading network interface(s):                                               
     o register under mv88fx_eth platform                                       
     o eth0, ifindex = 2, GbE port = 0                                          
                                                                                
mvFpRuleDb (c8238000): 2048 entries, 8192 bytes                                 
Counter=0, opIdx=6, overhead=16                                                 
Counter=1, opIdx=2, overhead=0                                                  
Counter=2, opIdx=1, overhead=18                                                 
Counter=3, opIdx=2, overhead=0                                                  
Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI                       
Copyright (c) 1999-2006 Intel Corporation.                                      
e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2                             
e1000e: Copyright (c) 1999-2008 Intel Corporation.                              
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI                           
e100: Copyright(c) 1999-2006 Intel Corporation                                  
Using Hamming 1-bit ECC for NAND device                                         
NAND device: Manufacturer ID: 0xc8, Chip ID: 0xda (Zentel NAND 256MiB 3,3V 8-bi)
Scanning device for bad blocks                                                  
Using static partition definition                                               
Creating 3 MTD partitions on "nand_mtd":                                        
0x000000000000-0x000000100000 : "u-boot"                                        
0x000000100000-0x000000700000 : "uImage"                                        
0x000000700000-0x000010000000 : "rootfs"                                        
UBI: attaching mtd2 to ubi0                                                     
UBI: physical eraseblock size:   131072 bytes (128 KiB)                         
UBI: logical eraseblock size:    126976 bytes                                   
UBI: smallest flash I/O unit:    2048                                           
UBI: sub-page size:              512                                            
UBI: VID header offset:          2048 (aligned 2048)                            
UBI: data offset:                4096                                           
UBI: attached mtd2 to ubi0                                                      
UBI: MTD device name:            "rootfs"                                       
UBI: MTD device size:            249 MiB                                        
UBI: number of good PEBs:        1992                                           
UBI: number of bad PEBs:         0                                              
UBI: max. allowed volumes:       128                                            
UBI: wear-leveling threshold:    4096                                           
UBI: number of internal volumes: 1                                              
UBI: number of user volumes:     1                                              
UBI: available PEBs:             0                                              
UBI: total number of reserved PEBs: 1992                                        
UBI: number of PEBs reserved for bad PEB handling: 38                           
UBI: max/mean erase counter: 3/0                                                
UBI: image sequence number: 0                                                   
usbmon: debugfs is not available                                                
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                      
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI                             
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1  
UBI: background thread "ubi_bgt0d" started, PID 460                             
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100                     
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00                     
hub 1-0:1.0: USB hub found                                                      
hub 1-0:1.0: 1 port detected                                                    
xhci_hcd 0000:00:01.0: xHCI Host Controller                                     
xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2            
xhci_hcd 0000:00:01.0: irq 9, io mem 0xe0000000                                 
xhci_hcd 0000:00:01.0: Failed to enable MSI-X                                   
xhci_hcd 0000:00:01.0: failed to allocate MSI entry                             
hub 2-0:1.0: USB hub found                                                      
hub 2-0:1.0: 2 ports detected                                                   
xhci_hcd 0000:00:01.0: xHCI Host Controller                                     
xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 3            
hub 3-0:1.0: USB hub found                                                      
hub 3-0:1.0: 2 ports detected                                                   
usbcore: registered new interface driver usblp                                  
Initializing USB Mass Storage driver...                                         
usbcore: registered new interface driver usb-storage                            
USB Mass Storage support registered.                                            
mice: PS/2 mouse device common for all mice                                     
i2c /dev entries driver                                                         
md: linear personality registered for level -1                                  
md: raid0 personality registered for level 0                                    
md: raid1 personality registered for level 1                                    
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
TCP cubic registered                                                            
NET: Registered protocol family 17                                              
RPC: Registered udp transport module.                                           
RPC: Registered tcp transport module.                                           
drivers/rtc/hctosys.c: unable to open rtc device (rtc)                          
Freeing init memory: 720K                                                       
Reset button not pressed                                                        
Proceeding normally.                                                            
UBIFS: recovery needed                                                          
usb 1-1: new high-speed USB device number 2 using ehci_marvell                  
UBIFS: recovery completed                                                       
UBIFS: mounted UBI device 0, volume 0, name "rootfs"                            
UBIFS: file system size:   239857664 bytes (234236 KiB, 228 MiB, 1889 LEBs)     
UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)             
UBIFS: media format:       w4/r0 (latest is w4/r0)                              
UBIFS: default compressor: zlib                                                 
UBIFS: reserved for root:  0 bytes (0 KiB)                                      
scsi2 : usb-storage 1-1:1.0                                                     
INIT: version 2.86 booting                                                      
                Welcome to HipServ                                              
                Press 'I' to enter interactive startup.                         
System clock set to hardware clock.                                             
Setting clock  (utc): Sun Nov 12 13:08:26 CET 2017 [  OK  ]                     
Starting udev: [  OK  ]                                                         
Setting hostname orionnas:  [  OK  ]                                            
Setting up Logical Volume Management:   No volume groups found                  
[  OK  ]                                                                        
Checking filesystems                                                            
Checking all file systems.                                                      
[  OK  ]                                                                        
Mounting local filesystems:  mount: sysfs already mounted or /sys busy          
mount: according to mtab, /sys is already mounted on /sys                       
[FAILED]                                                                        
Enabling /etc/fstab swaps:  [  OK  ]                                            
INIT: Entering runlevel: 3                                                      
Entering non-interactive startup                                                
HipServ startup:Alarm cleared.                                                  
[FAILED]                                                                        
Starting medion-lifecycle:[  OK  ]                                              
Starting reset:  [  OK  ]                                                       
Bringing up loopback interface:  [  OK  ]                                       
Bringing up interface eth0:                                                     
Determining IP information for eth0... done.                                    
[  OK  ]                                                                        
check_igd.pl: no process killed                                                 
[  OK  ] igd-daemon:[  OK  ]                                                    
Starting system logger: [  OK  ]                                                
Starting kernel logger: [  OK  ]                                                
Starting locator:[  OK  ]                                                       
Starting system message bus: [  OK  ]                                           
Starting sshd: [  OK  ]                                                         
Starting cups: [  OK  ]                                                         
Starting xinetd: [  OK  ]                                                       
Starting vsftpd for vsftpd: [  OK  ]                                            
Starting backupagent: [  OK  ]                                                  
Starting httpd: [  OK  ]                                                        
Starting appserver: [  OK  ]                                                    
Starting crond: [  OK  ]                                                        
Starting Netatalk services:                                                     
  Starting cnid_metad:[  OK  ]                                                  
  Starting afpd:[  OK  ]                                                        
                                                                                
Starting SMB services: [  OK  ]                                                 
Starting NMB services: [  OK  ]                                                 
Starting OEone System Proxy: SPD starting....log level=1, uid=0                 
                                                                                
[  OK  ]                                                                        
Starting Avahi daemon... [  OK  ]                                               
0                                                                               
Starting DAAP server: [  OK  ]                                                  
Starting mynetworkd:[  OK  ]                                                    
    HipServ - Checking if RAID needs to be rebuilt                              
         Starting RAID monitor                                                  
1889                                                                            
        HipServ - Updating RAID lights                                          
    HipServ - Bringing up iptables                                              
    HipServ - Updating date...                                                  
        success                                                                 
    HipServ - Enabling swap                                                     
         *** WARNING: Could not start swapfile ***                              
    HipServ - Cleaning USB mountpoints                                          
    HipServ - Mounting USB devices                                              
tntfs: module license 'Commercial. For support email ntfs-support@tuxera.com.' .
Disabling lock debugging due to kernel taint                                    
                                                                                
    HipServ -  Checking for FTPS certificate                                    
        HipServ - Found vsftpd key file                                         
    HipServ -  Ensuring that table structures are up-to-date                    
    HipServ - Checking for updates...                                           
        success                                                                 
HipServ - boot complete                                                         
Starting spindownd.init:  [  OK  ]                                              
Starting webmin:  [FAILED]

So Axentra recognizes the stick...u-boot does not it seems.
May you can help?
Regards
Saschbaer
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 12, 2017 04:19PM
Indeed, the USB partition is not recognized

USB:   scanning bus for devices... 1 USB Device(s) found                        
Waiting for storage device(s) to settle before scanning...                      
0 Storage Device(s) found
USB part made: 
print_part of 0                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 1                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 2                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 3                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 4                                                                 
## Unknown partition table

Have you tried a different USB flash drive?

I have not check helge posts to see if I remember anything we need to do that is out of the ordinary. Yould could read that thread to see if you can spot anything special.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 15, 2017 03:12PM
use a different type of usb stick. some work some dont.
good luck!
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 12:59AM
Hi,
after a few try and errors (and reflashing) I noticed something in another forum:
if you gpart an usb stick with ext2 name it boot and another ext4 name it rootfs the stick will be recognized correctly.

also I found out that maybe the NAS NSA325 seems to have the same config as my Medion P89654.

Maybe i should try to get the boot parts onto boot partition and the rest in rootfs?

Do i also have to adapt then the zImage file?
Or shall I reflash with a newer uBoot and then continue with the stick?

I found the manual in here
https://micha.stoecker.me/p/DNVpwG47

Regards
Saschbaer
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 03:18AM
saschbaer,

> after a few try and errors (and reflashing) I
> noticed something in another forum:
> if you gpart an usb stick with ext2 name it boot
> and another ext4 name it rootfs the stick will be
> recognized correctly.

It is unecessary to have 2 partitions. Use one partition type Ext3 or Ext2.


>
> also I found out that maybe the NAS NSA325 seems
> to have the same config as my Medion P89654.
>

That's is wrong information. Medion P89654 uses 88F6702 SoC, which is the same as the Pogo V4 or NSA310S/320S.

Quote

U-Boot 1.1.4 (Jun 5 2013 - 10:49:39) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz


> Maybe i should try to get the boot parts onto boot
> partition and the rest in rootfs?

Negative. You are going to a wrong direction there.

What you should do is figure out why this error occurred:

Quote

USB: scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
USB part made:
print_part of 0
## Unknown partition table

print_part of 1
## Unknown partition table

print_part of 2
## Unknown partition table

print_part of 3
## Unknown partition table

print_part of 4
## Unknown partition table

This bootlog indicated that the USB is supported (it was scanning). And somehow the partition table is unrecognized on this USB drive. So there is no storage drive.

So do this test. Power up, interrupt serial console and

usb start
usb part
ext2ls usb 0:1 /boot
If you can list the content of the /boot folder on the rootfs at u-boot prompt, then the partition is good. If not, then the partition is bad (or unrecognized).

If somehow this u-boot does not support Ext3 (I'd doubt this is the case), then just recreate the rootfs and use a single Ext2 partition will work.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 07:38AM
OK. formatted with ext2, created rootfs, made the dts with kirkwoodnsa320s
uBoot recognized the stick and shows
USB:   scanning bus for devices... 2 USB Device(s) found                        
Waiting for storage device(s) to settle before scanning...                      
1 Storage Device(s) found  

usb part
print_part of 0                                                                 
                                                                                
Partition Map for USB device 0  --   Partition Type: DOS                        
                                                                                
Partition     Start Sector     Num Sectors     Type                             
    1                 2048        62408704      83                              
                                                                                
print_part of 1                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 2                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 3                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 4                                                                 
## Unknown partition table  

ext2ls usb 0:1 /boot                                                  
<DIR>       4096 .                                                              
<DIR>       4096 ..                                                             
          153501 config-4.12.1-kirkwood-tld-1                                   
         3821528 vmlinuz-4.12.1-kirkwood-tld-1                                  
         7245632 initrd.img-4.12.1-kirkwood-tld-1                               
         7245696 uInitrd                                                        
         8435004 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb              
<DIR>       4096 dts                                                            
         3821528 zImage-4.12.1-kirkwood-tld-1                                   
         3834884 uImage                                                         
         2504031 System.map-4.12.1-kirkwood-tld-1                               
         3834820 zImage.fdt                                                     
         3821592 uImage.orig

but when I try to boot...
Marvell>> run usb_boot                                                          
(Re)start USB...                                                                
USB:   scanning bus for devices... 1 USB Device(s) found                        
Waiting for storage device(s) to settle before scanning...                      
0 Storage Device(s) found                                                       
** Bad partition 1 **                                                           
** Bad partition 1 **                                                           
## Booting image at 00800000 ...                                                
Bad Magic Number
It seems that when I reset it, the partition won't be recognized again until I reset the NAS...strange...

Regards
saschbaer
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 03:28PM
saschbaer,

Very good. It means that Ext3 or Ext2 will work. And there is nothing wrong with your USB partition.

It seems stock u-boot is messed up in reinitializing the USB drive. The 2nd "usb start" caused problem.

Try running it step by step

Power up, interrupt serial console and:

setenv mainlineLinux yes
setenv set_bootargs 'setenv bootargs console=ttyS0,115200'
setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
run set_bootargs
usb start
usb part
run usb_load_uimage
run usb_load_uinitrd
bootm 0x800000 0x1100000

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 04:00PM
okay...
Marvell>> setenv mainlineLinux yes                                              
Marvell>> setenv set_bootargs 'setenv bootargs console=ttyS0,115200'            
Marvell>> setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'       
Marvell>> setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'    
Marvell>> run set_bootargs                                                      
Marvell>> usb start                                                             
(Re)start USB...                                                                
USB:   scanning bus for devices... 2 USB Device(s) found                        
Waiting for storage device(s) to settle before scanning...                      
1 Storage Device(s) found                                                       
Marvell>> usb part                                                              
print_part of 0                                                                 
                                                                                
Partition Map for USB device 0  --   Partition Type: DOS                        
                                                                                
Partition     Start Sector     Num Sectors     Type                             
    1                 2048        62408704      83                              
                                                                                
print_part of 1                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 2                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 3                                                                 
## Unknown partition table                                                      
                                                                                
print_part of 4                                                                 
## Unknown partition table                                                      
Marvell>> run usb_load_uimage                                                   
....                                                                            
.                                                                               
......                                                                          
............                                                                    
.........................                                                       
...................................................                             
................................................................................
................................................................................
                                                                                
3834884 bytes read                                                              
Marvell>> run usb_load_uinitrd                                                  
....                                                                            
.                                                                               
......                                                                          
............                                                                    
.........................                                                       
...................................................                             
................................................................................
................................................................................
....                                                                            
................................................................................
                                                                                
7245696 bytes read                                                              
Marvell>> bootm 0x800000 0x1100000                                              
## Booting image at 00800000 ...                                                
   Image Name:   Linux-4.12.1-kirkwood-tld-1                                    
   Created:      2017-11-18  13:59:37 UTC                                       
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    3834820 Bytes =  3.7 MB                                        
   Load Address: 00008000                                                       
   Entry Point:  00008000                                                       
   Verifying Checksum ... OK                                                    
OK                                                                              
## Loading Ramdisk Image at 01100000 ...                                        
   Image Name:   initramfs-4.12.1-kirkwood-tld-1                                
   Created:      2017-07-24   0:18:23 UTC                                       
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)                      
   Data Size:    7245632 Bytes =  6.9 MB                                        
   Load Address: 00000000                                                       
   Entry Point:  00000000                                                       
   Verifying Checksum ... OK                                                    
                                                                                
Starting kernel ...
and then nothing more...
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 04:13PM
saschbaer,

Cool! so that was the problem with USB on this stock u-boot all along :) this u-boot is quite old.

Let's try with earlyprink:

setenv mainlineLinux yes
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 earlyprintk=serial'
setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
run set_bootargs
usb start
usb part
run usb_load_uimage
run usb_load_uinitrd
bootm 0x800000 0x1100000

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to get Debian on a Medion NAS P89654 2x4 TB?
November 18, 2017 05:35PM
did it, but same as before...
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 3 plus 14?
Message: