Welcome! Log In Create A New Profile

Advanced

Nsa320 boot from hdd

Posted by sammyE61 
Nsa320 boot from hdd
February 12, 2020 10:47AM
hi,

i would like to boot my nas320 from sata.
formated a drive (3 TB. one partition) in ext3 and labeld "rootfs"..extracted Debian... fw_setenv bootdev=ide...
The nas load uboot 2017.07 and then only orange led blinking...
what else must done for booting sata ??

fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
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
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3956
ethaddr=50:67:f0:a3:1b:54
dtb_file=/boot/dts/kirkwood-nsa320.dtb
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.0.128
serverip=192.168.0.1
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdev=ide



Edited 4 time(s). Last edit at 02/12/2020 12:03PM by sammyE61.
Re: Nsa320 boot from hdd
February 12, 2020 05:57PM
sammyE61,

You actually don't need to set bootdev. The devices should be enough to boot SATA

devices=ide usb

Please post the entire serial bootlog here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Nsa320 boot from hdd
February 12, 2020 07:32PM
Bodhi,

Is it possible that the problem is the gpt partition of my hdd??

Serial bootlog isnt really helpfull because the process stops after the
netconsole echo " server is alive" .
If i use my usb rootfs it runs fine into debian login..
Re: Nsa320 boot from hdd
February 12, 2020 08:49PM
sammyE61 Wrote:
-------------------------------------------------------
> Bodhi,
>
> Is it possible that the problem is the gpt
> partition of my hdd??
>
> Serial bootlog isnt really helpfull because the
> process stops after the
> netconsole echo " server is alive" .
> If i use my usb rootfs it runs fine into debian
> login..

1. Not GPT. The new uboot works with GPT partition.

2. No serial console output. That's because your netconsole is active. So all output are routed to the network, not serial condole.

Either change the serverip (ip address of the box using for console), or temporarily turn it off by clearing the preboot_nc env.

Or if you want to keep the envs intact, open another terminal and start nc to see the output.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Nsa320 boot from hdd
February 13, 2020 01:17AM
so here is what you asked for ;-)

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:46:11 -0700)
ZyXEL NSA320 2-Bay Power Media Server
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 

Reset IDE: Bus 0: ..........OK Bus 1: not available  
  Device 0: Model: TOSHIBA HDWD130  Firm: MX6OACF0 Ser#:  18J9KDNAS
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
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

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

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000800	0x15d509fff	"primary"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
	type:	linux
	guid:	33395f74-ffbd-4047-a24e-4dcc7ec00c86
## 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 **
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: TOSHIBA HDWD130  Firm: MX6OACF0 Ser#:  18J9KDNAS
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 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 **
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 **
loading uImage ...
** File not found /boot/uImage **
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-nsa320.dtb ...
** File not found /boot/dts/kirkwood-nsa320.dtb **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA320> 

Re: Nsa320 boot from hdd
February 13, 2020 02:12AM
sammyE61,

** File not found /boot/uImage **

OK. It looks like the file system is not good on this disk for whatever reason. Did you "sync" the disk after extracting the rootfs tarball? and was it Ext3 partition?

Power up, interrupt serial console or netconsole and see if you can list the folders

ide reset
ide part

wait for a few seconds and

ext2ls ide 0:1 /
ext2ls ide 0:1 /boot

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



Edited 2 time(s). Last edit at 02/13/2020 02:16AM by bodhi.
Re: Nsa320 boot from hdd
February 13, 2020 09:21AM
bodhi,

thanks again..filesystem was corrupted...
works great now.
Re: Nsa320 boot from hdd
February 13, 2020 03:10PM
sammyE61 Wrote:
-------------------------------------------------------
> bodhi,
>
> thanks again..filesystem was corrupted...
> works great now.

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner
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: