General NAS-Central Forums

Welcome to the NAS community
It is currently Sun Jun 25, 2017 12:05 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Manual Firmware Upgrade
PostPosted: Sun Sep 07, 2014 11:29 am 
Offline

Joined: Sun Sep 07, 2014 11:24 am
Posts: 6
Hi, I've an old NSA221 I want to see if I can fix. Problem happened when I was doing a firmware upgrade and the power went out, so the upgrade didn't complete. What's happening now is that I can't access the Administration page. When logging in it defaults to the playzone page. Was wondering if it was possible to complete the firmware upgrade through telnet or ffp usb or any other method. Seems a shame to throw it away. Current firmware is 4.00

Thanks


Top
 Profile  
 
PostPosted: Sun Sep 07, 2014 11:34 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6001
Have you already cleared the cookies in your browser?


Top
 Profile  
 
PostPosted: Sun Sep 07, 2014 11:42 am 
Offline

Joined: Sun Sep 07, 2014 11:24 am
Posts: 6
Mijzelf wrote:
Have you already cleared the cookies in your browser?


hi, yes. It actually broke about 6 months ago and after days of trying to repair I replaced it. But I wanted it to have another go with repairing...


Top
 Profile  
 
PostPosted: Sun Sep 07, 2014 12:51 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6001
Hm. I can hardly imagine a bad flash which causes the webinterface function only half. To flash a ZyXEL nas 3 blocks have to be written to flash, the kernel, the initrd, and a gzipped ext2 filesystem.
If the kernel or initrd is damaged, the box won't boot at all, I think. And if that gzipped ext2 filesystem is damaged, well, I think you wouldn't have a webinterface at all. Do you have shell access to that box? Using an FFP stick maybe?


Top
 Profile  
 
PostPosted: Sun Sep 07, 2014 7:55 pm 
Offline

Joined: Sun Sep 07, 2014 11:24 am
Posts: 6
ya i can telnet in using ffp, was wondering could I fix something from there?


Top
 Profile  
 
PostPosted: Sun Sep 07, 2014 8:10 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6001
To fix it, you'll first need to know what's wrong. What does
Code:
fsck /dev/loop0
give?


Top
 Profile  
 
PostPosted: Sun Sep 07, 2014 8:18 pm 
Offline

Joined: Sun Sep 07, 2014 11:24 am
Posts: 6
sh-4.1# fsck /dev/loop0
fsck from util-linux-ng 2.18
e2fsck 1.38 (30-Jun-2005)
fsck.ext2: while determining whether /dev/loop0 is mounted.
/dev/loop0 has gone 1565 days without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Error writing block 8710 (No locks available). Ignore error<y>?

(thanks for the quick replies btw :))


Top
 Profile  
 
PostPosted: Mon Sep 08, 2014 8:22 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6001
psychosomatic wrote:
Error writing block 8710 (No locks available).
Hm. Did you run a dmesg directly after that? This could point to a hardware error on the disk.

This loopdevice is a file on /dev/sda1, which is mounted on /zyxel/mnt/sysdisk. The file is sysdisk.img, when I remember well. On boot a md5sum of this file is calculated, and if it doesn't fit with some stored value, a fresh copy is extracted from flash. (In flash a gzipped version is written).

Actually a firmware update consists in flashing a kernel, flashing an initrd, flashing an sysdisk.img.gz and writing it's md5sum somewhere. On next boot the bootscript will find the current sysdisk.img having the wrong md5sum, so it will exchange it. Update completed.

You can easily check if sysdisk.img is exchanged on boot: put the clock to some strange time (date -s <time>), remount /zyxel/mnt/sysdisk rw
Code:
mount -o remount,rw /zyxel/mnt/sysdisk
and touch sysdisk.img
Code:
touch /zyxel/mnt/sysdisk/sysdisk.img
(check if that is the right name)
Make a note of the timestamp of sysdisk.img
Code:
ls -l /zyxel/mnt/sysdisk
Reboot the box. If the timestamp changed, it's refreshed.

I don't know where sysdisk.img.gz is stored. On the 300 series it's in a flash partition, but on the 221 it's in some internal usb storage device. Looking at cat /proc/mounts that might be /dev/sdc1, mounted on /zyxel/mnt/NAND. So you can have a look there, and see if the file unzips normally.


Top
 Profile  
 
PostPosted: Mon Sep 08, 2014 6:16 pm 
Offline

Joined: Sun Sep 07, 2014 11:24 am
Posts: 6
Hi

Here is the result of dmesg

Code:
sh-4.1# dmesg
Linux version 2.6.24.4 (root@Trinity) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.70.0501961 2005-12-18)) #1 Thu May 6 11:11:29 CST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Oxsemi NAS
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 65536
  DMA zone: 512 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 65024 pages, LIFO batch:15
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
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: 65024
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=256M poweroutage=yes
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
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: 252032KB available (3332K code, 207K data, 120K init)
Calibrating delay loop... 183.09 BogoMIPS (lpj=915456)
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 0x0cd1fbaf68c0 read back 0xbeefcafe
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
libata version 3.00 loaded.
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
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 Realtek RTL8211BGR
phy init done
eth0: GMAC ver = 51, vendor ver = 17 at 0xe8000000, IRQ 8
eth0: Found PHY at address 1, type 0x001cc912 -> 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 anticipatory registered
io scheduler deadline 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
ata1: SATA link down (SStatus 0 SControl 300)
ox810sata: OX810 sata core.
scsi1 : oxnassata
ata2: SATA max UDMA/133 irq 18
Copy button release
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
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
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
usb 1-1.1: new high speed USB device using oxnas-ehci and address 3
In hub_port_init, and number is 1, retry 0, port 1 .....
usb 1-1.1: configuration #1 chosen from 1 choice
usb 1-1.2: new high speed USB device using oxnas-ehci and address 4
In hub_port_init, and number is 2, retry 0, port 2 .....
usb 1-1.2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
scsi3 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
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: raid0 personality registered for level 0
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.12.0-ioctl (2007-10-02) initialised: dm-devel@redhat.com
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFP support v0.3: not present
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: 120K
MTD_open
MTD_read
MTD_read
MTD_close
MTD_open
MTD_read
MTD_read
MTD_close
MTD_open
MTD_read
MTD_read
MTD_close
MTD_open
MTD_read
MTD_read
MTD_close
egiga0: PHY is Realtek RTL8211BGR
Resetting GMAC
GMAC reset complete
egiga0: PHY is Realtek RTL8211BGR
egiga0: link down
egiga0: link up, 100Mbps, full-duplex, using pause, lpa 0x4DE1
Timed out of wait for Tx to stop
scsi 3:0:0:0: Direct-Access     ZyXEL    USB DISK 2.0     PMAP PQ: 0 ANSI: 0 CCS
scsi 2:0:0:0: Direct-Access     Freecom  DataBar USB2.0   1100 PQ: 0 ANSI: 0 CCS
sd 2:0:0:0: [sdb] 7928832 512-byte hardware sectors (4060 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] 7928832 512-byte hardware sectors (4060 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1 sdb2
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg0 type 0
sd 3:0:0:0: [sda] 247808 512-byte hardware sectors (127 MB)
usb-storage: device scan complete
sd 3:0:0:0: [sda] Write Protect is off
sd 3:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 3:0:0:0: [sda] Assuming drive cache: write through
sd 3:0:0:0: [sda] 247808 512-byte hardware sectors (127 MB)
sd 3:0:0:0: [sda] Write Protect is off
sd 3:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 3:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 3:0:0:0: [sda] Attached SCSI removable disk
sd 3:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on sda1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
MTD_open
MTD_read
MTD_read
MTD_close
MTD_open
MTD_read
MTD_read
MTD_close
SGI XFS with large block numbers, no debug enabled
SGI XFS Quota Management subsystem
NTFS driver 2.1.29 [Flags: R/O MODULE].
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sdb2, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sdb2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: Unrecognized mount option "relatime" or missing value


When I do
Code:
mount -o remount,rw /zyxel/mnt/sysdisk
it says
Code:
mount point /zyxel/mnt/sysdisk does not exist

I don't have any hard disks installed at the moment but would that affect the web interface?

also this is the directory structure in case it's helpful, Thanks

Code:
after_booting.sh  etc               lib               sys
bin               ffp               mnt               tmp
dev               home              proc              usr
e-data            i-data            sbin              var


Top
 Profile  
 
PostPosted: Mon Sep 08, 2014 6:51 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6001
Quote:
after_booting.sh
Oops! Your ffp is chrooted. Should have known that, using firmware 4.0.

I *think* your NAS should be able to run ffp unchrooted. To do so, edit after_booting.sh. Around line 40, there is a line 'FFPCHROOT=auto'. Change that in 'FFPCHROOT=no' and reboot the box.
But before you do so, make sure that the loginless telnet daemon is still enabled/running. I have no idea what the root password for a 221 fw 4.00 is.

When you are running unchrooted, there should be no after_booting in /. Then retry to remount /zyxel/mnt/sysdisk


Top
 Profile  
 
PostPosted: Sun Sep 14, 2014 11:54 am 
Offline

Joined: Sun Sep 07, 2014 11:24 am
Posts: 6
Hey sorry for not getting back to you, for whatever reason I can't get it to boot now, didn't get a chance to try the last stuff. Thanks for all your help anyways


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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