NAS326 does not boot reliably July 18, 2019 07:14AM |
Registered: 5 years ago Posts: 9 |
shutdown -h nowand try to boot the box again, the box remains in a state where it is not reachable through samba/ssh/etc.
Re: NAS326 does not boot reliably July 18, 2019 01:22PM |
Admin Registered: 13 years ago Posts: 18,550 |
curr_bootfrom=1 next_bootfrom=1 kernel_addr_1=0x00000000; run bootcmd_custom;
fw_setenv change_boot_part 0
shutdown -r now
4. Enter the following commands (copy/paste each line to the stock OS command line). fw_setenv curr_bootfrom 1 fw_setenv next_bootfrom 1 fw_setenv load_dtb_addr 0x1000000 fw_setenv load_initrd_addr 0x2900000 fw_setenv load_image_addr 0x02000000 fw_setenv usb_init 'mw.l f1018100 20420000; mw.l f1018140 003E8800; sleep 3; usb start' fw_setenv set_bootargs_stock 'setenv bootargs "console=ttyS0,115200 ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs1 rw rootdelay=2"' fw_setenv bootcmd_stock_1 'run set_bootargs_stock; echo Booting from NAND kernel 1 ...; nand read 0x2000000 0x00E00000 0xF00000 && bootz 0x2000000' fw_setenv bootcmd_stock_2 'run set_bootargs_stock; echo Booting from NAND kernel 2 ...; nand read 0x2000000 0x08700000 0xF00000 && bootz 0x2000000' fw_setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"' fw_setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; run usb_init; ext2load usb 0:1 $load_image_addr /boot/zImage; ext2load usb 0:1 $load_dtb_addr /boot/dts/armada-380-zyxel-nas326.dtb; ext2load usb 0:1 $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr' fw_setenv bootcmd_custom 'if run usb_bootcmd; then; else if run bootcmd_stock_1; then; else run bootcmd_stock_2; reset; fi; fi' fw_setenv kernel_addr_1 '0x00000000; run bootcmd_custom; ' fw_setenv change_boot_part 1
Re: NAS326 does not boot reliably July 21, 2019 03:53PM |
Registered: 5 years ago Posts: 9 |
Zyxel NAS326 Serial Pinouts (same as NSA325 and NSA310S/320S) GND RX TX +----+----+ | | | +----+----+----+----+----+ |3.3V| TX | RX | | GND| +----+----+----+ +----+
Re: NAS326 does not boot reliably July 21, 2019 11:26PM |
Admin Registered: 13 years ago Posts: 18,550 |
Quote
> USB-TTL-interface to the serial port of my NAS326
> box.
> Don't know the chip but from the driver I assume
> it is a FT232.
> If I hook it up and try to boot the NAS remains in
> a state with all leds shining continously which
> is,
> if I understand the descriptions in the forum
> here, normal (waiting for commands on serial
> console).
> That shows that it somehow detects that the
> interface is attached. If I remove the cable the
> box does boot.
kwboot -t -B 115200 /dev/ttyUSB0 -d
Quote
> Zyxel NAS326 Serial Pinouts (same as NSA325 and
> NSA310S/320S)
>
> GND
> RX
> TX
>
> +----+----+
> | | |
> +----+----+----+----+----+
> |3.3V| TX | RX | | GND|
> +----+----+----+ +----+
> [/code]
>
> I am not sure with TX/RX. Does "TX" mean here, TX
> from NAS326? In that case I would have to connect
> it with my FT232's RX and the other way around,
> right?
> Is baud rate critical? I set it to 112500, 8N1.
Re: NAS326 does not boot reliably July 22, 2019 02:14AM |
Registered: 5 years ago Posts: 9 |
So setting change_boot_part to 0 switches this mechanism off, right?Quote
This also serves as a rescue system. Whenever the rootfs on USB has problem and cannot boot (the effect is just like the USB drive is not plugged in), the NAS326 will fall back to booting the kernel 1 or 2 in NAND. When this occurs, the u-boot envs in step 4 must be reentered at Debian command line again to allow booting back to USB rootfs.
Re: NAS326 does not boot reliably July 23, 2019 10:01AM |
Admin Registered: 13 years ago Posts: 18,550 |