Problem booting from HDD - Zyxel NAS326
August 08, 2017 08:27AM
Hello again ;)

unfortunately I could not manage to boot from internal Harddisk on my brand new NAS326. After a while it boots to stock firmware.

This is how partitions and fstab look like:
/mnt # parted /dev/sda print
Model: ATA TOSHIBA DT01ACA3 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  2999GB  2999GB  ext3            rootfs  boot
 2      2999GB  3001GB  2048MB  linux-swap(v1)

/mnt # blkid
/dev/ubi6_0: UUID="63a41213-ef4b-4c0c-8047-00f9368d1ec6" TYPE="ubifs"
/dev/loop0: UUID="a9027743-fe43-4399-9afa-bbe73337cada" TYPE="ext2"
/dev/sda1: UUID="eadd50eb-c549-419f-bb41-bdb280f1b002" TYPE="ext3" PARTLABEL="rootfs" PARTUUID="e2a6c269-7bf0-4a95-b6e5-86a000307579"
/dev/sda2: UUID="70c9344c-2974-4a4c-a730-d92ccf2555fa" TYPE="swap" PARTUUID="7a2c6d82-814a-416a-925e-e7e98ea86017"
/mnt # cat etc/fstab 
# UNCONFIGURED FSTAB FOR BASE SYSTEM


/dev/root      /               ext3    noatime,errors=remount-ro 0 1

/mnt # ls -la
drwxrwxrwx   22 root     root          4096 Jan 20  2017 .
drwxr-xr-x   19 root     root             0 Aug  8 12:39 ..
drwxr-xr-x    2 root     root          4096 Jan 19  2017 bin
drwxr-xr-x    3 root     root          4096 Aug  7 16:42 boot
drwxr-xr-x    4 root     root          4096 Jan  2  2017 dev
drwxr-xr-x   66 root     root          4096 Aug  8 00:27 etc
drwxr-xr-x    2 root     root          4096 Sep 12  2016 home
drwxr-xr-x   15 root     root          4096 Feb  4  2017 lib
drwx------    2 root     root         16384 Jan  9  2017 lost+found
drwxr-xr-x    2 root     root          4096 Jan 21  2017 media
drwxr-xr-x    2 root     root          4096 Jan  2  2017 mnt
drwxrwxrwx    3 root     root          4096 Aug  8 00:00 nas326
drwxr-xr-x    2 root     root          4096 Jan  2  2017 opt
drwxr-xr-x    2 root     root          4096 Sep 12  2016 proc
drwx------    4 root     root          4096 Feb  4  2017 root
drwxr-xr-x    7 root     root          4096 Jan  2  2017 run
drwxr-xr-x    2 root     root          4096 Jan 19  2017 sbin
drwxr-xr-x    2 root     root          4096 Jan  2  2017 srv
drwxr-xr-x    2 root     root          4096 Apr  7  2015 sys
drwxrwxrwt    2 root     root          4096 Feb  4  2017 tmp
drwxr-xr-x   10 root     root          4096 Jan  2  2017 usr
drwxr-xr-x   11 root     root          4096 Jan  2  2017 var
/mnt #

How could I find out what the problem is without usb-serial?

usb-serial is not attached. I could not find any doc how to attach usb-serial. Does anybody know where on the NAS326 Board to connect it?
I still have the USB-to-Serial Cable which I use for NSA325. Is this compatible to NAS326?

Thanks in advance,
Peter



Edited 1 time(s). Last edit at 08/08/2017 04:13PM by bodhi.
Attachments:
open | download - fwenv_orig.txt (3.6 KB)
open | download - fwenv_modified.txt (4.8 KB)
Re: Problem booting from HDD - Zyxel NAS326
August 08, 2017 04:30PM
Hi Peter,

Welcome back :)

> How could I find out what the problem is without u
> sb-serial?

Running stock u-boot, we cannot see anything during booting without serial console. We can only guess the problem based on what's in your rootfs.

>
> usb-serial is not attached. I could not find any d
> oc how to attach usb-serial. Does anybody know whe
> re on the NAS326 Board to connect it?
> I still have the USB-to-Serial Cable which I use f
> or NSA325. Is this compatible to NAS326?

It is identical to the NSA325, even the pinouts! repeat whatever you did with the NSA325.


+----+----+           
          |    |    |
+----+----+----+----+----+
|3.3V| TX | RX |    | GND|
+----+----+----+    +----+


In the mean time, what you should do is making sure your fstab is matching with your setup. If you have updated to Debian stretch, it's important to have the root device identified with label. Especially since you have multiple partition on your disk.

cat etc/fstab
LABEL=rootfs      /               ext3    noatime,errors=remount-ro 0 1

So modify that and boot again. Observe and write down the LEDs light behavior (this also give out hints).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Problem booting from HDD - Zyxel NAS326
August 14, 2017 07:59AM
Cool, I found my thread ;)

I connected the serial console since setting "LABEL=rootfs" in fstab did not help.

I found there were some variables not set, after setting them directly in uboot, i could boot from my small 160GB test harddisk.

But there is a problem initializing my big 3TB harddrive, in uboot I cannot initialize it:

Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x01     |
egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> mw.l f1018100 20420000; mw.l f1018140 003ca800; sleep 3; scsi init
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

Error: SCSI Controller(s) 1B4B:9215 1B4B:9235 not found
scanning bus for devices...

I tried with "sleep x" for x=0 to x=5 but it stays at "scanning bus for devices" and nothing else happens.

Oh boy, don't tell me the harddrive is not compatible ;)

Cheers, Peter
Re: Problem booting from HDD - Zyxel NAS326
August 14, 2017 04:58PM
Peter,

That error message does show up in boot. But it usually was OK after we see this. Try to list the files on the root partition.

mw.l f1018100 20420000; mw.l f1018140 003ca800; sleep 3; scsi init
ext2ls scsi 0:1 /

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Problem booting from HDD - Zyxel NAS326
August 15, 2017 12:24AM
Its not about the error message. The command "scsi init" hangs.
The last message is "scanning bus for devices..." but the command does not release the command prompt, it looks like the command crashed.
I tried a second 3TB harddrive but it is the same.
Re: Problem booting from HDD - Zyxel NAS326
August 15, 2017 03:46AM
Peter,

Ah. That's new to me. Usually we see the message, but it got pass that and recognizedthe HDD. Perhaps this stock u-boot does not support >2TB capacity disk. But even that should not hang or crash. It should get pass the error and keep running.

I will need to either try it myself or look at the source code. I've tested with <= 2TB HDD only.

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