unbrick NSA310 and set up environement
August 02, 2023 02:36PM
Hi,

From a wrong flashing process I was able to unbrick my NSA310 (with another Linux box, loading uboot.kwb via kwboot, UART module cable)

I have the console of NSA310> and I am able to load the uboot.kwb, but unable to set up the environment properly (using these files: uboot.2017.07-tld-1.nsa310.mtd0.kwb uboot.kwb
uboot.2016.05-tld-1.environment.img uboot.img
)

is that possible to completely clear the environment from nand and setup the proper environment?
I only access to preboot NSA310> console now.

I have tried to load environment image following this guide, but after loading environment image and doing a reset, my NAS is 'bricked' again, no response (I need to do a kwboot image transfer again via UART) just all the front LEDs are red.

thanks in advance
Peter
Re: unbrick NSA310 and set up environement
August 02, 2023 05:06PM
Hi,
meanwhile I have managed to unbrick the device, so at least uboot works.
Created a Debian image (5.2.9) using this guide.

The NAS now is trying to boot from the usb Debian, but hangs:

NSA310> printenv[   10.889811][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Unknown command 'printenv[' - try 'help'
NSA310> [   10.898816][ Not tainted 5.2.9-kirkwood-tld-1 #1
Unknown command '[' - try 'help'
NSA310> [   10.906500][ attened Device Tree)
Unknown command '[' - try 'help'
NSA310> [   10.913522][ m [<c010bb00>] (show_stack+0x10/0x14)
Unknown command '[' - try 'help'
NSA310> [   10.922013][ 119fa0>] (panic+0xe0/0x30c)
Unknown command '[' - try 'help'
NSA310> [   10.929634][ >] (mount_block_root+0x1bc/0x2a4)
Unknown command '[' - try 'help'
NSA310> [   10.937859][ m [<c0e017f8>] (mount_root+0xe8/0x154)
Unknown command '[' - try 'help'
NSA310> [   10.946430][ e019b0>] (prepare_namespace+0x14c/0x18c)
Unknown command '[' - try 'help'
NSA310> [   10.955176][ om [<c0e011c8>] (kernel_init_freeable+0x270/0x2dc)
Unknown command '[' - try 'help'
NSA310> [   10.964798][  from [<c09dcee0>] (kernel_init+0x8/0x10c)
Unknown command '[' - try 'help'
NSA310> [   10.973715][ 01010e0>] (ret_from_fork+0x14/0x34)
Unknown command '[' - try 'help'
NSA310> [   10.982017][ 8bff8)
Unknown command '[' - try 'help'
NSA310> [   10.987792][       00000000 00000000 00000000 00000000
Unknown command '[' - try 'help'
NSA310> [   10.996706][ 000000 00000000 00000000 00000000 00000000
Unknown command '[' - try 'help'
NSA310> [   11.005616][ 000000 00000013 00000000
Unknown command '[' - try 'help'
NSA310> [   11.012968][ : VFS: Unable to mount root fs on unknown-block(0,0) ]---
Unknown command '[' - try 'help'
NSA310> [   10.772690][ " or unknown-block(0,0): error -6
> [   10.780969][  T1] Please append a correct "root=" boot option; here are the available partitions:
> [   10.790154][ T1] 1f00            1024 mtdblock0
> [   10.790158][ T1]  (driver?)
> [   10.798180][  T1] 1f01             512 mtdblock1
> [   10.798183][ T1]  (driver?)
> [   10.806190][  T1] 1f02             512 mtdblock2
> [   10.806194][ T1]  (driver?)
> [   10.814180][ T1] 1f03             512 mtdblock3
> [   10.814183][  T1]  (driver?)
> [   10.822149][ T1] 1f04           10240 mtdblock4
> [   10.822151][  T1]  (driver?)
> [   10.830137][ T1] 1f05           10240 mtdblock5
> [   10.830140][ T1]  (driver?)
> [   10.838124][  T1] 1f06           48896 mtdblock6
> [   10.838127][ T1]  (driver?)
> [   10.846113][ T1] 1f07           10240 mtdblock7
> [   10.846116][  T1]  (driver?)
> [   10.854098][ T1] 1f08           48896 mtdblock8
> [   10.854101][ T1]  (driver?)
> [   10.862078][  T1] 0800      2930266584 sda
> [   10.862081][ T1]  driver: sd
> [   10.869678][ T1]   0801          498688 sda1 91a2caf0-2ba2-4347-a344-c703e60931ab
> [   10.869682][  T1]
> [   10.879750][ T1]   0802      2929766400 sda2 cfa961ee-be59-4337-a242-fb0d62872fc2
> [   10.879753][ T1]
> [   10.889811][  T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
> [   10.898816][ T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.9-kirkwood-tld-1 #1
> [   10.906500][ T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
> [   10.913522][  T1] [<c010f6ac>] (unwind_backtrace) from [<c010bb00>] (show_stack+0x10/0x14)
> [   10.922013][ T1] [<c010bb00>] (show_stack) from [<c0119fa0>] (panic+0xe0/0x30c)
> [   10.929634][ T1] [<c0119fa0>] (panic) from [<c0e01628>] (mount_block_root+0x1bc/0x2a4)
> [   10.937859][ T1] [<c0e01628>] (mount_block_root) from [<c0e017f8>] (mount_root+0xe8/0x154)
> [   10.946430][ T1] [<c0e017f8>] (mount_root) from [<c0e019b0>] (prepare_namespace+0x14c/0x18c)
> [   10.955176][ 1] [<c0e019b0>] (prepare_namespace) from [<c0e011c8>] (kernel_init_freeable+0x270/0x2dc)
> [   10.964798][ T1] [<c0e011c8>] (kernel_init_freeable) from [<c09dcee0>] (kernel_init+0x8/0x10c)
> [   10.973715][ T1] [<c09dcee0>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
> [   10.982017][ T1] Exception stack(0xcf88bfb0 to 0xcf88bff8)
> [   10.987792][  T1] bfa0:                                     00000000 00000000 00000000 00000000
> [   10.996706][ T1] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [   11.005616][ T1] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
> [   11.012968][  T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

My current ENV:

NSA310> printenv
arcNumber=4022
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=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa310.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: 3008/131068 bytes


I suspect it is almost done, just need some change in environment.
thanks!
Re: unbrick NSA310 and set up environement
August 02, 2023 09:19PM
disconnect all the hard drives, only connect the usb boot drive. (with kernel and root file system)

kwboot

change the "set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params" to

set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params

try boot it again
Re: unbrick NSA310 and set up environement
August 02, 2023 11:29PM
Hi David,
thanks, I have unplugged SATA HDD, only the USB is connected.
changed the environment values, but same hang at boot:

NSA310> printenv
arcNumber=4022
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 i
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa310.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 eche
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



[   10.494813][  T114] ata2: SATA link down (SStatus 0 SControl F300)
[   10.503337][   T15] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   10.511229][    T1] md: Waiting for all devices to be available before autodetect
[   10.518859][    T1] md: If you don't use raid, use raid=noautodetect
[   10.525977][    T1] md: Autodetecting RAID arrays.
[   10.530817][    T1] md: autorun ...
[   10.534382][    T1] md: ... autorun DONE.
[   10.538614][    T1] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   10.546888][    T1] Please append a correct "root=" boot option; here are the available partitions:
[   10.556060][    T1] 1f00            1024 mtdblock0
[   10.556065][    T1]  (driver?)
[   10.564082][    T1] 1f01             512 mtdblock1
[   10.564085][    T1]  (driver?)
[   10.572047][    T1] 1f02             512 mtdblock2
[   10.572049][    T1]  (driver?)
[   10.580102][    T1] 1f03             512 mtdblock3
[   10.580105][    T1]  (driver?)
[   10.588102][    T1] 1f04           10240 mtdblock4
[   10.588105][    T1]  (driver?)
[   10.596190][    T1] 1f05           10240 mtdblock5
[   10.596194][    T1]  (driver?)
[   10.604187][    T1] 1f06           48896 mtdblock6
[   10.604191][    T1]  (driver?)
[   10.612169][    T1] 1f07           10240 mtdblock7
[   10.612172][    T1]  (driver?)
[   10.620165][    T1] 1f08           48896 mtdblock8
[   10.620168][    T1]  (driver?)
[   10.628152][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   10.637151][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.9-kirkwood-tld-1 #1
[   10.644836][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   10.651858][    T1] [<c010f6ac>] (unwind_backtrace) from [<c010bb00>] (show_stack+0x10/0x14)
[   10.660348][    T1] [<c010bb00>] (show_stack) from [<c0119fa0>] (panic+0xe0/0x30c)
[   10.667970][    T1] [<c0119fa0>] (panic) from [<c0e01628>] (mount_block_root+0x1bc/0x2a4)
[   10.676194][    T1] [<c0e01628>] (mount_block_root) from [<c0e017f8>] (mount_root+0xe8/0x154)
[   10.684765][    T1] [<c0e017f8>] (mount_root) from [<c0e019b0>] (prepare_namespace+0x14c/0x18c)
[   10.693512][    T1] [<c0e019b0>] (prepare_namespace) from [<c0e011c8>] (kernel_init_freeable+0x270/0x2dc)
[   10.703134][    T1] [<c0e011c8>] (kernel_init_freeable) from [<c09dcee0>] (kernel_init+0x8/0x10c)
[   10.712052][    T1] [<c09dcee0>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[   10.720354][    T1] Exception stack(0xcf88bfb0 to 0xcf88bff8)
[   10.726127][    T1] bfa0:                                     00000000 00000000 00000000 00000000
[   10.735042][    T1] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   10.743952][    T1] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   10.751304][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

what else shall I try?
Re: unbrick NSA310 and set up environement
August 03, 2023 04:42AM
Peter,

> disconnect all the hard drives, only connect the
> usb boot drive. (with kernel and root file
> system)
>
> kwboot
>
> change the "set_bootargs=setenv bootargs
> console=ttyS0,115200 root=LABEL=rootfs
> rootdelay=10 $mtdparts $custom_params" to
>
> set_bootargs=setenv bootargs console=ttyS0,115200
> root=/dev/sda1 rootdelay=10 $mtdparts
> $custom_params
>
> try boot it again

What David said above was

- kwboot. Interrupt serial console and,

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'

and then boot
boot

After you've booted into Debian. Check your rootfs label, make sure it is rootfs

e2label /dev/sda1
if it is not, set it

e2label /dev/sda1 rootfs
sync
And reboot. Let it boot without interuption.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: unbrick NSA310 and set up environement
August 14, 2023 04:07AM
Hi,
I have followed your guidance, but still has the kernel panic after 'boot' command:

[   10.534378][    T1] md: ... autorun DONE.
[   10.538606][    T1] VFS: Cannot open root device "(null)" or unknown-block(0,                                0): error -6
[   10.546877][    T1] Please append a correct "root=" boot option; here are the                                 available partitions:
[   10.556054][    T1] 1f00            1024 mtdblock0
[   10.556058][    T1]  (driver?)
[   10.564069][    T1] 1f01             512 mtdblock1
[   10.564073][    T1]  (driver?)
[   10.572042][    T1] 1f02             512 mtdblock2
[   10.572045][    T1]  (driver?)
[   10.580096][    T1] 1f03             512 mtdblock3
[   10.580100][    T1]  (driver?)
[   10.588088][    T1] 1f04           10240 mtdblock4
[   10.588091][    T1]  (driver?)
[   10.596175][    T1] 1f05           10240 mtdblock5
[   10.596179][    T1]  (driver?)
[   10.604164][    T1] 1f06           48896 mtdblock6
[   10.604167][    T1]  (driver?)
[   10.612138][    T1] 1f07           10240 mtdblock7
[   10.612141][    T1]  (driver?)
[   10.620134][    T1] 1f08           48896 mtdblock8
[   10.620137][    T1]  (driver?)
[   10.628122][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs                                 on unknown-block(0,0)
[   10.637129][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.9-kirkwood-tl                                d-1 #1
[   10.644814][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   10.651836][    T1] [<c010f6ac>] (unwind_backtrace) from [<c010bb00>] (show_s                                tack+0x10/0x14)
[   10.660327][    T1] [<c010bb00>] (show_stack) from [<c0119fa0>] (panic+0xe0/0                                x30c)
[   10.667947][    T1] [<c0119fa0>] (panic) from [<c0e01628>] (mount_block_root+                                0x1bc/0x2a4)
[   10.676172][    T1] [<c0e01628>] (mount_block_root) from [<c0e017f8>] (mount_                                root+0xe8/0x154)
[   10.684743][    T1] [<c0e017f8>] (mount_root) from [<c0e019b0>] (prepare_name                                space+0x14c/0x18c)
[   10.693490][    T1] [<c0e019b0>] (prepare_namespace) from [<c0e011c8>] (kerne                                l_init_freeable+0x270/0x2dc)
[   10.703111][    T1] [<c0e011c8>] (kernel_init_freeable) from [<c09dcee0>] (ke                                rnel_init+0x8/0x10c)
[   10.712029][    T1] [<c09dcee0>] (kernel_init) from [<c01010e0>] (ret_from_fo                                rk+0x14/0x34)
[   10.720331][    T1] Exception stack(0xcf88bfb0 to 0xcf88bff8)
[   10.726105][    T1] bfa0:                                     00000000 000000                                00 00000000 00000000
[   10.735019][    T1] bfc0: 00000000 00000000 00000000 00000000 00000000 000000                                00 00000000 00000000
[   10.743930][    T1] bfe0: 00000000 00000000 00000000 00000000 00000013 000000                                00
[   10.751282][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount                                 root fs on unknown-block(0,0) ]---

what could be the problem?
thanks
Re: unbrick NSA310 and set up environement
August 14, 2023 04:11AM
Hi,
thanks, followed guidance but still kernel panic because of root device problems:

[   10.534378][    T1] md: ... autorun DONE.
[   10.538606][    T1] VFS: Cannot open root device "(null)" or unknown-block(0,                                0): error -6
[   10.546877][    T1] Please append a correct "root=" boot option; here are the                                 available partitions:
[   10.556054][    T1] 1f00            1024 mtdblock0
[   10.556058][    T1]  (driver?)
[   10.564069][    T1] 1f01             512 mtdblock1
[   10.564073][    T1]  (driver?)
[   10.572042][    T1] 1f02             512 mtdblock2
[   10.572045][    T1]  (driver?)
[   10.580096][    T1] 1f03             512 mtdblock3
[   10.580100][    T1]  (driver?)
[   10.588088][    T1] 1f04           10240 mtdblock4
[   10.588091][    T1]  (driver?)
[   10.596175][    T1] 1f05           10240 mtdblock5
[   10.596179][    T1]  (driver?)
[   10.604164][    T1] 1f06           48896 mtdblock6
[   10.604167][    T1]  (driver?)
[   10.612138][    T1] 1f07           10240 mtdblock7
[   10.612141][    T1]  (driver?)
[   10.620134][    T1] 1f08           48896 mtdblock8
[   10.620137][    T1]  (driver?)
[   10.628122][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs                                 on unknown-block(0,0)
[   10.637129][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.9-kirkwood-tl                                d-1 #1
[   10.644814][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   10.651836][    T1] [<c010f6ac>] (unwind_backtrace) from [<c010bb00>] (show_s                                tack+0x10/0x14)
[   10.660327][    T1] [<c010bb00>] (show_stack) from [<c0119fa0>] (panic+0xe0/0                                x30c)
[   10.667947][    T1] [<c0119fa0>] (panic) from [<c0e01628>] (mount_block_root+                                0x1bc/0x2a4)
[   10.676172][    T1] [<c0e01628>] (mount_block_root) from [<c0e017f8>] (mount_                                root+0xe8/0x154)
[   10.684743][    T1] [<c0e017f8>] (mount_root) from [<c0e019b0>] (prepare_name                                space+0x14c/0x18c)
[   10.693490][    T1] [<c0e019b0>] (prepare_namespace) from [<c0e011c8>] (kerne                                l_init_freeable+0x270/0x2dc)
[   10.703111][    T1] [<c0e011c8>] (kernel_init_freeable) from [<c09dcee0>] (ke                                rnel_init+0x8/0x10c)
[   10.712029][    T1] [<c09dcee0>] (kernel_init) from [<c01010e0>] (ret_from_fo                                rk+0x14/0x34)
[   10.720331][    T1] Exception stack(0xcf88bfb0 to 0xcf88bff8)
[   10.726105][    T1] bfa0:                                     00000000 000000                                00 00000000 00000000
[   10.735019][    T1] bfc0: 00000000 00000000 00000000 00000000 00000000 000000                                00 00000000 00000000
[   10.743930][    T1] bfe0: 00000000 00000000 00000000 00000000 00000013 000000                                00
[   10.751282][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount                                 root fs on unknown-block(0,0) ]---

what else could be the problem? 
thanks

Re: unbrick NSA310 and set up environement
August 14, 2023 04:47AM
Peter,

There are a few different possible reasons for this booting problem.

Please post the entire serial boot log (from u-boot banner until the kernel panic).

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



Edited 1 time(s). Last edit at 08/14/2023 04:48AM by bodhi.
Re: unbrick NSA310 and set up environement
August 15, 2023 04:29AM
Hi,

I have added the boot log:

NSA310> boot

Reset IDE: ide_preinit failed

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            60086272        c418c1ac-01     83

## 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
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 415 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4976248 bytes read in 705 ms (6.7 MiB/s)
loading uInitrd ...
9713936 bytes read in 914 ms (10.1 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310.dtb ...
12568 bytes read in 2614 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2023-08-02  21:06:06 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976184 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1ca000, end 0fb0d8d0 ... OK
   Loading Device Tree to 0f1c3000, end 0f1c9117 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-kirkwood-tld-1 (root@tldDebian) (gcc                                                                    version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sat Aug 17 15:00:56                                                                    PDT 2019
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr                                                                   =0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: ZyXEL NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65                                                                   024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072                                                                    bytes)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 by                                                                   tes)
[    0.000000][    T0] Memory: 244268K/262144K available (9216K kernel code, 868                                                                   K rwdata, 3400K rodata, 1024K init, 301K bss, 17876K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x3                                                                   8c/0x928 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay i                                                                   s 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycl                                                                   es: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps eve                                                                   ry 10737418237ns
[    0.000048][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000794][    T0] Console: colour dummy device 80x30
[    0.000847][    T0] Calibrating delay loop (skipped), value calculated using                                                                    timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000872][    T0] pid_max: default: 32768 minimum: 301
[    0.001238][    T0] LSM: Security Framework initializing
[    0.001422][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 byte                                                                   s)
[    0.001451][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096                                                                    bytes)
[    0.002393][    T0] *** VALIDATE proc ***
[    0.002664][    T0] *** VALIDATE cgroup1 ***
[    0.002691][    T0] *** VALIDATE cgroup2 ***
[    0.002796][    T0] CPU: Testing write buffer coherency: ok
[    0.004509][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.004827][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.005115][    T1] rcu: Hierarchical SRCU implementation.
[    0.008297][    T1] devtmpfs: initialized
[    0.014152][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffff                                                                   ffff, max_idle_ns: 19112604462750000 ns
[    0.014185][    T1] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.014436][    T1] xor: measuring software checksum speed
[    0.110113][    T1]    arm4regs  :  1084.000 MB/sec
[    0.210078][    T1]    8regs     :   654.000 MB/sec
[    0.310075][    T1]    32regs    :   950.800 MB/sec
[    0.310094][    T1] xor: using function: arm4regs (1084.000 MB/sec)
[    0.310115][    T1] prandom: seed boundary self test passed
[    0.314291][    T1] prandom: 100 self tests passed
[    0.314301][    T1] pinctrl core: initialized pinctrl subsystem
[    0.315753][    T1] NET: Registered protocol family 16
[    0.316169][    T1] DMA: preallocated 256 KiB pool for atomic coherent alloca                                                                   tions
[    0.316968][    T1] audit: initializing netlink subsys (disabled)
[    0.318224][   T14] audit: type=2000 audit(0.310:1): state=initialized audit_                                                                   enabled=0 res=1
[    0.318346][    T1] cpuidle: using governor ladder
[    0.318427][    T1] cpuidle: using governor menu
[    0.318868][    T1] Feroceon L2: Enabling L2
[    0.318919][    T1] Feroceon L2: Cache support initialised.
[    0.324635][    T1] No ATAGs?
[    2.560056][    C0] random: fast init done
[    6.251077][   T71] alg: No test for lzo-rle (lzo-rle-generic)
[    6.251434][   T73] alg: No test for lzo-rle (lzo-rle-scomp)
[    6.430639][    T1] raid6: int32x8  gen()   128 MB/s
[    6.600294][    T1] raid6: int32x8  xor()    86 MB/s
[    6.770413][    T1] raid6: int32x4  gen()   130 MB/s
[    6.940230][    T1] raid6: int32x4  xor()    84 MB/s
[    7.110391][    T1] raid6: int32x2  gen()   133 MB/s
[    7.280193][    T1] raid6: int32x2  xor()    94 MB/s
[    7.450399][    T1] raid6: int32x1  gen()   100 MB/s
[    7.620403][    T1] raid6: int32x1  xor()    69 MB/s
[    7.620414][    T1] raid6: using algorithm int32x2 gen() 133 MB/s
[    7.620422][    T1] raid6: .... xor() 94 MB/s, rmw enabled
[    7.620430][    T1] raid6: using intx1 recovery algorithm
[    7.620706][    T1] vgaarb: loaded
[    7.621207][    T1] SCSI subsystem initialized
[    7.621716][    T1] usbcore: registered new interface driver usbfs
[    7.621779][    T1] usbcore: registered new interface driver hub
[    7.621866][    T1] usbcore: registered new device driver usb
[    7.622047][    T1] pps_core: LinuxPPS API ver. 1 registered
[    7.622059][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodol                                                                   fo Giometti <giometti@linux.it>
[    7.622087][    T1] PTP clock support registered
[    7.623300][    T1] clocksource: Switched to clocksource orion_clocksource
[    8.654563][    T1] VFS: Disk quotas dquot_6.6.0
[    8.654657][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096                                                                    bytes)
[    8.664462][    T1] NET: Registered protocol family 2
[    8.665305][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order:                                                                    0, 4096 bytes)
[    8.665342][    T1] TCP established hash table entries: 2048 (order: 1, 8192                                                                    bytes)
[    8.665378][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    8.665409][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    8.665504][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    8.665531][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    8.665759][    T1] NET: Registered protocol family 1
[    8.666410][    T1] RPC: Registered named UNIX socket transport module.
[    8.666424][    T1] RPC: Registered udp transport module.
[    8.666432][    T1] RPC: Registered tcp transport module.
[    8.666441][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    8.666456][    T1] PCI: CLS 0 bytes, default 32
[    8.666785][    T1] NetWinder Floating Point Emulator V0.97 (double precision                                                                   )
[    8.667920][    T1] Initialise system trusted keyrings
[    8.667970][    T1] Key type blacklist registered
[    8.668199][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    8.668290][    T1] zbud: loaded
[    8.669403][    T1] NFS: Registering the id_resolver key type
[    8.669432][    T1] Key type id_resolver registered
[    8.669442][    T1] Key type id_legacy registered
[    8.669462][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering                                                                   ...
[    8.669479][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    8.669764][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat                                                                   , Inc.
[    8.670002][    T1] fuse: init (API version 7.31)
[    8.670386][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    8.670573][    T1] orangefs_init: module version upstream loaded
[    8.670586][    T1] SGI XFS with ACLs, security attributes, realtime, scrub,                                                                    no debug enabled
[    8.673809][    T1] async_tx: api initialized (async)
[    8.673836][    T1] Key type asymmetric registered
[    8.673847][    T1] Asymmetric key parser 'x509' registered
[    8.673905][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded                                                                    (major 246)
[    8.675351][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinc                                                                   trl driver
[    8.677299][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge t                                                                   o bus 0000:00
[    8.677323][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    8.677339][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefff                                                                   ffff]
[    8.677353][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    8.677474][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    8.677515][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pr                                                                   ef]
[    8.678971][    T1] PCI: bus0: Fast back to back transfers disabled
[    8.678998][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-0                                                                   0]), reconfiguring
[    8.679190][    T1] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    8.679233][    T1] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    8.679263][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64                                                                   bit pref]
[    8.679288][    T1] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64                                                                   bit pref]
[    8.679308][    T1] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pr                                                                   ef]
[    8.679413][    T1] pci 0000:01:00.0: supports D1 D2
[    8.679428][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3co                                                                   ld
[    8.704613][    T1] PCI: bus1: Fast back to back transfers disabled
[    8.704641][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to                                                                    01
[    8.704850][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00f                                                                   ffff]
[    8.704868][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    8.704884][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe0100                                                                   7ff pref]
[    8.704906][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000f                                                                   fff pref]
[    8.704923][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013                                                                   fff 64bit pref]
[    8.704949][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014                                                                   fff 64bit pref]
[    8.704972][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    8.704989][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    8.705004][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    8.705022][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00ff                                                                   fff]
[    8.705141][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    8.705700][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    8.764110][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor                                                                    cpy intr )
[    8.766113][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    8.824111][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor                                                                    cpy intr )
[    8.826362][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    8.827677][    T1] printk: console [ttyS0] disabled
[    8.827751][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base                                                                   _baud = 12500000) is a 16550A
[    9.765372][    T1] printk: console [ttyS0] enabled
[    9.777838][    T1] loop: module loaded
[    9.782293][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    9.790714][    T1] scsi host0: sata_mv
[    9.795209][    T1] scsi host1: sata_mv
[    9.799350][    T1] ata1: SATA max UDMA/133 irq 32
[    9.804224][    T1] ata2: SATA max UDMA/133 irq 32
[    9.810038][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    9.817240][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[    9.822584][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,                                                                    OOB size: 64
[    9.830918][    T1] Scanning device for bad blocks
[    9.923251][    T1] Bad eraseblock 911 at 0x0000071e0000
[    9.939439][    T1] 9 fixed-partitions partitions found on MTD device orion_n                                                                   and
[    9.946888][    T1] Creating 9 MTD partitions on "orion_nand":
[    9.952759][    T1] 0x000000000000-0x000000100000 : "uboot"
[    9.959710][    T1] 0x000000100000-0x000000180000 : "uboot_env"
[    9.966961][    T1] 0x000000180000-0x000000200000 : "key_store"
[    9.974196][    T1] 0x000000200000-0x000000280000 : "info"
[    9.980941][    T1] 0x000000280000-0x000000c80000 : "etc"
[    9.987686][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    9.994870][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[   10.002038][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[   10.009213][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[   10.017624][    T1] libphy: Fixed MDIO Bus: probed
[   10.023170][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Drive                                                                   r
[   10.030497][    T1] ehci-pci: EHCI PCI platform driver
[   10.035793][    T1] ehci-orion: EHCI orion driver
[   10.040727][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.047024][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigne                                                                   d bus number 1
[   10.055629][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.083447][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.090507][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=                                                                   0002, bcdDevice= 5.02
[   10.099564][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, Seria                                                                   lNumber=1
[   10.107559][    T1] usb usb1: Product: EHCI Host Controller
[   10.113186][    T1] usb usb1: Manufacturer: Linux 5.2.9-kirkwood-tld-1 ehci_h                                                                   cd
[   10.120566][    T1] usb usb1: SerialNumber: f1050000.ehci
[   10.126635][    T1] hub 1-0:1.0: USB hub found
[   10.131178][    T1] hub 1-0:1.0: 1 port detected
[   10.136631][    T1] usbcore: registered new interface driver usb-storage
[   10.143437][  T112] ata1: SATA link down (SStatus 0 SControl F300)
[   10.150065][    T1] mousedev: PS/2 mouse device common for all mice
[   10.157001][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   10.162885][    T1] i2c /dev entries driver
[   10.168679][    T1] device-mapper: uevent: version 1.0.3
[   10.174391][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialis                                                                   ed: dm-devel@redhat.com
[   10.184012][    T1] device-mapper: multipath round-robin: version 1.2.0 loade                                                                   d
[   10.191271][    T1] device-mapper: multipath queue-length: version 0.2.0 load                                                                   ed
[   10.198686][    T1] device-mapper: multipath service-time: version 0.3.0 load                                                                   ed
[   10.206147][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   10.212969][    T1] device-mapper: raid: Loading target version 1.14.0
[   10.221679][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[   10.228180][    T1] drop_monitor: Initializing network drop monitor service
[   10.235524][    T1] NET: Registered protocol family 17
[   10.240924][    T1] Key type dns_resolver registered
[   10.246799][    T1] registered taskstats version 1
[   10.251614][    T1] Loading compiled-in X.509 certificates
[   10.257237][    T1] zswap: loaded using pool lzo/zbud
[   10.277417][    T1] Key type big_key registered
[   10.285413][    T1] Key type encrypted registered
[   10.292112][    T1] rtc-mv f1010300.rtc: setting system clock to 2000-01-01T0                                                                   0:00:00 UTC (946684800)
[   10.494809][  T114] ata2: SATA link down (SStatus 0 SControl F300)
[   10.503334][   T15] usb 1-1: new high-speed USB device number 2 using orion-e                                                                   hci
[   10.511222][    T1] md: Waiting for all devices to be available before autode                                                                   tect
[   10.518853][    T1] md: If you don't use raid, use raid=noautodetect
[   10.525982][    T1] md: Autodetecting RAID arrays.
[   10.530822][    T1] md: autorun ...
[   10.534386][    T1] md: ... autorun DONE.
[   10.538617][    T1] VFS: Cannot open root device "(null)" or unknown-block(0,                                                                   0): error -6
[   10.546885][    T1] Please append a correct "root=" boot option; here are the                                                                    available partitions:
[   10.556065][    T1] 1f00            1024 mtdblock0
[   10.556069][    T1]  (driver?)
[   10.564089][    T1] 1f01             512 mtdblock1
[   10.564092][    T1]  (driver?)
[   10.572060][    T1] 1f02             512 mtdblock2
[   10.572063][    T1]  (driver?)
[   10.580107][    T1] 1f03             512 mtdblock3
[   10.580111][    T1]  (driver?)
[   10.588106][    T1] 1f04           10240 mtdblock4
[   10.588109][    T1]  (driver?)
[   10.596194][    T1] 1f05           10240 mtdblock5
[   10.596197][    T1]  (driver?)
[   10.604191][    T1] 1f06           48896 mtdblock6
[   10.604194][    T1]  (driver?)
[   10.612166][    T1] 1f07           10240 mtdblock7
[   10.612168][    T1]  (driver?)
[   10.620152][    T1] 1f08           48896 mtdblock8
[   10.620155][    T1]  (driver?)
[   10.628140][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs                                                                    on unknown-block(0,0)
[   10.637146][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.9-kirkwood-tl                                                                   d-1 #1
[   10.644831][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   10.651854][    T1] [<c010f6ac>] (unwind_backtrace) from [<c010bb00>] (show_s                                                                   tack+0x10/0x14)
[   10.660344][    T1] [<c010bb00>] (show_stack) from [<c0119fa0>] (panic+0xe0/0                                                                   x30c)
[   10.667965][    T1] [<c0119fa0>] (panic) from [<c0e01628>] (mount_block_root+                                                                   0x1bc/0x2a4)
[   10.676191][    T1] [<c0e01628>] (mount_block_root) from [<c0e017f8>] (mount_                                                                   root+0xe8/0x154)
[   10.684761][    T1] [<c0e017f8>] (mount_root) from [<c0e019b0>] (prepare_name                                                                   space+0x14c/0x18c)
[   10.693508][    T1] [<c0e019b0>] (prepare_namespace) from [<c0e011c8>] (kerne                                                                   l_init_freeable+0x270/0x2dc)
[   10.703130][    T1] [<c0e011c8>] (kernel_init_freeable) from [<c09dcee0>] (ke                                                                   rnel_init+0x8/0x10c)
[   10.712047][    T1] [<c09dcee0>] (kernel_init) from [<c01010e0>] (ret_from_fo                                                                   rk+0x14/0x34)
[   10.720349][    T1] Exception stack(0xcf88bfb0 to 0xcf88bff8)
[   10.726124][    T1] bfa0:                                     00000000 000000                                                                   00 00000000 00000000
[   10.735038][    T1] bfc0: 00000000 00000000 00000000 00000000 00000000 000000                                                                   00 00000000 00000000
[   10.743948][    T1] bfe0: 00000000 00000000 00000000 00000000 00000013 000000                                                                   00
[   10.751299][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount                                                                    root fs on unknown-block(0,0) ]---
Re: unbrick NSA310 and set up environement
August 15, 2023 05:56AM
Peter,

Your rootfs uImage was set up to boot with the DTB embbeded (Step 4)

Now you are running the new uboot 2017.07, so you also need to adjust your rootfs to boot with separated DTB.

Mount your USB rootfs on another Linux box, and restore the original uImage. Assuming it is mounted at /media/sdb1

Reverse uImage to the original.

cd /media/sdb1/boot
cp -a uImage uImage.with_nsa310_dtb
cp -a uImage.orig uImage
sync

After that, unmount the USB rootfs and bring it back to the NSA310 and boot again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: unbrick NSA310 and set up environement
August 15, 2023 06:51AM
Thanks bodhi,

it is solved kernel panic, but still hangs the boot at 'loading essential drivers' stage...

NSA310> setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
NSA310> boot
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

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            60086272        c418c1ac-01     83

## 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
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 415 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4963680 bytes read in 689 ms (6.9 MiB/s)
loading uInitrd ...
9713936 bytes read in 914 ms (10.1 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310.dtb ...
12568 bytes read in 2614 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1ca000, end 0fb0d8d0 ... OK
   Loading Device Tree to 0f1c3000, end 0f1c9117 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: ZyXEL NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 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)
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000][    T0] Memory: 234776K/262144K available (9216K kernel code, 868K rwdata, 3400K rodata, 1024K init, 301K bss, 27368K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x38c/0x928 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000048][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000793][    T0] Console: colour dummy device 80x30
[    0.000845][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000872][    T0] pid_max: default: 32768 minimum: 301
[    0.001245][    T0] LSM: Security Framework initializing
[    0.001429][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001455][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002306][    T0] *** VALIDATE proc ***
[    0.002570][    T0] *** VALIDATE cgroup1 ***
[    0.002596][    T0] *** VALIDATE cgroup2 ***
[    0.002696][    T0] CPU: Testing write buffer coherency: ok
[    0.004418][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.004736][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.005022][    T1] rcu: Hierarchical SRCU implementation.
[    0.008321][    T1] devtmpfs: initialized
[    0.014426][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014458][    T1] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.014709][    T1] xor: measuring software checksum speed
[    0.110120][    T1]    arm4regs  :  1088.400 MB/sec
[    0.210070][    T1]    8regs     :   654.000 MB/sec
[    0.310071][    T1]    32regs    :   950.800 MB/sec
[    0.310089][    T1] xor: using function: arm4regs (1088.400 MB/sec)
[    0.310110][    T1] prandom: seed boundary self test passed
[    0.314286][    T1] prandom: 100 self tests passed
[    0.314297][    T1] pinctrl core: initialized pinctrl subsystem
[    0.315738][    T1] NET: Registered protocol family 16
[    0.316265][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.317070][    T1] audit: initializing netlink subsys (disabled)
[    0.318319][   T14] audit: type=2000 audit(0.310:1): state=initialized audit_enabled=0 res=1
[    0.318444][    T1] cpuidle: using governor ladder
[    0.318522][    T1] cpuidle: using governor menu
[    0.319079][    T1] Feroceon L2: Enabling L2
[    0.319130][    T1] Feroceon L2: Cache support initialised.
[    0.324855][    T1] No ATAGs?
[    2.560055][    C0] random: fast init done
[    6.251425][   T71] alg: No test for lzo-rle (lzo-rle-generic)
[    6.251784][   T73] alg: No test for lzo-rle (lzo-rle-scomp)
[    6.430649][    T1] raid6: int32x8  gen()   128 MB/s
[    6.600297][    T1] raid6: int32x8  xor()    86 MB/s
[    6.770548][    T1] raid6: int32x4  gen()   130 MB/s
[    6.940227][    T1] raid6: int32x4  xor()    84 MB/s
[    7.110476][    T1] raid6: int32x2  gen()   132 MB/s
[    7.280191][    T1] raid6: int32x2  xor()    94 MB/s
[    7.450400][    T1] raid6: int32x1  gen()   100 MB/s
[    7.620403][    T1] raid6: int32x1  xor()    69 MB/s
[    7.620414][    T1] raid6: using algorithm int32x2 gen() 132 MB/s
[    7.620423][    T1] raid6: .... xor() 94 MB/s, rmw enabled
[    7.620431][    T1] raid6: using intx1 recovery algorithm
[    7.620714][    T1] vgaarb: loaded
[    7.621212][    T1] SCSI subsystem initialized
[    7.621723][    T1] usbcore: registered new interface driver usbfs
[    7.621787][    T1] usbcore: registered new interface driver hub
[    7.621872][    T1] usbcore: registered new device driver usb
[    7.622054][    T1] pps_core: LinuxPPS API ver. 1 registered
[    7.622066][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    7.622093][    T1] PTP clock support registered
[    7.623410][    T1] clocksource: Switched to clocksource orion_clocksource
[    8.654765][    T1] VFS: Disk quotas dquot_6.6.0
[    8.654859][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    8.664642][    T1] NET: Registered protocol family 2
[    8.665485][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    8.665521][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    8.665557][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    8.665588][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    8.665681][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    8.665708][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    8.665936][    T1] NET: Registered protocol family 1
[    8.666585][    T1] RPC: Registered named UNIX socket transport module.
[    8.666599][    T1] RPC: Registered udp transport module.
[    8.666608][    T1] RPC: Registered tcp transport module.
[    8.666617][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    8.666632][    T1] PCI: CLS 0 bytes, default 32
[    8.666878][    T1] Trying to unpack rootfs image as initramfs...
[    9.511412][    T1] Freeing initrd memory: 9488K
[    9.511606][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    9.512854][    T1] Initialise system trusted keyrings
[    9.512910][    T1] Key type blacklist registered
[    9.513142][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    9.513252][    T1] zbud: loaded
[    9.514491][    T1] NFS: Registering the id_resolver key type
[    9.514522][    T1] Key type id_resolver registered
[    9.514532][    T1] Key type id_legacy registered
[    9.514553][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    9.514571][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    9.514860][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    9.515094][    T1] fuse: init (API version 7.31)
[    9.515493][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    9.515681][    T1] orangefs_init: module version upstream loaded
[    9.515694][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[    9.532831][    T1] async_tx: api initialized (async)
[    9.532856][    T1] Key type asymmetric registered
[    9.532866][    T1] Asymmetric key parser 'x509' registered
[    9.532941][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    9.534509][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    9.536502][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    9.536526][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.536542][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    9.536556][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    9.536678][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    9.536720][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    9.538171][    T1] PCI: bus0: Fast back to back transfers disabled
[    9.538199][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    9.538384][    T1] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    9.538427][    T1] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    9.538458][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    9.538482][    T1] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    9.538502][    T1] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    9.538607][    T1] pci 0000:01:00.0: supports D1 D2
[    9.538623][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    9.564694][    T1] PCI: bus1: Fast back to back transfers disabled
[    9.564722][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    9.564931][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    9.564949][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    9.564965][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    9.564987][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    9.565004][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    9.565030][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    9.565053][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    9.565070][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    9.565085][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    9.565102][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    9.565219][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    9.565774][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    9.624266][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.626283][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    9.684231][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    9.686534][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    9.687857][    T1] printk: console [ttyS0] disabled
[    9.687934][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[   10.654780][    T1] printk: console [ttyS0] enabled
[   10.667234][    T1] loop: module loaded
[   10.671674][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   10.680100][    T1] scsi host0: sata_mv
[   10.684585][    T1] scsi host1: sata_mv
[   10.688731][    T1] ata1: SATA max UDMA/133 irq 32
[   10.693607][    T1] ata2: SATA max UDMA/133 irq 32
[   10.699419][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[   10.706622][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[   10.711966][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[   10.720300][    T1] Scanning device for bad blocks
[   10.812638][    T1] Bad eraseblock 911 at 0x0000071e0000
[   10.828781][    T1] 9 cmdlinepart partitions found on MTD device orion_nand
[   10.835800][    T1] Creating 9 MTD partitions on "orion_nand":
[   10.841662][    T1] 0x000000000000-0x000000100000 : "uboot"
[   10.848615][    T1] 0x000000100000-0x000000180000 : "stock_uboot_env"
[   10.856371][    T1] 0x000000180000-0x000000200000 : "key_store"
[   10.863580][    T1] 0x000000200000-0x000000280000 : "info"
[   10.870314][    T1] 0x000000280000-0x000000c80000 : "etc"
[   10.877034][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[   10.884194][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[   10.891353][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[   10.898527][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[   10.906925][    T1] libphy: Fixed MDIO Bus: probed
[   10.912484][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.919807][    T1] ehci-pci: EHCI PCI platform driver
[   10.925087][    T1] ehci-orion: EHCI orion driver
[   10.930020][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   10.936335][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   10.944948][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   10.973437][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   10.980476][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[   10.989528][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.997526][    T1] usb usb1: Product: EHCI Host Controller
[   11.003152][    T1] usb usb1: Manufacturer: Linux 5.2.9-kirkwood-tld-1 ehci_hcd
[   11.010535][    T1] usb usb1: SerialNumber: f1050000.ehci
[   11.016605][    T1] hub 1-0:1.0: USB hub found
[   11.021150][    T1] hub 1-0:1.0: 1 port detected
[   11.026594][    T1] usbcore: registered new interface driver usb-storage
[   11.033788][    T1] mousedev: PS/2 mouse device common for all mice
[   11.040131][  T112] ata1: SATA link down (SStatus 0 SControl F300)
[   11.046967][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   11.052695][    T1] i2c /dev entries driver
[   11.058534][    T1] device-mapper: uevent: version 1.0.3
[   11.064231][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[   11.073972][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   11.081278][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   11.088678][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   11.096138][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   11.102962][    T1] device-mapper: raid: Loading target version 1.14.0
[   11.111686][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[   11.118180][    T1] drop_monitor: Initializing network drop monitor service
[   11.125630][    T1] NET: Registered protocol family 17
[   11.131033][    T1] Key type dns_resolver registered
[   11.137038][    T1] registered taskstats version 1
[   11.141850][    T1] Loading compiled-in X.509 certificates
[   11.147471][    T1] zswap: loaded using pool lzo/zbud
[   11.245212][    T1] Key type big_key registered
[   11.291530][    T1] Key type encrypted registered
[   11.298548][    T1] rtc-mv f1010300.rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
[   11.393442][   T15] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   11.405986][  T114] ata2: SATA link down (SStatus 0 SControl F300)
[   11.425291][    T1] Freeing unused kernel memory: 1024K
[   11.431155][    T1] Checked W+X mappings: passed, no W+X pages found
[   11.437566][    T1] Run /init as init process
Loading, please wait...
Starting version 241
[   11.595351][   T15] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   11.613486][   T15] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   11.621360][   T15] usb 1-1: Product: USB2.0 Hub
[   11.651201][   T15] hub 1-1:1.0: USB hub found
[   11.663983][   T15] hub 1-1:1.0: 4 ports detected
[   11.993529][   T15] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[   12.164726][   T15] usb 1-1.3: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[   12.187419][   T15] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   12.213569][   T15] usb 1-1.3: Product:  SanDisk 3.2Gen1
[   12.218914][   T15] usb 1-1.3: Manufacturer:  USB
[   12.244333][   T15] usb 1-1.3: SerialNumber: 04013ba458c08ba4d7639a87d37e111a59938fdd35f04b1548257e08f60aeb018c3c00000000000000000000ca9a262d00976d18835581079d2d37ea
[   12.296844][   T15] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   12.322576][   T15] scsi host2: usb-storage 1-1.3:1.0
[   12.479932][  T159] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[   12.557820][  T159] libphy: r8169: probed
[   12.562782][  T159] r8169 0000:01:00.0 eth0: RTL8168d/8111d, 00:00:00:00:00:30, XID 283, IRQ 35
[   12.620734][  T159] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[   12.832171][  T159] usbcore: registered new interface driver uas
[   12.935742][  T160] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.

Re: unbrick NSA310 and set up environement
August 15, 2023 11:14AM
Peter,

Quite possible that either:

1. Since you had a few kernel panics and had to turn off power, the rootfs might have file system errors. Try mounting the USB rootfs on another Linux box and check for error. Assuming the USB drive is assigned /dev/sdb,

e2fsck /dev/sdb1

OR

2. The rootfs was not created properly.

Quote

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.

1. Format a new USB drive with a single Ext3 partition, and label it rootfs.

Make sure the above instruction was followed closely.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: unbrick NSA310 and set up environement
September 23, 2023 01:58AM
Hi,
sorry for reply just for a long time, had no time to try fixing.

I have recreated rootfs / USB drive based on your instructions, but this time it has problems with the fdt image itself:

## Flattened Device Tree from Legacy Image at 01c00000
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2023-09-04  12:50:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976184 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
ERROR: uImage is not a fdt - must RESET the board to recover.
Could not find a valid device tree
resetting ...


what did I wrong?

thanks
Re: unbrick NSA310 and set up environement
September 23, 2023 12:44PM
Peter,

1. The rootfs tarball should be extracted as is. There is no change needed to boot with the new u-boot (don't do Step 4).

2. If you did number 1 correctly, then there is something wrong with the u-boot envs. Power up let it boot and post the entire serial console log here.

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