Welcome! Log In Create A New Profile

Advanced

How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition

Posted by i5Js 
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
July 17, 2024 09:27PM
Anderson,

> Marvell>> scsi reset
>
>
>
> Reset SCSI
>
> AHCI init for unit0
>
> Target spinup took 0 ms.
>
> SATA link 1 timeout.
>
>
>
> Error: SCSI Controller(s) 1B4B:9215 1B4B:9235 not
> found
> scanning bus for devices...
>
> Device 0: (0:0) Vendor: ATA Prod.: WDC
> WD5000LPCX-2 Rev: 02.0
> Type: Hard Disk
>
> Capacity: 476940.0 MB = 465.7 GB
> (976773168 x 512)
> Found 1 device(s).
> [/code]

Cool!

> in this HD is the same rootfs of USB... how make
> u-boot boot then?
>

Not the USB.

Now you know u-boot can access the HDD at boot time. You can put the rootfs on that HDD. The procedure is the same for USB or HDD.

If you have not done this.

-Boot into Debian with USB rootfs. Format the HDD with an Ext3 partition (use about 100 GB for future growth). And repeat the rootfs installation to that Ext3 partition (being root, label it as rootfs, extract the rootfs tarball ....) like you did for the USB rootfs.

- Shutdown and remove the USB rootfs.

Power up with serial console connected, interrupt u-boot at cound down, and

setenv set_bootargs_debian 'setenv bootargs console=ttyS0,115200 root=/dev/sdb1 $mtdparts earlyprintk=serial init=/bin/system'
setenv load_debian_uimage 'ext2load scsi 0:1 0x00800000 /boot/uImage'
setenv load_debian_uinitrd 'ext2load scsi 0:1 0x02100000 /boot/uInitrd'
setenv boot_debian_sata 'scsi reset; run load_debian_uimage; run load_debian_uinitrd; bootm 0x00800000 0x02100000'
setenv bootcmd 'run set_bootargs_debian; run boot_debian_sata'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
July 18, 2024 01:43AM
I have a working Debian installation via a USB stick, would it be possible to move the /boot to onboard flash NAND?

================
WD EX2 Ultra - ext3 usb kernel/rootfs, 6.6.2-mvebu/Debian/OMV, realtek-r8152 2.5GbE
Uboot - u-boot-a38x-RangerPeak_2014T3_PQ-nand_1G
Kernel Patch - mvneta.patch, linux-6.6.2-mvebu-tld-1
Hi guys,

After following your instructions, I was able to make U-Boot load `uImage` and `uInitrd` from the HDD, on the `/dev/sda1/` partition formatted in ext3 (ext4 doesn't work).

But I remembered the reason for not being able to use HDDs larger than 2TB: they are in 'GPT' and not 'MBR'...

Thus, U-Boot does not read disks in GPT, so now it is necessary to perform some procedure to transfer `uImage` and `uInitrd` to the NAND (I believe the recommendation to avoid this and use USB is due to writing to NAND being more cumbersome when it is necessary to run an 'update-initramfs').

Is that correct?

So how would it be possible to make U-Boot recognize GPT disks?
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
July 18, 2024 12:14PM
> After following your instructions, I was able to
> make U-Boot load `uImage` and `uInitrd` from the
> HDD, on the `/dev/sda1/` partition formatted in
> ext3 (ext4 doesn't work).
>
> But I remembered the reason for not being able to
> use HDDs larger than 2TB: they are in 'GPT' and
> not 'MBR'...
>
> Thus, U-Boot does not read disks in GPT,

Do you have the log where you tried GPT disk at u-boot console?

> so now it
> is necessary to perform some procedure to transfer
> `uImage` and `uInitrd` to the NAND (I believe
> the recommendation to avoid this and use USB is
> due to writing to NAND being more cumbersome when
> it is necessary to run an
> 'update-initramfs').

>
> Is that correct?

Yes. Kernel on flash is an old recipe (for embedded systems, such as routers). For NAS boxes, the rootfs should have everything on it and stored on disk drive (HDD, SDD, or USB). That is better because you will update your system frequently.

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

Hit any key to stop autoboot:  0 
Marvell>> scsi reset

Reset SCSI
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

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

its freeze....

to compare, when is connected a HD MBR o result is:

Marvell>> scsi reset

Reset SCSI
AHCI init for unit0
Target spinup took 0 ms.
SATA link 1 timeout.

Error: SCSI Controller(s) 1B4B:9215 1B4B:9235 not found
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: WDC WD5000LPCX-2 Rev: 02.0
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Found 1 device(s).
this reconized ocurred in the 1 second...

until loading ENV corrects all works...however dont use hdd > 2tb.....
after more 4 toolchains, multiples compiles... i give up...


mais facil o inferno congelar do que adicionar disco gpt ao u-boot.

another maybe i will try again....

https://github.com/vzhilov/WDMC-Ex2-Ultra/tree/master/1.UBoot
this steps almost well done... but dont work....

saddly
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
July 25, 2024 03:52PM
Anderson,

I've been running 4 NAS boxes with USB rootfs (Sandisk brand) for more than 10 years now. A couple years ago, I had to replace one of the internal HDDs, but the USB rootfs are still the same drives.

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

I think it is really best to use rootfs on the USB. On my 'EX2 Ultra', I used it like this for a long time with 2 HDDs (8TB+8TB) in RAID0, but I lost one of the HDDs without any prior warning... I still seek to understand what actually happened... I will try again with 2 HDDs (2TB + 2TB), but just to see how the 'NAS' will behave...

One more time thanks.
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
July 25, 2024 08:44PM
Anderson,

> I think it is really best to use rootfs on
> the USB.

That's what I said. The kernel is already installed in the USB rootfs. You would load the uImage and uInitrd from the rootfs /boot. And you would update it regularly when I release a new one. And you woud update to the latest Debian. So it is secured if you use it facing the internet.

> On my 'EX2 Ultra', I used it like this
> for a long time with 2 HDDs (8TB+8TB) in RAID0,
> but I lost one of the HDDs without any prior
> warning... I still seek to understand what
> actually happened... I will try again with 2 HDDs
> (2TB + 2TB), but just to see how the 'NAS' will
> behave...

Sure. Also my experience too. Ironically, one of the Seagate HDDs crapped out and I had to throw it to trash. But the USB rootfs keep on running fine after 10 years. I think the precaution that I posted in the Wiki works well.

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



Edited 1 time(s). Last edit at 07/25/2024 09:50PM by bodhi.
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
August 28, 2024 11:41PM
I have a working WD MyCloud EX2 Ultra, Debian installation, with OMV6, USB rootfs.

I am seeing that the WD MyCloud EX2 Ultra unit resets whenever there is sustained high load (NFS data transfer).

I assumed it might be due to faulty power supply, changed it few times, issue still persists. Could this be due to watchdog?

Any tips on troubleshooting this further? I has serial access on the device

================
WD EX2 Ultra - ext3 usb kernel/rootfs, 6.6.2-mvebu/Debian/OMV, realtek-r8152 2.5GbE
Uboot - u-boot-a38x-RangerPeak_2014T3_PQ-nand_1G
Kernel Patch - mvneta.patch, linux-6.6.2-mvebu-tld-1
Hi Guys,

can someone please upload the files from step two or explain how i can get the files? I cannot download the files anymore.

Thanks in advance, Flo
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
November 20, 2024 01:35PM
Sorry to be disconnected. I could start (and rewrite the how to) if it’s needed.

How can I help?
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
November 20, 2024 01:55PM
FB Wrote:
-------------------------------------------------------
> Hi Guys,
>
> can someone please upload the files from step two
> or explain how i can get the files? I cannot
> download the files anymore.
>
> Thanks in advance, Flo

You can download from the following link

https://fox-exe.ru/WDMyCloud/WDMyCloud-Mirror-Gen2/Original/
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
November 20, 2024 03:10PM
i5Js,

> Sorry to be disconnected. I could start (and
> rewrite the how to) if it’s needed.
>
> How can I help?

Welcome back!

The installation steps looks really good, but I think need to be revised with a bit more info in several steps to make sure people don't brick their boxes.

I have annotated some of your first posts. I have not gone through all the steps, the last one I stopped was annotated in red and blue with my name at the beginning.

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

i'am stuck here:

## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-6.6.2-mvebu-tld-1
Created: 2024-11-22 11:09:28 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5179520 Bytes = 4.9 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02100000 ...
Image Name: Ramdisk
Created: 2020-11-18 0:05:29 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 2217027 Bytes = 2.1 MiB
Load Address: 00e00000
Entry Point: 00e00000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...


Error: invalid dtb and unrecognized/unsupported machine ID
r1=0x00000210, 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 MMP2 (Device Tree Support)
ffffffff Marvell MMP3
ffffffff Marvell Armada 39x (Device Tree)
ffffffff Marvell Armada 380/385 (Device Tree)
ffffffff Marvell Armada 375 (Device Tree)
ffffffff Marvell Armada 370/XP (Device Tree)
ffffffff Marvell Dove

Please check your kernel config and/or bootloader.


I know the Ramdisk is wrong, but i dont know how to change it. When i do this "ext2load usb 0:1 0x02100000 boot/uRamdisk" it does not find a file.

Then i copied the Ramdisk.bin manually in the boot folder and it did ext2load usb 0:1 0x02100000 boot/uRamdisk.bin
But then i got stuck there. Can someone give me a Hint?

Flo
Re: How to install Debian in a WD MyCloud EX2 Ultra: Definitive edition
November 22, 2024 01:39PM
Flo,

Looks like you missed step 3 in the rootfs creation.

https://forum.doozan.com/read.php?2,32146

Quote

3. Create uImage with DTB appended. I am using the Zyxel NAS326 as an example here. Please replace armada-380-zyxel-nas326.dtb below with the appropriate DTB name for your box.

cd /media/sdb1/boot
cp -a uImage uImage.orig
cp -a zImage-6.6.2-mvebu-tld-1 zImage.fdt
cat dts/armada-380-zyxel-nas326.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-6.6.2-mvebu-tld-1 -d zImage.fdt uImage

Your box DTB name is: armada-385-wd-ex2-ultra.dtb.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
So i did the USB again and now i'am here:

Marvell>> ext2load usb 0:0 0x00800000 boot/uImage
5199172 bytes read in 657 ms (7.5 MiB/s)
Marvell>> ext2load usb 0:0 0x02100000 boot/uRamdisk
** File not found boot/uRamdisk **
Marvell>> bootm 0x00800000 0x02100000
## Booting image at 00800000 ...
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-6.6.2-mvebu-tld-1
Created: 2024-11-25 8:08:11 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5199108 Bytes = 5 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
### Ramdisk error, Loading Rescure Firmware from NAND Flash ###

NAND read: device 0 offset 0xc800800, size 0xf00000
15728640 bytes read: OK
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
Image Name: Linux-382
Created: 2015-08-02 3:54:03 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4093292 Bytes = 3.9 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00e00000 ...
Image Name: Ramdisk
Created: 2015-10-05 5:02:44 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 7010744 Bytes = 6.7 MiB
Load Address: 00e00000
Entry Point: 00e00000
Verifying Checksum ... OK
Loading Kernel Image ... OK

I think it would boot with the right ramdisk in the /boot folder? How can i make this file?

Thanks, Flo
Nevermind, i figured it out and booted into Debian :)

Thank you for the Hints.

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