General NAS-Central Forums

Welcome to the NAS community
It is currently Mon Sep 25, 2017 5:02 pm

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: FW Problem
PostPosted: Wed Sep 17, 2014 6:45 am 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
Hi, i have problem with NSA210. I'm unable to instal system to nas. It looks like corrupted FW in flash memory.

here is log from console (no hdd insterted):

Code:
1.00 U-Boot 1.1.2 (Apr 10 2009 - 16:43:58)

U-Boot code: 48D00000 -> 48D17270  BSS: -> 48D1AF20
RAM Configuration:
Bank #0: 48000000 128 MB
SRAM Configuration:
128KB at 0x58000000
Flash:  4 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  2  1  0
## Booting image at 41020000 ...
   Image Name:   Linux-2.6.24.4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1771216 Bytes =  1.7 MB
   Load Address: 48008000
   Entry Point:  48008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................................................. done, booting the kernel.
Linux version 2.6.24.4 (root@Neo) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #1 Thu Jul 19 16:51:18 CST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Oxsemi NAS
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200n8 root=/dev/ram0 rw init=/sbin/init initrd=0x4a000000,4M elevator=cfq mtdparts=physmap-flash.0:128k(uboot),1792k(kernel),1664k(initrd),448k(etc),48k(empty),8k(env1),8k(env2) mem=128M poweroutage=yes
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 122240KB available (3188K code, 198K data, 116K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
Number of DMA channels = 5, version = 4
Allocating 891 SRAM generic DMA descriptors
Chip Id: die-id 0x0b34bab1e5c0 read back 0xbeefcafe
PCI: bus0: Fast back to back transfers enabled
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: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 4096K
Probing for Synopsis GMAC, unit 0
eth0: PHY is ICPlus 1001
phy init done
eth0: GMAC ver = 51, vendor ver = 17 at 0xe8000000, IRQ 8
eth0: Found PHY at address 1, type 0x02430d90 -> 10/100/1000
eth0: Ethernet addr: 00:30:e0:00:00:00
Init phy sucessfully
thermAndFan: initializing - ox810
Init led blk
Enable Interrupt
Copy button
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x44900000 (irq = 29) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: module loaded
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
ox810sata: OX810 sata core.
scsi0 : oxnassata
ata1: SATA max UDMA/133 irq 18
ata_eh_reset(2207):Sleep 1 sec before any error happens
Copy button release
ata1: SATA link down (SStatus 0 SControl 300)
ox810sata: OX810 sata core.
scsi1 : oxnassata
ata2: SATA max UDMA/133 irq 18
ata_eh_reset(2207):Sleep 1 sec before any error happens
ata2: SATA link down (SStatus 0 SControl 300)
physmap platform flash device: 00400000 at 41000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
7 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 7 MTD partitions on "physmap-flash.0":
0x00000000-0x00020000 : "uboot"
mtd: Giving out device 0 to uboot
0x00020000-0x001e0000 : "kernel"
mtd: Giving out device 1 to kernel
0x001e0000-0x00380000 : "initrd"
mtd: Giving out device 2 to initrd
0x00380000-0x003f0000 : "etc"
mtd: Giving out device 3 to etc
0x003f0000-0x003fc000 : "empty"
mtd: Giving out device 4 to empty
0x003fc000-0x003fe000 : "env1"
mtd: Giving out device 5 to env1
0x003fe000-0x00400000 : "env2"
mtd: Giving out device 6 to env2
10 Dec 2004 USB 2.0 'Enhanced' Host Controller (EHCI) Driver@e7000000 Device ID register 42fa05
oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
oxnas-ehci oxnas-ehci.0: irq 7, io mem 0x00000000
oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
USB Universal Host Controller Interface driver v3.0
sl811: driver sl811-hcd, 19 May 2005
usb 1-1: new high speed USB device using oxnas-ehci and address 2
In hub_port_init, and number is 0, retry 0, port 1 .....
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 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
pcf8563 0-0051: chip found, driver version 0.4.2
pcf8563 0-0051: rtc core: registered pcf8563 as rtc0
OXNAS bit-bash I2C driver initialisation OK
md: linear personality registered for level -1
md: raid1 personality registered for level 1
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc)
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 32768) 8388608
RAMDISK: ran out of compressed data
invalid compressed format (err=1)
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 116K
EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #758: unaligned directory entry - offset=0, inode=1702129257, rec_len=26226, name_len=97

can't run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.


BusyBox v1.17.2 (2012-07-19 21:36:49 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ #

1.00 U-Boot 1.1.2 (Apr 10 2009 - 16:43:58)



Can you help me with this ???

THX


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 8:19 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Hm. It seems your initrd is damaged., but only partly, as you are running busybox from it. That must be fixable. That can be done on the u-boot prompt, but I'd rather do it from the Linux command line. Are you able to mount an usb stick to get a fresh initrd on the box?
Do you know which firmware version you are running?


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 8:39 am 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
After connection usb :

Code:
usb 1-1.2: new high speed USB device using oxnas-ehci and address 5
In hub_port_init, and number is 1, retry 0, port 2 .....
usb 1-1.2: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
scsi 4:0:0:0: Direct-Access     Alliance Flash Disk       5.00 PQ: 0 ANSI: 2
sd 4:0:0:0: [sda] 2005504 512-byte hardware sectors (1027 MB)
sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:0: [sda] 2005504 512-byte hardware sectors (1027 MB)
sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 4:0:0:0: [sda] Attached SCSI removable disk
sd 4:0:0:0: Attached scsi generic sg0 type 0


when i try mount it (a presume that this command i correct)

Code:
/dev # mount -vfat /dev/sg0 /mnt/usb/
mount: can't read '/etc/fstab': No such file or directory


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 9:25 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
No, it's not correct. it should be
Code:
mkdir -p /mnt/usb
mount -t vfat /dev/sda1 /mnt/usb
(BTW, no internal disk?)
When it still complains about fstab, just create an empty one:
Code:
mkdir -p /etc
touch /etc/fstab


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 9:35 am 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
Mijzelf wrote:
(BTW, no internal disk?)
Yes, no HDD

It seems that usb works well

Code:
/ # cd /mnt/
/mnt # ls -l
drwxr-xr-x    2 0        0             1024 Jul 19  2012 ram1
/mnt # mkdir -p /mnt/usb
/mnt # ls -l
drwxr-xr-x    2 0        0             1024 Jul 19  2012 ram1
drwxr-xr-x    2 0        0             1024 Jan  1 00:00 usb
/mnt # mount -t vfat /dev/sda1 /mnt/usb/
/mnt # cd usb/
/mnt/usb # ls -l
-rwxr-xr-x    1 0        0                0 Jan  1  1980 test.txt
-rwxr-xr-x    1 0        0                0 Jan  1  1980 test1.txt
/mnt/usb #


About fw version, i don't know, what version is installed :(


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 11:44 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
womec wrote:
About fw version, i don't know, what version is installed :(

womec wrote:
Code:
Linux version 2.6.24.4 (root@Neo) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #1 Thu Jul 19 16:51:18 CST 2012

I think it's 4.40(AFD.2)C0

According to the fw upgrade scripts, the initrd is flashed this way:
Code:
# InitRD image
if [ -s ${DISKPATH}/DATA_1002 ]; then
        echo "Dealing with DATA_1002 ..." >> ${LOG}
        ${SYSINIT_PATH}/flashcp ${DISKPATH}/DATA_1002 /dev/mtd2 0 16
        ${RM} -rf ${DISKPATH}/DATA_1002
fi

So just execute
Code:
cd /mnt/usb/
./flashcp DATA_1002 /dev/mtd2 0 16

I uploaded flashcp and DATA_1002 here.


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 12:15 pm 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
Thank you :) it works :) ... linux looks fully functional ... but unfortunately, i can't see NAS in zyxel starter utility. In console i see

Code:
MTD_open
MTD_ioctl
MTD_read
MTD_close
MTD_open
MTD_ioctl
MTD_read
MTD_close
MTD_open
MTD_ioctl
MTD_read
MTD_close


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 1:25 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
ZyXEL starter utility? Is that needed? Doesn't the webinterface work?

Quote:
Code:
MTD_open
MTD_ioctl
MTD_read
Apparently it's reading something from flash, regularly. The non-volatile configuration is stored in flash, so I guess there is some script/daemon which reads it.


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 1:31 pm 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
old hdd is gone ... I want to instal whole system from zero. This is why i need NSU... to install whole system again.


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 2:58 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Hm. Can you post me the current bootlog?


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Wed Sep 17, 2014 6:58 pm 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
I'll post it tomorrow. I left the NAS in my office. I'm from Czech Republic and there is 9 pm at this moment :)


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Fri Sep 19, 2014 6:02 am 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
There is last bootlog

Code:
1.00 U-Boot 1.1.2 (Apr 10 2009 - 16:43:58)

U-Boot code: 48D00000 -> 48D17270  BSS: -> 48D1AF20
RAM Configuration:
        Bank #0: 48000000 128 MB
SRAM Configuration:
        128KB at 0x58000000
Flash:  4 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting image at 41020000 ...
   Image Name:   Linux-2.6.24.4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1771216 Bytes =  1.7 MB
   Load Address: 48008000
   Entry Point:  48008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................................................. done, booting the kernel.
Linux version 2.6.24.4 (root@Neo) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #1 Thu Jul 19 16:51:18 CST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Oxsemi NAS
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200n8 root=/dev/ram0 rw init=/sbin/init initrd=0x4a000000,4M elevator=cfq mtdparts=physmap-flash.0:128k(uboot),1792k(kernel),1664k(initrd),448k(etc),48k(empty),8k(env1),8k(env2) mem=128M poweroutage=yes
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 122240KB available (3188K code, 198K data, 116K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
Number of DMA channels = 5, version = 4
Allocating 891 SRAM generic DMA descriptors
Chip Id: die-id 0x0b34bab1e5c0 read back 0xbeefcafe
PCI: bus0: Fast back to back transfers enabled
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: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 4096K
Probing for Synopsis GMAC, unit 0
eth0: PHY is ICPlus 1001
phy init done
eth0: GMAC ver = 51, vendor ver = 17 at 0xe8000000, IRQ 8
eth0: Found PHY at address 1, type 0x02430d90 -> 10/100/1000
eth0: Ethernet addr: 00:30:e0:00:00:00
Init phy sucessfully
thermAndFan: initializing - ox810
Init led blk
Enable Interrupt
Copy button
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
▒serial8250: ttyS0 at MMIO 0x44900000 (irq = 29) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: module loaded
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
ox810sata: OX810 sata core.
scsi0 : oxnassata
ata1: SATA max UDMA/133 irq 18
ata_eh_reset(2207):Sleep 1 sec before any error happens
Copy button release
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata_dev_read_id(2037): Give 100ms while getting HW ID
ata1.00: qc timeout (cmd 0xec)
ox810sata_bmdma_stop - aborting DMA
ox810sata aborting DMA.
ox810sata sending sync escapes
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
ata1: failed to recover some devices, retrying in 1 secs
ata_eh_reset(2207):Sleep 1 sec before any error happens
ata_wait_after_reset(3500):msleep(6000);
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata_dev_read_id(2037): Give 100ms while getting HW ID
ata1.00: ATA-8: WDC WD2502ABYS-02B7A0, 02.03B03, max UDMA/133
ata1.00: 490350672 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata1.00: Drive reports diagnostics failure. This may indicate a drive
ata1.00: fault or invalid emulation. Contact drive vendor for information.
ata_dev_read_id(2037): Give 100ms while getting HW ID
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     WDC      WDC WD2502ABYS-0 02.0 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 490350672 512-byte hardware sectors (251060 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 490350672 512-byte hardware sectors (251060 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
ox810sata: OX810 sata core.
scsi1 : oxnassata
ata2: SATA max UDMA/133 irq 18
ata_eh_reset(2207):Sleep 1 sec before any error happens
ata2: SATA link down (SStatus 0 SControl 300)
physmap platform flash device: 00400000 at 41000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
7 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 7 MTD partitions on "physmap-flash.0":
0x00000000-0x00020000 : "uboot"
mtd: Giving out device 0 to uboot
0x00020000-0x001e0000 : "kernel"
mtd: Giving out device 1 to kernel
0x001e0000-0x00380000 : "initrd"
mtd: Giving out device 2 to initrd
0x00380000-0x003f0000 : "etc"
mtd: Giving out device 3 to etc
0x003f0000-0x003fc000 : "empty"
mtd: Giving out device 4 to empty
0x003fc000-0x003fe000 : "env1"
mtd: Giving out device 5 to env1
0x003fe000-0x00400000 : "env2"
mtd: Giving out device 6 to env2
10 Dec 2004 USB 2.0 'Enhanced' Host Controller (EHCI) Driver@e7000000 Device ID register 42fa05
oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
oxnas-ehci oxnas-ehci.0: irq 7, io mem 0x00000000
oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
USB Universal Host Controller Interface driver v3.0
sl811: driver sl811-hcd, 19 May 2005
usb 1-1: new high speed USB device using oxnas-ehci and address 2
In hub_port_init, and number is 0, retry 0, port 1 .....
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 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
pcf8563 0-0051: chip found, driver version 0.4.2
pcf8563 0-0051: rtc core: registered pcf8563 as rtc0
OXNAS bit-bash I2C driver initialisation OK
md: linear personality registered for level -1
md: raid1 personality registered for level 1
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc)
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 116K
MTD_open
MTD_ioctl
MTD_read
MTD_close
MTD_open
MTD_ioctl
MTD_read
MTD_close
Mounting file systems...
MTD_open
MTD_ioctl
MTD_read
MTD_close
MTD_open
MTD_ioctl
MTD_read
MTD_close
egiga0: PHY is ICPlus 1001
Resetting GMAC
GMAC reset complete
ifconfig: bad address 'add'
pcf8563 0-0051: low voltage detected, date/time is not reliable.
Starting udhcpc ...
udhcpc (v1.17.2) started
Sending discover...
sda
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
No model ID in HD!
 >>> System disk doesn't exist! <<<
Starting Pure-FTPd ...
Starting NDU agent for initialization ...
egiga0: PHY is ICPlus 1001
MTD_open
MTD_ioctl
MTD_read
MTD_close
MTD_open
MTD_ioctl
MTD_read
MTD_close
egiga0: link down
Sending discover...
sda
checking sda
Trying to mount /dev/sda1
EXT3-fs: Unrecognized mount option "iocharset=utf8" or missing value
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
mount: mounting /dev/sda1 on /mnt/parnerkey failed: Invalid argument
Fail to mount /dev/sda1

Please press Enter to activate this console. Sending discover...



BusyBox v1.17.2 (2012-07-19 21:36:49 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ #
/ # No lease, forking to background


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Sat Sep 20, 2014 10:28 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
The startscript /etc/init.d/rcS checks the hardware, and calls /etc/init.d/rcS.210. (The other option is /etc/init.d/rcS.221, for the '221),
The file contains these lines:
Code:
/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 hw ether `/zyxel/sbin/mrd_mac eth0`
/bin/ip link set dev eth0 name egiga0

/sbin/ifconfig egiga0 192.168.1.3
/bin/ip route append default via 192.168.1.1 dev egiga0
/sbin/ifconfig lo add 127.0.0.1 netmask 255.0.0.0
/sbin/ifconfig lo up

# Set system time as HW clock time
/sbin/hwclock -s

# Run DHCP client in background. According to code, if getting IP failed, it retries in 60 seconds.
${ECHO} "Starting udhcpc ..."
/sbin/udhcpc -i egiga0 -s /usr/share/udhcpc/default.script -b &
And this is the corresponding output:
Code:
egiga0: PHY is ICPlus 1001
Resetting GMAC
GMAC reset complete
ifconfig: bad address 'add'
pcf8563 0-0051: low voltage detected, date/time is not reliable.
Starting udhcpc ...
udhcpc (v1.17.2) started
Sending discover...
So apparently your clock battery is empty (not important for your problem)

Then the firmware tries to recognize the disk, and fails:
Code:
sda
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
No model ID in HD!
 >>> System disk doesn't exist! <<<
and falls back to the 'no_disk_handler()':
Code:
no_disk_handler()
{
        # Try to umount ${DISKPATH}; we don't need a non-NSA210 system disk.
        /bin/umount ${DISKPATH} > /dev/null 2>&1

        # Create a tmpfs for sysinit
        /bin/mkdir -p ${SYSINIT_PATH}
        /bin/mount -t tmpfs none ${SYSINIT_PATH} -o size=30m > /dev/null 2>&1

        # Allow a user 'sysinit' to login FTP server
        /bin/sed -i -e "s/^sysinit:\!\!:/sysinit:${SYSINIT_PASSWD}:/g" /etc/shadow
        echo "Starting Pure-FTPd ..."
        /bin/pure-ftpd.official `/bin/cat /etc/pure-ftpd.arg`

        echo "Starting NDU agent for initialization ..."
        /sbin/init_nduagent
with the output:
Code:
Starting Pure-FTPd ...
Starting NDU agent for initialization ...

So everrything runs as expected. Next output is related to trying to find and usb_key_func() stick (an FFP stick, for instance), and the very last line contains the problem:
Code:
No lease, forking to background
The dhcp client fails to alloc an ip address, which means NDU agent cannot be discovered. There are 3 possibilities:
  • You don't have a dhcpserver, or it's misconfigured.
  • Your network is failing (cabling, switches)
  • The network port of the '210 is dead.
If you just don't have a dhcp server, you can assign an ip address manually:
Code:
killall udhcpc
ifconfig egiga0 <ipaddress> netmask 255.255.255.0 up


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Mon Sep 22, 2014 6:30 am 
Offline

Joined: Wed Sep 17, 2014 6:40 am
Posts: 10
I think eth. port is OK

Code:
egiga0: link down
egiga0: link up, 100Mbps, full-duplex, using pause, lpa 0x45E1
Timed out of wait for Tx to stop
Sending discover...
Sending select for 192.168.1.100...
Lease of 192.168.1.100 obtained, lease time 864000
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.1.254


Ping goes through in both ways and i found opened port 21 on NAS side.

FTP Message log
Code:
220---------- Welcome to Pure-FTPd [privsep] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 21:49. Server port: 21.
220 You will be disconnected after 15 minutes of inactivity.


Is possible to upload SW to NAS manualy ???


Top
 Profile  
 
 Post subject: Re: FW Problem
PostPosted: Tue Sep 23, 2014 10:08 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
womec wrote:
<snip>
Now you are showing other details. The box does get a dhcp address, so NDU should just work. Have you tried to shutdown your firewall? And don't use wifi, try wired.

womec wrote:
Is possible to upload SW to NAS manualy ???
Theoretically? Sure. In practice? Don't know. The script which tests if the disk is a system disk is rather complicated on a 300 series, but for the 210 it's pretty simple. /dev/sda1 is mounted on /zyxel/mnt/sysdisk/, and /zyxel/sbin/check_sysdisk.sh is called:
Code:
#!/bin/sh

# This script compares the revision of InitRD and System disk image on HD.
#
# User may plug a HD from older version of NSA-210.
# In some case, this system is not compatible with the image on HD.
#
# Return value:
#   0 : Compatible. Run initial script on HD.
#   non-zero : Not compatible. Treat the HD as a new disk.

ECHO="/bin/echo"
INFOPATH="/zyxel/mnt/info"
DISKPATH="/zyxel/mnt/sysdisk"

if [ -f ${DISKPATH}/modelid ]; then

   MODELID_DISK=`cat ${DISKPATH}/modelid`
   MODELID_BOARD=`/zyxel/sbin/mrd_model -p`

   if [ ${MODELID_DISK} != ${MODELID_BOARD} ]; then
      exit 1
   fi

else

   echo "No model ID in HD!"
   exit 1

fi

if [ -f ${DISKPATH}/revision ]; then

   REV_HD=`cat ${DISKPATH}/revision`
   REV_FLASH=`cat /zyxel/mnt/info/revision`

   echo "Revision on flash: ${REV_FLASH}"
   echo "Revision of HD: ${REV_HD}"

   # Check here

   exit 0

else

   echo "Revision file (${DISKPATH}/revision) doesn't exist on HD!"
   exit 1

fi

exit 0
This script should exit with '0', to get the disk accepted. So you need:
  • A mountable /dev/sdX1 partition.
  • This partition should contain a file 'modelid' which matches the output of '/zyxel/sbin/mrd_model -p'.
  • This partition should contain a file 'revision', which contents don't matter.
After running check_sysdisk.sh, /etc/init.d/rcS.210 does
Code:
        # Verify system disk imgage
        if [ -f ${DISKPATH}/sysdisk.img ]; then

                #/bin/mount -o loop,rw ${DISKPATH}/sysdisk.img ${SYSPATH}
                losetup /dev/loop0 ${DISKPATH}/sysdisk.img
                mount -o ro /dev/loop0 ${SYSPATH}
                mountresult=`cat /proc/mounts|grep ${SYSPATH}|grep /dev/loop0`
                if [ "${mountresult}" == "" ]; then
                        echo " *** ERROR: Can not mount system image, file is invalid! ***"
                        no_disk_handler
                        exit 0
                fi

                #md5sum ${DISKPATH}/sysdisk.img > ${INFOPATH}/image_checksum
                if [ ! -e ${DISKPATH}/mount.sda1.rw.flag ]; then
                        MD5_FLASH=`cat ${INFOPATH}/image_checksum|awk '{print $1}'`
                        echo "MD5_FLASH=${MD5_FLASH}"
                        MD5_HD=`${SYSPATH}/sbin/md5sum ${DISKPATH}/sysdisk.img|awk '{print $1}'`
                        echo "MD5_HD=${MD5_HD}"
                        if [ "${MD5_HD}" != "${MD5_FLASH}" ]; then
                                umount ${SYSPATH}
                                no_disk_handler
                                exit 0
                        fi
                fi
So there should also be file sysdisk.img, (which contains the main part of the firmware, BTW), which md5sum should match the value in ${INFOPATH}/image_checksum. (INFOPATH is /zyxel/mnt/info, and mtdblock4 is mounted on that.)

So, to manually create that disk:
  • use fdisk to create a primary partition of about 500MB.
  • Create an ext2 filesystem:
    Code:
    mke2fs /dev/sda1
  • Mount it:
    Code:
    mount /dev/sda1 /zyxel/mnt/sysdisk
  • Create 'modelid' file:
    Code:
    /zyxel/sbin/mrd_model -p >/zyxel/mnt/sysdisk/modelid
  • Create 'revision' file:
    Code:
    touch /zyxel/mnt/sysdisk/revision
  • Create sysdisk.img file:
    Code:
    cat /mnt/usb/DATA_1004 | gunzip >/zyxel/mnt/sysdisk/sysdisk.img
  • Create md5sum:
    Code:
    /mnt/usb/md5sum /zyxel/mnt/sysdisk/sysdisk.img >/zyxel/mnt/info//image_checksum
Unmount the partition, and reboot the box. You might be lucky.

I uploaded DATA_1004 and md5sum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group