Welcome! Log In Create A New Profile

Advanced

Zyxel NAS326 HDD booting issue

Posted by bodhi 
Zyxel NAS326 HDD booting issue
August 20, 2019 05:46PM
Zyxel NAS326 HDD booting issue


Note: you don't have to worry about this issue if you are booting with USB rootfs.

Here is what I found from reading the GPL source to trouble shoot the issue of booting the NAS326 with 2 HDDs, with the rootfs is on one HDD.

NAS326 stock u-boot uses an old AHCI driver. This old version set the link detection timeou to a very small value of 4 ms. This interval is apparently too small. In the latest version of this AHCI driver, it is set to 200 ms.

Since I have not started building new u-boot (because of UART booting issue with this box), we cannot update this u-boot, or replace it with a better one.

So at the moment, we can only work around it.

I will do some testing to see if we can pick a good work around to enable the SATA link up before we try to initialize the SATA port for booting the kernel on HDD.

Update:

- Here is a work around that seems to do the trick consistently for me and heiko: Whenever the box needs to be rebooted, just shutdown and power up again. Then both HDDs will be initialized OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
pepa65
Re: Zyxel NAS326 HDD booting issue
August 31, 2022 07:22AM
I'm gathering that the issue is that it sometimes want to boot from the wrong HD, is that correct?
Would it be possible to have the kernel and essential files also in place on the second HD, which would then boot into the rootfs on the proper drive?
Re: Zyxel NAS326 HDD booting issue
August 31, 2022 03:28PM
> I'm gathering that the issue is that it sometimes
> want to boot from the wrong HD, is that correct?

Not that issue. The partition label rootfs tells the kernel where the rootfs is.

> Would it be possible to have the kernel and
> essential files also in place on the second HD,
> which would then boot into the rootfs on the
> proper drive?

The issue with the 2nd HDD on this box is the old driver that times out too soon.

Sure, as a work around, if you place the kernel files on both drives. But also have scandisk logic in envs, then it would find the kernel. If there is no scandisk logic, then it might not boot. Currently, in this box installation envs I did not have scanning logic.

Also, even with scanning logic, it might not work in some cases, so the first workaround is a power down/up.

I might look into this issue again to see if we can have a better work around, or just create a new u-boot (currently I don't have enough free time for this option).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: