Welcome! Log In Create A New Profile

Advanced

Problem booting with 2017.07 U-Boot Kirkwood NSA325

Posted by lille 
Problem booting with 2017.07 U-Boot Kirkwood NSA325
January 08, 2018 05:33AM
I have lost my serial connection just before

8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).

the U-Boot was flashed successfully to

NSA325> version

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
NSA325>


Here my printenv output
NSA325> printenv
arcNumber=4495
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
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
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
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
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
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
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_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: 3016/131068 bytes
NSA325>

My Linux Kernel is on an SSD

NSA325> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: SSD Firm: bla  Ser#: bla
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)
## 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

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            204800          d477d704-01     83 Boot
  2     206848          30717952        d477d704-02     83
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
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: Bus 0: OK Bus 1: not available
  Device 0: Model: V2 SII SSD Firm: 1002_0.4 Ser#: blablabla
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)
device ide 0:1
** File not found /boot/uImage **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-nsa325.dtb ...
** Bad device usb 0 **
Unknown command 'bootm0x800000' - try 'help'
resetting ...


U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
NSA325>

how to boot the kernel from my SSD to proceed with the settings?



Edited 1 time(s). Last edit at 01/08/2018 06:28AM by bodhi.
Re: Problem booting with 2017.07 U-Boot Kirkwood NSA325
January 08, 2018 06:35AM
lille,

Your rootfs on SSD is not good. So, to see why and fix the problem, mount it on another Linux box. And assuming it is mounted at /media/sdb1

cd /media/sdb1
ls -lart
cd /media/sdb1/boot
ls -lart

And please post the output here.

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



Edited 1 time(s). Last edit at 01/08/2018 06:36AM by bodhi.
Re: Problem booting with 2017.07 U-Boot Kirkwood NSA325
January 08, 2018 11:21AM
thank you.

the rootfs is on the second primary partition

root@xyz:/mnt/rootfsnsa# ls -lart
insgesamt 96
drwx------  2 root root 16384 Mai 15  2017 lost+found
drwxr-xr-x  5 root root  4096 Mai 19  2017 dev
drwxr-xr-x  2 root root  4096 Mai 19  2017 home
drwxr-xr-x  2 root root  4096 Mai 19  2017 proc
drwxr-xr-x  2 root root  4096 Mai 19  2017 opt
drwxr-xr-x  2 root root  4096 Mai 19  2017 mnt
drwxr-xr-x  2 root root  4096 Mai 19  2017 run                                                                                                                              
drwxr-xr-x  2 root root  4096 Mai 19  2017 sys                                                                                                                              
drwxr-xr-x  2 root root  4096 Mai 19  2017 srv                                                                                                                              
drwxr-xr-x 10 root root  4096 Mai 19  2017 usr                                                                                                                              
drwxr-xr-x 11 root root  4096 Mai 19  2017 var                                                                                                                              
drwxr-xr-t  2 root root  4096 Mai 19  2017 tmp
drwxr-xr-x  2 root root  4096 Mai 23  2017 boot
drwxrwxrwx 21 root root  4096 Mai 23  2017 .
drwxr-xr-x 14 root root  4096 Jan  6 21:14 lib
drwxr-xr-x  2 root root  4096 Jan  6 21:17 sbin
drwxr-xr-x  2 root root  4096 Jan  6 21:21 bin
drwxr-xr-x  3 root root  4096 Jan  8 10:44 media
drwxr-xr-x 52 root root  4096 Jan  8 11:04 etc
drwx------  5 root root  4096 Jan  8 11:05 root
drwxr-xr-x  5 root root  4096 Jan  8 18:08 ..
root@xyz/mnt/rootfsnsa#

as you can see, there is also a directory called boot in the directory tree of the rootfs, this one contains only the
current working dir and the parent working dir

root@xyz:/mnt/rootfsnsa/boot# ls -lart
insgesamt 8
drwxrwxrwx 21 root root 4096 Mai 23  2017 ..
drwxr-xr-x  2 root root 4096 Mai 23  2017 .
root@xyz:/mnt/rootfsnsa/boot#

my actual boot directory is on the 1st primary partition of the SSD by the way

root@xyz:/mnt/bootnsa# ls -lart
insgesamt 39400
drwx------ 2 root root   12288 Mai 15  2017 lost+found
-rwxr-xr-x 1 root root 3154832 Mai 19  2017 zImage-4.4.0-kirkwood-tld-1
-rw------- 1 root root 3154832 Mai 19  2017 vmlinuz-4.4.0-kirkwood-tld-1
-rw-r--r-- 1 root root 7179935 Mai 19  2017 uInitrd
-rw-r--r-- 1 root root 3154896 Mai 19  2017 uImage.orig
-rw------- 1 root root 2240040 Mai 19  2017 System.map-4.4.0-kirkwood-tld-1
-rw-r--r-- 1 root root 7511582 Mai 19  2017 linux-headers-4.4.0-kirkwood-tld-1_1.0_armel.deb
drwxr-xr-x 2 root root    5120 Mai 19  2017 dts
-rw-r--r-- 1 root root  140949 Mai 19  2017 config-4.4.0-kirkwood-tld-1
-rwxr-xr-x 1 root root 3169360 Mai 19  2017 zImage.fdt
-rw-r--r-- 1 root root 3169424 Mai 19  2017 uImage
-rw-r--r-- 1 root root 7272498 Jan  6 21:19 initrd.img-4.4.0-kirkwood-tld-1
drwxrwxrwx 4 root root    1024 Jan  6 21:19 .
drwxr-xr-x 5 root root    4096 Jan  8 18:08 ..
root@xyz:/mnt/bootnsa#

below the label names of the partitions

/dev/sdf1: LABEL="boot" abc" TYPE="ext2" PARTUUID="hij"
/dev/sdf2: LABEL="rootfs" UUID="efg" TYPE="ext4" PARTUUID="klm"



Edited 2 time(s). Last edit at 01/08/2018 11:35AM by lille.
Re: Problem booting with 2017.07 U-Boot Kirkwood NSA325
January 08, 2018 12:06PM
lille,

2 problems.

1. That's a wrong organization for 2-parttion rootfs.

These files must be under /boot of the 1st partition:

-rwxr-xr-x 1 root root 3154832 Mai 19  2017 zImage-4.4.0-kirkwood-tld-1
-rw------- 1 root root 3154832 Mai 19  2017 vmlinuz-4.4.0-kirkwood-tld-1
-rw-r--r-- 1 root root 7179935 Mai 19  2017 uInitrd
-rw-r--r-- 1 root root 3154896 Mai 19  2017 uImage.orig
-rw------- 1 root root 2240040 Mai 19  2017 System.map-4.4.0-kirkwood-tld-1
-rw-r--r-- 1 root root 7511582 Mai 19  2017 linux-headers-4.4.0-kirkwood-tld-1_1.0_armel.deb
drwxr-xr-x 2 root root    5120 Mai 19  2017 dts
-rw-r--r-- 1 root root  140949 Mai 19  2017 config-4.4.0-kirkwood-tld-1
-rwxr-xr-x 1 root root 3169360 Mai 19  2017 zImage.fdt
-rw-r--r-- 1 root root 3169424 Mai 19  2017 uImage
-rw-r--r-- 1 root root 7272498 Jan  6 21:19 initrd.img-4.4.0-kirkwood-tld-1

2. The uImage should be identical to the original

Quote

-rw-r--r-- 1 root root 3154896 Mai 19 2017 uImage.orig

-rw-r--r-- 1 root root 3169424 Mai 19 2017 uImage

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

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: