« Back to all recent discussions

Debian/OMV on NAS540 gone wrong?

ombre33ombre33 Posts: 7  Junior Member
edited December 2018 in Questions
Hi forum,

recently I tried to get OMV and therefore also Debian on the NAS540 according to this tutorial. Something must have went wrong, however, because now the NAS is just stuck in a approx. 30 second boot loop, no matter whether there is a usb drive, sd-card or nothing attached.

I can only assume that the boot loader got a knock over the head it didn't particularly care for? Any chance to revive the box?

Thank you for any tips.



  • MijzelfMijzelf Posts: 1,073  Heroic Warrior Member
    Did you flash the kernel? Do you have serial access?
  • ombre33ombre33 Posts: 7  Junior Member
    Hi Mijzelf,

    I was hoping this would catch your attention; still remember you from zyxel-forum.de, which apparently, while I wasn't looking, went the way of the dodo. Shame though.

    Yes, I did flash the kernel. In hindsight, I don't really think that was necessary, but it was part of the tutorial.. Silly, I know.

    I still have the console log from when I did it. Long story very short: Resized the thumb drive, flashed the kernel, reboot, now stuck in reboot loop.

    No, currently don't have serial access to the box, but I'm sure I can utilize one of my Raspberries to get there.



  • MijzelfMijzelf Posts: 1,073  Heroic Warrior Member
    Well, I don't think much can be done before you have serial access. It can tell why the box is rebooting (kernel panic, probably). Before that it's shooting in the dark.
  • ombre33ombre33 Posts: 7  Junior Member
    Establishing the serial connection stopped the reboot cycling, but the output to console looks rather odd..
  • MijzelfMijzelf Posts: 1,073  Heroic Warrior Member
    Wrong baudrate?
  • ombre33ombre33 Posts: 7  Junior Member
    edited December 2018
    Nope. Apparently I was mostly struggling with the fact that the boards pin-out is | --- | TX | RX |     | GND |, which not also kinda feels backwards, but also contradicts the sparse information that can be found online.

    First run was without interrupting, then reboot, then stopping autoboot by pressing the any-key. Glanced over it, but don't really know what to do with "ERROR: out of memory".

    What do you think? Any chance to revive?
  • MijzelfMijzelf Posts: 1,073  Heroic Warrior Member
    What do you think? Any chance to revive?

    The bootloader is still working, so yes. Unfortunately I have no experience with bootbox. I think the easiest way to get the box running again is to upload a stock kernel+rootfs over tftp, and boot that. Then you can flash stock firmware using the webinterface, and it should work again.

    Unless the bootscript is changed in a way it can't boot the stock kernel anymore, in that case it will be more challenging.

    Do you know which firmware was on it?

  • ombre33ombre33 Posts: 7  Junior Member
    Yeah, the latest one. So that should be V5.21(AATB.1)C0..
  • MijzelfMijzelf Posts: 1,073  Heroic Warrior Member
    edited January 2019
    OK, I've put the uImage here. On u-boot the command would be something like this:
    set ipaddress <ip1>
    This sets the environment variabeles ipaddress and tftpserver (maybe not their real names, can be shown with printenv), and downloads the file uImage from the tftp server to memory address <some-address>. Again, look at the environment to see a suitable address.
    And finally boot the module on <some-address>
    Don't know what is should be on bootbox. Try help.

  • Hi, I think I got the same issue on NAS542 (should be basically similar to NAS540) and finally resolved it... In case someone else experiences the same problem:

    After the barebox autoboot got aborted and you are in the console, you can cd into /env/bin and execute b1:

    Barebox-C2K >/ cd env
    Barebox-C2K >/env cd bin
    Barebox-C2K >/env/bin b1

    Afterwards it should boot the Zyxel Firmware. To repair autoboot, you can SSH to the NAS after boot (and enabling SSH service), su and execute /firmware/sbin/info_setenv next_bootfrom 1

    ~ $ su
    ~ # /firmware/sbin/info_setenv next_bootfrom 1
    Erasing 64 Kibyte @ 30000 -- 100 % complete

    No warranty, but for me it worked and everything seems to be Ok again...

  • Sir_Mc_TodSir_Mc_Tod Posts: 20  Junior Member
    Reading that tutorial and the comments here, a question pops into my mind:
    Why flash the kernel at all if Debian and omv run on the stock kernel as well?  Are there any contraindications to run Debian on the zyxel kernel? 

  • NickbaNickba Posts: 5  Junior Member
    edited February 11
    Hello Sir_Mc_Tod,

    May I ask you how to run OMV on stock kernel? How to run Debian without flashing the stock kernel? Do you have a tutorial?

  • Sir_Mc_TodSir_Mc_Tod Posts: 20  Junior Member
    I don't know if you can read German,  but there's a complete guide linked in the opening of this thread.  It clearly states that the kernel should only be flashed if the system is running Debian and OMV properly, that's why I'm asking. 
  • MijzelfMijzelf Posts: 1,073  Heroic Warrior Member
    @Sir_Mc_Tod : AFAIK Debian will run chrooted on the firmware when no new kernel is flashed. When that is good enough for you, it's good enough, of course.
    Flashing your own kernel gives more freedom in loadable modules. For instance it's not possible to run iptables on the stock kernel.
  • Sir_Mc_TodSir_Mc_Tod Posts: 20  Junior Member
    @Mijzelf thanks for your answer. 
    I didn't think about kernel modules and the like. 
    I'm going to think about what my nas might need a kernel module for.  (deffo not iptables, the box is sitting behind 3 firewalls ) 
    I'll give Debian and omv a try on the stock firmware (I'm a little afraid of flashing devices,  I guess I have bricked more of them than I actually have flashed successfully)
Sign In or Register to comment.