Welcome! Log In Create A New Profile

Advanced

Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's

Posted by heiko 
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
October 01, 2017 12:50PM
heiko,

I forgot about this problem :) will look in to this when I have some free time to plug in a 2nd HDD.

For now, if you have only 1 HDD plugged in the 1 slot, would it work without serial consolse connected?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
October 09, 2017 12:59PM
hallo bodhi,

thanks for your answer I will test it.

heiko
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
October 14, 2017 02:15PM
hello bodhi,

after test with one hd the one with rootfs on, I can say everything works good.
Reboots are working without any problem.
With both hdd's I have the boot problem.

heiko



Edited 1 time(s). Last edit at 10/15/2017 11:44AM by heiko.
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 11, 2017 03:29AM
heiko,

I've verified that both HDD works fine, with and without serial console attached.

Perhaps we should take a look at your problem a little bit closer.

Make sure no USB drive is plugged in. Boot into Debian with 1 HDD with rootfs on it, like you did before. After login, plug in the 2nd HDD, and mount it..

Assuming your rootfs is sda1, and the 2nd HDD is sdb1. And the 2nd HDD is mounted at /media/sdb1.

Execute these commands and then please post the entire serial console log here (from u-boot banner until the last output):

dmesg
mount
fw_printenv
e2label /dev/sda1
e2label /dev/sdb1
ls -lart /media/sdb1
ls -lart /media/sdb1/boot

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 12, 2017 08:11AM
hello bodhi,

I found one problem.
I think the 2hdd has something with hdd2 was not i.O i have a defect sometimes it is OK and sometimes not.

First step for me is I need one or tow new hdd's

Then I can test again and tell you the results.

Have you a suggestion for a cheep good hdd with 1 or 2 tb for the 24/7.

heiko
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 12, 2017 03:30PM
heiko,

> Have you a suggestion for a cheep good hdd with 1
> or 2 tb for the 24/7.

In the old days, my cheap and good HDD is Hitachi. But the company have been acquired, so I don't know how good they still are nowadays. The brand that people like for 24/7 is WD Caviar Red, you should research that.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 19, 2017 02:42AM
hello bodhi,

I have found a new SSHD, I format it in ext3 and label it rootfs.
After the system works with this hdd I rename the old rootfs hdd to data and bring it also in the box.
When I power up the box, the system boot fine.

Every time I power off and on the box it boot's without problems.
But every time i will reboot from ssh with the command reboot or shutdown -r now the system will not boot into debian.
It stops while booting.

I think my Problem is to boot the system over a ssh connection.

I'm don't know why.

heiko
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 19, 2017 03:20AM
heiko,

> I have found a new SSHD, I format it in ext3 and
> label it rootfs.

This is the 1st disk that has rootfs on it.

> After the system works with this hdd I rename the
> old rootfs hdd to data and bring it also in the
> box.

So this is the 2nd disk now labeled "data".

> When I power up the box, the system boot fine.
> Every time I power off and on the box it boot's
> without problems.

OK.

> But every time i will reboot from ssh with the
> command reboot or shutdown -r now the system will
> not boot into debian.
> It stops while booting.
>
> I think my Problem is to boot the system over a
> ssh connection.

Not because of booting over SSH. It is because of the timing of the SSD and HDD being enumerated.

Try this

- Cold start with these 2 SSD/HDDs plug in. We expect the box to boot into Debian.
- Run kwboot on another terminal before reboot.

./kwboot -t -B 115200 /dev/ttyUSB0 -d

- When it starts u-boot, Interrupt serial console and
printenv
boot

And if it stops booting, please copy and paste the entire serial console log here.

I would like to see the HDDs being enumerated as device 0 or 1. This is most likely the problem. After you rebooted, the 2 HDD device numbers might be different. But the cold start always enumerate the drives in a certain order.

This booting problem is very common for multiple drives configuration. In the Kirkwood u-boot I have a scandisk logic in the envs to scan and detect the drive partitions correctly. I have not got around to implement this logic for the NAS326 stock u-boot yet.

I will need to do this at some point to make it more robust and eliminate this multiple partition booting problem. I boot my NAS326 with a USB rootfs, and use the HDD for data only so have forgot to post this solution!

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



Edited 2 time(s). Last edit at 11/19/2017 04:03AM by bodhi.
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 19, 2017 04:52AM
heiko,

I will post this solution tomorrow. But I still like to see your log for the test above to see the HDD devices enumeration.

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



Edited 1 time(s). Last edit at 11/19/2017 04:53AM by bodhi.
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 19, 2017 05:04AM
Hello bodhi,

I try to give you the logs in the evening.

heiko
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 21, 2017 12:45PM
hello bodhi

I was not able to do test exactly as you describe it.

After reboot system hangs with the started kwboot
I see in kwboot the repeated message

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01-svn48023 (Oct 13 2015 - 09:25:56) Marvell version: 2014_T3.0p6


But when I boot with ./kwboot -t -B 115200 /dev/ttyUSB0 -d and use the commands
printenv
boot
the system hangs.

So I hope it helps.


pi@raspberrypi:~/Downloads $ sudo ./kwboot -t -B 115200 /dev/ttyUSB1 -d
Sending debug message. Please reboot the target...-
[Type Ctrl-\ + c to quit]
M - 1.73
Booting from NAND flash

General initialization - Version: 1.0.0
Detected Device ID 6810
High speed PHY - Version: 2.0

Init RD NAS topology board SerDes lanes topology details:
 | Lane #  | Speed |  Type       |
 --------------------------------
 |   0    |  06   |  SATA0	|
 |   1    |  05   |  USB3 HOST0	|
 |   2    |  06   |  SATA1	|
 |   5    |  05   |  USB3 HOST1	|
 --------------------------------
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.26.0
mvSysEnvGetTopologyUpdateInfo: TWSI Read failed
DDR3 Training Sequence - Switching XBAR Window to FastPath Window 
DDR3 Training Sequence - Ended Successfully
Not detected suspend to RAM indication
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01-svn48023 (Oct 13 2015 - 09:25:56) Marvell version: 2014_T3.0p6

Board: RD-NAS-88F6820-DDR3
SoC:   MV88F6810 Rev A0
       running 1 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1332 [MHz]
       L2     @ 666 [MHz]
       TClock @ 250 [MHz]
       DDR    @ 666 [MHz]
       DDR 32 Bit Width, FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  512 MiB

Map:   Code:			0x1fed0000:0x1ff95d60
       BSS:			0x1ffef2b4
       Stack:			0x1f9cff20
       Heap:			0x1f9d0000:0x1fed0000
       U-Boot Environment:	0x00200000:0x00280000 (NAND)

NAND:  256 MiB
MMC:   mv_sdh: 0
*** Booting kernel from kernel 1 @0x00000000; run bootcmd_custom;  ***
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode
Board configuration detected:
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x01     |
egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> printenv
CASset=max
CONTRY_TYPE=FF
FEATURE_BIT=00
MALLOC_len=5
MODEL_ID=B303
MPmode=SMP
PRODUCT_NAME=STG-328
VENDOR_NAME=MitraStar Technology Corp.
autoload=no
baudrate=115200
boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=armada-nand:2m(u-boot),2m(env),2m(config),15m(kernel1),110m(rootfs1),15m(kernel2),-(rootfs2) earlyprintk=serial
bootargs_dflt=$console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel
bootargs_end=:10.4.50.254:255.255.255.0:Armada38x:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=nand read 0x2000000 0x00000000; run bootcmd_custom;  0xF00000 && bootz 0x2000000
bootcmd_auto=stage_boot $boot_order
bootcmd_custom=if run bootcmd_exec; then; else if run bootcmd_stock_1; then; else run bootcmd_stock_2; reset; fi; fi
bootcmd_custom_sata=if run sata_bootcmd; then; else if run bootcmd_stock_1; then; else run bootcmd_stock_2; reset; fi; fi
bootcmd_exec=run scan_disk; echo Booting from $bootdev $device ...; setenv fdt_skip_update yes; if run load_image; then if run load_dtb; then if run load_initrd; then run set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr; fi; fi; fi
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot
bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000;
bootcmd_stock_1=run set_bootargs_stock; echo Booting from NAND kernel 1 ...; nand read 0x2000000 0x00E00000 0xF00000 && bootz 0x2000000
bootcmd_stock_2=run set_bootargs_stock; echo Booting from NAND kernel 2 ...; nand read 0x2000000 0x08700000 0xF00000 && bootz 0x2000000
bootdelay=3
cacheShare=no
change_boot_part=1
console=console=ttyS0,115200
core_checksum_1=e9b3248e8c69ec9ef52a8698d0835aae
core_checksum_2=2773b03df8b32c243f8b84dcefa79efb
curr_bootfrom=1
device_partition=0:1
devices=usb scsi
disaMvPnp=no
disks=0 1 2 3
dtb_file=/boot/dts/armada-380-zyxel-nas326.dtb
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:43:38:32:25
eth1mtu=1500
eth2addr=00:50:43:38:a6:25
eth2mtu=1500
eth3addr=00:50:43:32:a6:38
eth3mtu=1500
ethact=egiga0
ethaddr=58:8B:F3:DB:DD:3E
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_skip_update=yes
fdtaddr=0x1000000
fdtfile=armada-38x-modular.dtb
filesize=0x6e8f80
fwversion_1=V5.21(AAZF.0)
fwversion_2=V5.21(AAZF.1)
ide_path=/
image_name=uImage
img_checksum_1=db4be927b09d7ea9a1284d2e6f330db5
img_checksum_2=5356a1c083dfd6bc8c74bfd231aa15a6
initrd_name=uInitrd
ipaddr=10.4.50.170
kernel_addr=${kernel_addr_1}
kernel_addr_1=0x00000000; run bootcmd_custom; 
kernel_addr_2=0x08700000
kernel_addr_r=2080000
kernel_mtd_1=3
kernel_mtd_2=5
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1000000
load_image=echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/zImage
load_image_addr=0x02000000
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2900000
loadaddr=0x02000000
loads_echo=0
modelid_1=B303
modelid_2=B303
mtdids=nand0=armada-nand
mtdparts=mtdparts=armada-nand:2m(u-boot),2m(env),2m(config),15m(kernel1),110m(rootfs1),15m(kernel2),-(rootfs2)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:25:a6:38
nandEcc=nfcConfig=4bitecc
netbsd_en=no
netmask=255.255.255.0
netretry=no
next_bootfrom=1
pcieTune=no
pexMode=RC
pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm
pxefile_addr_r=3100000
ramdisk_addr_r=2880000
revision_1=50967
revision_2=50984
romfile_checksum_1=4EE9
romfile_checksum_2=A762
rootpath=/srv/nfs/
sata_bootcmd=echo Booting from SATA ...; setenv fdt_skip_update yes; run sata_init; ext2load scsi 0:1 $load_image_addr /boot/zImage; ext2load scsi 0:1 $load_dtb_addr /boot/dts/armada-380-zyxel-nas326.dtb; ext2load scsi 0:1 $load_initrd_addr /boot/uInitrd; run sata_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr
sata_delay_reset=0
sata_dma_mode=yes
sata_init=mw.l f1018100 20420000; mw.l f1018140 003ca800; sleep 3; scsi init
sata_set_bootargs=setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "run usb_init";  setenv scan_scsi "run sata_init"; 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 ext2load $dev $disknum:1 $load_image_addr /boot/zImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
script_addr_r=3000000
script_name=boot.scr
scsidevs=0
serial_number=S150Y46042395
serverip=10.4.50.38
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial
set_bootargs_stock=setenv bootargs "console=ttyS0,115200 ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs1 rw rootdelay=2"
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
sysimg_mtd_1=4
sysimg_mtd_2=6
usb0Mode=host
usbActive=0
usbType=2
usb_bootcmd=echo Booting from USB ...; setenv fdt_skip_update yes; run usb_init; ext2load usb 0:1 $load_image_addr /boot/zImage; ext2load usb 0:1 $load_dtb_addr /boot/dts/armada-380-zyxel-nas326.dtb; ext2load usb 0:1 $load_initrd_addr /boot/uInitrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr
usb_init=mw.l f1018100 20420000; mw.l f1018140 003E8800; sleep 3; usb start
usb_set_bootargs=setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81
zld_checksum_1=b44f1fe16e53092068270b337dee223c
zld_checksum_2=102d2dc16f397df0dddc4f1ad6380e52

Environment size: 7101/524284 bytes
Marvell>> boot

NAND read: device 0 whole chip
Attempt to read outside the flash area
 0 bytes read: ERROR
running scan_disk ...
Scan device usb
(Re)start USB...
USB0:   Port (usbActive) : 0	Interface (usbType = 2) : USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
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 scsi
AHCI init for unit0
Target spinup took 0 ms.
Target spinup took 0 ms.

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

heiko
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 21, 2017 03:19PM
heiko,

I've done some testing with my 2.5" HDDs, will let you know what I think later.

Can you still boot with the HDD rootfs? just plug that one in the 1st slot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 21, 2017 05:22PM
heiko,

See this post:

https://forum.doozan.com/read.php?2,32146,42779#msg-42779

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 22, 2017 11:57AM
hello bodhi,

booting with both hdd's is every time OK when i power off / on the box.
For me it is OK for the moment when I need to reboot the box I power it off and on.

heiko
Re: Problem booting Debian-4.9.0-mvebu-tld-12 with 2 hdd's
November 22, 2017 03:27PM
heiko,

> booting with both hdd's is every time OK when i
> power off / on the box.
> For me it is OK for the moment when I need to
> reboot the box I power it off and on.

That's great! use that work around for now.

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

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 10 plus 12?
Message: