OMV on Zyxel NSA320 ?

  • I have re-imaged it back to stock Zyxel software (4.70) now. I was trying to install using what was in your dropbox on Sept 1. Install USB was 8 GB SanDisk, formatted FAT32, contents:
    -rwxr-xr-x 1 root root 29593600 May 24 19:36 boot-nsa320.tar
    -rwxr-xr-x 1 root root 1190 Aug 6 03:47 creating salted checksums.txt
    -rwxr-xr-x 1 root root 721582080 Jul 12 06:52 debian-omv-stoneburner1.tar
    -rwxr-xr-x 1 root root 31980 Feb 18 2010 md5sum
    -rwxr-xr-x 1 root root 64 Sep 5 2012 nsa310_check_file_C0
    -rwxr-xr-x 1 root root 64 Mar 16 2012 nsa310_check_file_C0.libzy.so
    -rwxr-xr-x 1 root root 3993 Aug 5 19:06 README.txt
    -rwxr-xr-x 1 root root 36 Jun 14 2012 salted_md5sum
    -rwxr-xr-x 1 root root 36 Jun 14 2012 salted_md5sum_3x0
    -rwxr-xr-x 1 root root 23 Sep 5 2012 usb_key_func.sh
    -rwxr-xr-x 1 root root 14085 Aug 11 05:17 usb_key_func.sh.2


    No error log being generated.


    Boot files in in boot partition on 32GB SanDisk USB drive. I have it mounted on my RPi now:
    Disk /dev/sda: 31.1 GB, 31104958464 bytes
    64 heads, 32 sectors/track, 29664 cylinders, total 60751872 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000


    Device Boot Start End Blocks Id System
    /dev/sda1 2048 206847 102400 83 Linux
    /dev/sda2 206848 60751871 30272512 83 Linux


    Boot partition is ext2, rootfs is ext4 (again currently mounted on the RPi)
    /dev/sda1 on /mnt/boot type ext2 (rw,relatime)
    /dev/sda2 on /mnt/rootfs type ext4 (rw,relatime,data=ordered)


    Listing of the boot partition:
    -rw-r--r-- 1 root root 129088 Oct 22 2014 config-3.17.0-kirkwood-tld-1
    drwxr-xr-x 2 root root 4096 May 23 06:36 dts
    -rw-r--r-- 1 root root 7597358 May 22 19:25 initrd.img-3.17.0-kirkwood-tld-1
    drwx------ 2 root root 12288 Sep 3 18:36 lost+found
    -rw-r--r-- 1 root root 0 May 25 02:36 nsa320
    -rw-r--r-- 1 root root 1991026 Oct 22 2014 System.map-3.17.0-kirkwood-tld-1
    -rw-r--r-- 1 root root 2835406 May 24 07:16 uImage
    -rw-r--r-- 1 root root 7597422 May 24 07:17 uInitrd
    -rwxr-xr-x 1 root root 2822168 Oct 22 2014 vmlinuz-3.17.0-kirkwood-tld-1
    -rwxr-xr-x 1 root root 2822168 Oct 22 2014 zImage-3.17.0-kirkwood-tld-1
    -rwxr-xr-x 1 root root 2835342 May 24 07:14 zImage.fdt


    Note that was after I manually untarred the boot-nsa320.tar into the boot partition. I have tried to nuke the 32GB key, but for some reason the install script isn't finding it during the install (bad USB stick or bad USB port on the back of the NSA320?). Probably at the point I need to go back to the beginning and do a full capture of the install script output.

  • Ok, so the issue is that your u-boot is trying to boot wrong files in first partition (boot partition).


    in first partition (the one seen by the uboot) there is no /boot folder, so /boot/uImage and /boot/uInitrd don't exist.


    My script teaches stock u-boot to look for /uImage and /uInitrd instead, but it seems the uboot setting modification works for stock uboot only, as bodhi's uboot keeps its settings in a different place and the standard firmware cannot work on it (also bodhi's uboot does not need an ext2 boot partition and can boot directly ext4, that's why it is probably looking for /boot/something boot files).


    Will have to add some lines to readme stating this and the manual workaround.


    you need to change the uboot lines manually, please write the following from uboot serial connection:

    Code
    setenv usb_load_uimage 'ext2load usb $device 0x800000 /uImage'
    setenv usb_load_uinitrd 'ext2load usb $device 0x1100000 /uInitrd'
    saveenv
    reset


    Quote

    I have tried to nuke the 32GB key, but for some reason the install
    script isn't finding it during the install (bad USB stick or bad USB
    port on the back of the NSA320?).

    It probably needs to be formatted as something (with mbr or msdos partition table and all) for zyxel firmare to see it. I never tested an install without partitions.

  • Different errors now. Wonder if I messed up the 32GB USB stick when I nuked it (really just deleted partitions using fdisk).


    - Pulled the HD (helps to RTFM - DOH!)
    - resetenv;reset
    - boots from install USB, writes to 32G USB, shuts down. Check 32GB USB on RPi, all the files look like they are where they need to be.
    - put 32 GB USB back USB2 port on NSA320, power up:


    ** MARVELL BOARD: RD-88F6281A LE


    U-Boot 1.1.4 (Mar 23 2011 - 16:09:39) Marvell version: 3.4.19


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


    Soc: 88F6281 A1 (DDR2)
    CPU running @ 1200Mhz L2 running @ 400Mhz
    SysClock = 400Mhz , TClock = 200Mhz


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


    CPU : Marvell Feroceon (Rev 1)
    //--- stateButtonBit = 3, recovery ---//
    Kernel address is 0x4640000.


    Streaming disabled
    Write allocate disabled


    Module 0 is RGMII
    Module 1 is TDM


    USB 0: host mode
    PEX 0: interface detected no Link.
    Net: egiga0, egiga1 [PRIME]
    Hit any key to stop autoboot: 2 1 0
    (Re)start USB...
    USB: scanning bus for devices... 2 USB Device(s) found
    scanning bus for storage devices... 0 Storage Device(s) found
    ** Bad partition 1 **
    ** Bad partition 1 **
    ## Booting image at 02000000 ...
    Bad Magic Number
    ** Bad partition 1 **
    ** Bad partition 1 **
    ## Booting image at 02000000 ...
    Bad Magic Number
    ** Bad partition 1 **
    ** Bad partition 1 **
    ## Booting image at 02000000 ...
    Bad Magic Number


    NAND read: device 0 offset 0x4640000, size 0xa00000


    (continues booting from nand with stick Zyxel firnware)


    Going to have to go out and get another USB stick or 2 (will try 16 GB this time), but will be another couple days.


    FYI the 32GB drive is a "SanDisk Ultra Fit™ CZ43 32GB USB 3.0 Low-Profile Flash Drive".


  • USB: scanning bus for devices... 2 USB Device(s) found
    scanning bus for storage devices... 0 Storage Device(s) found

    It is not seeing USB storage.
    It can happen with stock u-boot. USB drive too slow to initialize in time for u-boot.


    Bodhi's u-boot does wait more time, so you can use his own if you want. (in the logs posted you showed it did see the usb storage drive)


    if with another usb drive you cannot boot, can you try changing an u-boot setting?


    originally it was

    Code
    pre_bootcmd_linux_usb='setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset'


    to change it write:

    Code
    setenv pre_bootcmd_linux_usb 'setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); usb reset'
    saveenv
    reset


    the mw.l f1010100 0020c000; is a workaround to manually power up the USB system, that is needed on NSA325 to boot from USB because uboot command "usb reset" is bugged, maybe on NSA320 it is breaking things.


    Sorry for the annoyance, but I don't have a NSA320 so I cannot test on it, only on NSA325 and NSA310.

  • Definitely NOT an annoyance...appreciate all the help!!!


    Tried the change with the 32GB stick, and unfortunately still no-go. Sees 2 USB devices, but 0 USB storage devices. The more I look at it, the more it looks like the braindead USB subsystem in the stock uBoot.


    At this point, probably will put this aside for a bit. I did some hacking of the install script to enable the hard drive boot options you had commented out, and installed to the SATA drive using Bodhi's 3.17 rootfs as you described in your thread over on doozan.


    Here was is where I left off trying with the USB boot.


    NSA320>> printenv


    bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
    bootdelay=2
    baudrate=115200
    loads_echo=0
    ethaddr=00:19:CB:00:51:81
    eth1addr=00:19:CB:00:51:82
    ipaddr=10.4.50.165
    serverip=10.4.50.5
    rootpath=/mnt/ARM_FS/
    netmask=255.255.255.0
    nandEcc=1bit
    MODEL_ID=DD01
    PRODUCT_NAME=NSA-320
    FEATURE_BIT=00
    CONTRY_TYPE=FF
    VENDOR_NAME=ZyXEL Communications Corp.
    run_diag=yes
    bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
    bootargs_linux=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
    bootcmd_linux_usb_0=ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000
    bootcmd_linux_usb_1=ext2load usb 1:1 $(loadaddr) /uImage; ext2load usb 1:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000
    bootcmd_linux_usb_2=ext2load usb 2:1 $(loadaddr) /uImage ; ext2load usb 2:1 0x01100000 /uInitrd ; bootm $(loadaddr) 0x01100000
    bootcmd_stock=setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
    bootcmd=run pre_bootcmd_linux_usb; run bootcmd_linux_usb_0; run bootcmd_linux_usb_1; run bootcmd_linux_usb_2; run bootcmd_stock; reset
    stdin=serial
    stdout=serial
    stderr=serial
    console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
    mainlineLinux=no
    CASset=min
    enaMonExt=no
    enaCpuStream=no
    enaWrAllo=no
    pexMode=RC
    disL2Cache=no
    setL2CacheWT=yes
    disL2Prefetch=yes
    enaICPref=yes
    enaDCPref=yes
    sata_dma_mode=yes
    ethprime=egiga1
    netbsd_en=no
    vxworks_en=no
    bootargs_root=root=/dev/nfs rw
    bootargs_end=:::DB88FXX81:eth0:none
    image_name=uImage
    standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
    disaMvPnp=no
    ethmtu=1500
    eth1mtu=1500
    mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
    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
    hddPowerCtrl=no
    netretry=no
    rcvrip=169.254.100.100
    loadaddr=0x02000000
    autoload=no
    enaAutoRecovery=yes
    kernel_addr=0x4640000
    pcieTune=no
    ethact=egiga1
    pre_bootcmd_linux_usb=setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); usb reset


    Environment size: 2712/131068 bytes
    NSA320>> saveenv


    Saving Environment to NAND...
    Erasing Nand...Writing to Nand... done


    __ __ _ _
    | \/ | __ _ _ ____ _____| | |
    | |\/| |/ _` | '__\ \ / / _ \ | |
    | | | | (_| | | \ V / __/ | |
    |_| |_|\__,_|_| \_/ \___|_|_|
    _ _ ____ _
    | | | | | __ ) ___ ___ | |_
    | | | |___| _ \ / _ \ / _ \| __|
    | |_| |___| |_) | (_) | (_) | |_
    \___/ |____/ \___/ \___/ \__|
    ** MARVELL BOARD: RD-88F6281A LE


    U-Boot 1.1.4 (Mar 23 2011 - 16:09:39) Marvell version: 3.4.19


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


    Soc: 88F6281 A1 (DDR2)
    CPU running @ 1200Mhz L2 running @ 400Mhz
    SysClock = 400Mhz , TClock = 200Mhz


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


    CPU : Marvell Feroceon (Rev 1)
    //--- stateButtonBit = 3, recovery ---//
    Kernel address is 0x4640000.


    Streaming disabled
    Write allocate disabled


    Module 0 is RGMII
    Module 1 is TDM


    USB 0: host mode
    PEX 0: interface detected no Link.
    Net: egiga0, egiga1 [PRIME]
    Hit any key to stop autoboot: 2 1 0
    (Re)start USB...
    USB: scanning bus for devices... 2 USB Device(s) found
    scanning bus for storage devices... 0 Storage Device(s) found
    ** Bad partition 1 **
    ** Bad partition 1 **
    ## Booting image at 02000000 ...
    Bad Magic Number
    ** Bad partition 1 **
    ** Bad partition 1 **
    ## Booting image at 02000000 ...
    Bad Magic Number
    ** Bad partition 1 **
    ** Bad partition 1 **
    ## Booting image at 02000000 ...
    Bad Magic Number


    NAND read: device 0 offset 0x4640000, size 0xa00000

  • Looks interesting...but would probably also want to flash the uBoot as well. At this point, I am satisfied because I achived my objective of replacing Arch with Debian (I spend most of my time with Ubuntu and Redhat, and Arch was just a complete oddball trying to manage). My NSA320 is mainly just a backup destination for the VM's in my ESXi home lab. OMV piqued my interest because of iSCSI support, but really don't need it at the moment.


    Since we are drifting off-topic here, I will defer any further discussion to the doozan forums (just joined there)

  • mage Format for bootm command











    ————————————————————————————————————————


    The 16th China International Lighting Fair (Autumn Fair) will be held from 22-26 October, 2015 at the Guzhen Convention and Exhibition Centre in Zhongshan City, Guangdong Province.

  • Wondering if it is possible to update / upgrade from a running nsa325-system with OMV using ssh shell?


    Greetings
    Micha aus Berlin

    ____________________
    Grüße aus Berlin


    Q29000-ITX
    omv 4.1.8.2 | 64 bit | backport kernel | omvextras

  • folks
    already buily a nice OMV box from an old PC but .....


    just a quick resurrection of this thread - i have an old NSA320S - wondering is it possible to set it up as a OMV device
    where
    1. i can see shares (samba) in Windows
    2. I can log into a web GUI using an internal ip address of the nsa320s / omv box
    3. use docker on it


    I guess not....... but asking in case?
    thanks

  • wondering is it possible to set it up as a OMV device

    armel boxes are unsupported by omv-extras and painful to run OMV on (too slow).


    use docker on it

    maybe but there very few armel images.

    omv 5.6.5 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.1
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • i am running OMV 4 on top of a debian stretch build on my zyxel NAS320 box with 2x3TB hdd raided and the box runs fine with following apps:

    • DNLA
    • FTP Server
    • Lets encrypt
    • NFS,
    • SMB,

    I have never been able to get Docker to install as you get message back saying there are multiple unmet dependencies


    performance wise it streams movies and music just fine and i can access it remotely via a https connection, pretty much does all i need it to, although docker would be a nice edition; but i guess its to much work to bring this sturdy piece of kit back into the mainstream OMV family and while i can normally figure my way through some coding issues in Linux, i am by no means an expert so havent ventured that far.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!