Welcome! Log In Create A New Profile

Advanced

Boot from hdd on Stora

Posted by obrador 
Boot from hdd on Stora
October 14, 2021 01:46PM
Hi all. I am really stuck. Following the guide: HowTo: Stora - Debian Stretch and OMV4 I've been able to boot debian from USB stick. Everything fine. After a few minutes playing with my new debian, apt installs, etc, the USB started to show bad sector errors, well, it crashed.

I thought that I could do the same with usb but install rootfs to HDD and try to boot from there (keeping stock uboot), so I formatted the hdd just how it's done in the guide (2 partitions: 8Gb ext3 and 256Mb swap) copied rootfs to /dev/sda1 and I have changed the bootcmd this way:

bootcmd_ide=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x1100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=/dev/sda1 rootdelay=10; run bootcmd_ide; bootm 0x800000 0x1100000; reset

just replacing the bootcmd_usb from the guide to bootcmd_ide

Now the console shows this error:

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
[0 1 0]: Enable DMA mode
  Device 1 @ 0 1:
Model: WDC WD20EFRX-68EUZN0                     Firm: 82.00A82 Ser#:      WD-WCC4M6KXY9HR
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

Do I miss something?
Re: Boot from hdd on Stora
October 14, 2021 03:38PM
obrador,

Quote

bootcmd_ide=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x1100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=/dev/sda1 rootdelay=10; run bootcmd_ide; bootm 0x800000 0x1100000; reset

With stock u-boot, should be

bootcmd_ide=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=/dev/sda1 rootdelay=10; run bootcmd_ide; bootm 0x800000 0x2100000; reset

Power up, interrupt serial console, enter the envs like you did. And

printenv


And boot. If it is not booting, then post the entire serial boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot from hdd on Stora
October 14, 2021 05:41PM
Hi bodhi, thanks. I've made this changes but the problem still persists:

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: RD-88F6281A LE

U-Boot 1.1.4 (Sep  4 2009 - 09:36:11) Marvell version: 3.4.14

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE60

Soc: 88F6281 A0 (DDR2)
CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 333Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size  64MB
DRAM CS[1] base 0x04000000   size  64MB
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
CRC in Flash: 8a6588d8, Calculated CRC: 8a6588d8

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0, egiga1 [PRIME]
Hit any key to stop autoboot:  1

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 1 0]: Enable DMA mode
  Device 1 @ 0 1:
Model: WDC WD20EFRX-68EUZN0                     Firm: 82.00A82 Ser#:      WD-WCC4M6KXY9HR
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

And this is the printenv output:

image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=00:50:43:00:02:02
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loidaddr=0x02000000
autoload=no
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
mainlineLiNux=no
fw_up=disable
ethaddr=00:26:F2:7E:74:6A
loadaddr=0x02000000
arcNumber=2743
ipaddr=192.168.10.80
serverip=192.168.10.10
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x1100000 /boot/uInitrd
console=console=ttyS0,115200 mtdparts=orion_nand:0x100000@0(uboot),0xff00000@0x100000(root)
bootcmd_ide=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
bootcmd=setenv bootargs $(console) root=/dev/sda1 rootdelay=10; run bootcmd_ide; bootm 0x800000 0x2100000; reset
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=no
ethact=egiga1

I assume that stora with one only disk must be /dev/sda. I also tried with partition label to rootfs, but the error in that case was that it could't find partition with label rootfs, so I devided to hardcode the partiton to boot.

Does it matter where the bay I plug the disk?

Thanks in advance.
Re: Boot from hdd on Stora
October 14, 2021 05:47PM
I've just tried to change the disk from one bay to the other and it has passed last point, it went a bit forward:

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode
  Device 0 @ 0 0:
Model: WDC WD20EFRX-68EUZN0                     Firm: 82.00A82 Ser#:      WD-WCC4M6KXY9HR
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)


5435888 bytes read

9671091 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes =  5.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes =  9.2 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000ab7, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
Re: Boot from hdd on Stora
October 14, 2021 06:02PM
Hi! I re-created the root filesystem from the last tar.bz and it worked! thanks a lot. Maybe I'l come later with more questions ;)
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: