Page 1 of 2

NAS542: SD Karte defekt -> Bootloop

Posted: Sat 24. Aug 2019, 22:03
by a-st
Hallo,

ich habe folgende Anleitung befolgt (mit den neusten Images) um mein NAS542 mit OMV zu betreiben: https://techdudes.de/1930/zyxel-nas-520 ... vault-omv/

Leider habe ich meine SD Karte geschrottet und ein Backup habe ich leider auch nicht angelegt. Ich habe die Anleitung einfach mit einer neuen SD Karte befolgt, aber nun bootloopt mein NAS.

Vermutlich fehlt mir der /boot/barebox/ Ordner aber genau weiß ich das auch nicht. Vielleicht kann mir jemand mit einem Backup seiner Konfiguration helfen?

VG
a-st

Re: NAS542: SD Karte defekt -> Bootloop

Posted: Sun 25. Aug 2019, 18:45
by Mijzelf
When it's in a bootloop the only way to find out why is a serial cable. And I think the only way to repair it also needs it.

BTW, here you can find a long thread of someone who had about the same problem, except that he updated the kernel.

Re: NAS542: SD Karte defekt -> Bootloop

Posted: Sun 25. Aug 2019, 20:15
by a-st
First of all, thanks for your help.

Isn't it an option to use one of your RescueSticks? http://metarepo.tk/Users/Mijzelf/RescueSticks/

Or maybe using the the Universal USB Key? http://metarepo.tk/Users/Mijzelf/univer ... -10-12.zip

Re: NAS542: SD Karte defekt -> Bootloop

Posted: Tue 27. Aug 2019, 08:35
by Mijzelf
I don't think one of those keys will help, as they are dependent on a script in the firmware to be executed. Yet it won't hurt to try. If you can get telnet access using the UUK in combination with the 'telnet and stop' script, it might be possible to investigate things.
(By the way, you'll have to adapt that script. it calls 'telnetd -l /bin/sh', but that doesn't work on firmware 5. It should be telnetd alone. And then hope you can guess the password. 1234, possibly.)

Re: NAS542: SD Karte defekt -> Bootloop

Posted: Tue 27. Aug 2019, 08:39
by a-st
Thanks Mijzelf! I'll try my best once back from holiday. In the worst case I would need to attach my Raspberry Pi to the serial port and see what's happening.

Re: NAS542: SD Karte defekt -> Bootloop

Posted: Fri 30. Aug 2019, 21:13
by a-st
This topic can be marked solved. I managed to recover the boot process to boot stock firmware by attaching my Raspberry Pi to the serial console and by following the instructions from this post https://homeforum.zyxel.com/discussion/ ... gone-wrong
chrismxnr
January 24

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...

Regards

Re: [Gelöst] NAS542: SD Karte defekt -> Bootloop

Posted: Sat 31. Aug 2019, 17:59
by Mijzelf
That's great.

Out of curiosity, do you have a serial log of the bootloop?

Re: [Gelöst] NAS542: SD Karte defekt -> Bootloop

Posted: Sat 31. Aug 2019, 18:01
by a-st
Mijzelf wrote:That's great.

Out of curiosity, do you have a serial log of the bootloop?
Sadly not, but it was something about invalid "root=" parameter

Re: [Gelöst] NAS542: SD Karte defekt -> Bootloop

Posted: Sat 31. Aug 2019, 18:53
by a-st
Mijzelf wrote:That's great.

Out of curiosity, do you have a serial log of the bootloop?
Looks like I ran into a different issue this time...

Code: Select all

uloader 2011.06.0 (May 20 2014 - 16:36:41)
Board: Mindspeed C2000
c2k_spi_probe
Copying Barebox from SPI Flash(bootopt=0)
BB Copying Done
## Starting Barebox at 0x01000000 ...
barebox 2011.06.0-svn44305-dirty6 (Aug 28 2014 - 22:25:22)
Board: Mindspeed C2000
c2k_spi_probe
c2k_otp_probe.
cbus_baseaddr: 9c000000, ddr_baseaddr: 03800000, ddr_phys_baseaddr: 03800000
class init complete
tmu init complete
bmu1 init: done
bmu2 init: done
util init complete
GPI1 init complete
GPI2 init complete
HGPI init complete
HIF rx desc: base_va: 03e80000, base_pa: 03e80000
HIF tx desc: base_va: 03e80400, base_pa: 03e80400
HIF init complete
bmu1 enabled
bmu2 enabled-
pfe_hw_init: done
pfe_firmware_init
pfe_load_elf
pfe_load_elf no of sections: 10
pfe_firmware_init: class firmware loaded
pfe_load_elf
pfe_load_elf no of sections: 10
pfe_firmware_init: tmu firmware loaded
pfe_load_elf
pfe_load_elf no of sections: 14
pfe_firmware_init: util firmware loaded
eth_port: 0
NAS540_phy_reg_setting[eth_port].phyaddr: 0x4
miidev_restart_aneg for PHY4
eth_port: 1
NAS540_phy_reg_setting[eth_port].phyaddr: 0x6
miidev_restart_aneg for PHY6
cfi_probe: cfi_flash base: 0xc0000000 size: 0x04000000
## Unknown FLASH on Bank at 0xc0000000 - Size = 0x00000000 = 0 MB
bootopt = 0x0-
Using ENV from SPI Flash.
nand_probe: comcerto_nand base: 0xc8300000 size: 0x256 MB
NAND device: Manufacturer ID: 0x98, Chip ID: 0xda (Toshiba NAND 256MiB 3,3V 8-bit), page size: 2048, OOB size: 64
Using default values 
Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad eraseblock 1536 at 0x0c000000
Bad eraseblock 1537 at 0x0c020000
Bad block table written to 0x0ffe0000, version 0x01
Bad block table written to 0x0ffc0000, version 0x01
Malloc space: 0x00600000 -> 0x01000000 (size 10 MB)
Stack space : 0x005f8000 -> 0x00600000 (size 32 kB)
running /env/bin/init...
not found
Barebox-C2K >/ 

Re: NAS542: SD Karte defekt -> Bootloop

Posted: Sat 31. Aug 2019, 22:10
by a-st
Actually I got it working (again again) ...

Looks like my /env folder is/was messed up. Any hints how to return it nearly stock state? I'm now running it with parts from this thread https://homeforum.zyxel.com/discussion/ ... are-solved