Welcome! Log In Create A New Profile

Advanced

NSA320 install Linux Kernel 4.16.1 Kirkwood package and Debian rootfs

Posted by MoA 
Hello all,


To start: I have a NSA320, connected with serial where I could flash the latest uboot.

I know there is still the kernel + rootfs to be installed, but I don't exactly understand how.

I have tried with the roofs first so I downloaded Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017) and extracted the content to an ext3 usb everything at root level (so I have /boot and other folders in the USB root folder) and also renamed the USB label to "USBROOT" according to this guide install-debian-wheezy-zyxel-nsa320.

but nothing really happens and since I do not have my shell console anymore I am a bit lost...

can you please advice how to install linux kernel or rootfs?

thank you very much



U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:46:11 -0700)
ZyXEL NSA320 2-Bay Power Media Server

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed
Unknown command 'mmc' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30230528        0e5601b2-01     83 Boot

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** File not found /boot/uImage **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** File not found /boot/uImage **
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA320>



Edited 1 time(s). Last edit at 05/01/2018 02:19PM by bodhi.
here below the logs from printenv

NSA320> printenv
arcNumber=2097
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_loaded=0
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3129/131068 bytes
Re: Linux Kernel 4.16.1 Kirkwood package and Debian rootfs
May 01, 2018 02:27PM
MoA,

There are a couple things wrong in u-boot envs, and rootfs.

Mount your USB drive on another Linux box and, assuming it is mounted at /media/sdb1

cd /media/sdb1/
ls -latr 
cd /media/sdb1/boot
ls -latr 
mount
e2label /dev/sdb1
And please post the output of th e above commands, or the entire log here.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 05/01/2018 06:43PM by bodhi.
Hi,

thank you,

actually I was able to solve the above issue but now I am encountering a new issue...
the network does not work anymore


root@debian:~# systemctl status networking.service
* networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor prese
t: enabled)
   Active: failed (Result: exit-code) since Thu 2018-05-03 11:07:41 P
DT; 4min 27s ago
     Docs: man:interfaces(5)
  Process: 322 ExecStart=/sbin/ifup -a --read-environment (code=exited,
status=1/FAILURE)
  Process: 312 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [
-n "$(ifquery --read-environment --list --exccatlude=lo)" ] && udevadm settle (code
=exited, status=0/SUCCESS)
 Main PID: 322 (code=exited, status=1/FAILURE)

May 03 11:07:41 debian systemd[1]: Starting Raise network interfaces...
May 03 11:07:41 debian ifup[322]: run-parts: failed to stat component /etc/netwo
rk/if-pre-up.d/wpasupplicant: No such file or directory
May 03 11:07:41 debian ifup[322]: ifup: pre-up script failed
May 03 11:07:41 debian systemd[1]: networking.service: Main process exit
ed, code=exited, status=1/FAILURE
May 03 11:07:41 debian systemd[1]: Failed to start Raise network interfa
ces.
May 03 11:07:41 debian systemd[1]: networking.service: Unit entered fail
ed state.
May 03 11:07:41 debian systemd[1]: networking.service: Failed with resul
t 'exit-code'.




root@debian:~# ifconfig -a
eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether xxxxxxxxxxxxxxxxx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 36

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 52  bytes 3432 (3.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 52  bytes 3432 (3.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

any idea?... thank you very much
Re: NSA320 install Linux Kernel 4.16.1 Kirkwood package and Debian rootfs
May 03, 2018 03:46PM
MoA,

Quote

root@debian:~# systemctl status networking.service

I'm not running systemd on these Kirkwood NAS, so have no idea what's wrong.

-bodhi
===========================
Forum Wiki
bodhi's corner
MoA,

I happened to have the same box and had recently put Debian with systemd up with great help from bodhi so I might be of some help. I just checked your mentioned file and noted it was a symbolic link to the ifupdown.sh file as shown below. Please check if you could fix that link:


root@NAS-ZyXEL:~# ls /etc/network/if-pre-up.d/ -l
total 20
drwxr-xr-x 2 root root 4096 Apr 14 06:00 .
drwxr-xr-x 7 root root 4096 Apr 21 19:32 ..
-rwxr-xr-x 1 root root  344 Apr 28  2012 ethtool
-rwxr-xr-x 1 root root 6298 Sep 27  2016 ifenslave
lrwxrwxrwx 1 root root   32 Oct 14  2017 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh

Actually all this issues happen once i install openmediavault4 on my nsa320 debian 9.

But the workaround I found was to uninstall all these non working services.. and add autoplug to the eth interfaces

At the end i had a nsa320 debian 9 working fine with omv4.

But i notice that the Omv extra were not ported for omv4 so I flashed the nsa320 back to debian8 with omv3 which is quite stable.
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: