Welcome! Log In Create A New Profile

Advanced

WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV

Posted by gisab 
Dear Community,

I installed latest Debian Bullseye with OMV on my WD My Cloud Ex2 device.

I compiled kernel v5.10.109 and tested working fine.

I prepared a guide with the steps to update your Linux Kernel for WD My Cloud Ex2

The guide explain you how to update your WD MyCloud Ex2 Device to be able to install any modern OS.
I tested this procedure with WD MyCloud Ex2, but can be adapted also for MyCloud Ex2 Ultra and (whith some abstraction guideline) to any WD Nas device.

The repository contain the image file for kernel v5.10.109.

There is no need to flash the native UBoot; you can load the new kernel on demand or by default keeping the original fw as it is, for safety and rollback procedure.

Guide and repository is on https://github.com/gisab/WDMC-Ex2
The procedure works with armada-370 and armada-385 chip.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
April 12, 2022 10:16AM
Nice!
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
April 12, 2022 04:29PM
Thanks gisab!

But I don't see where is the OMV part mentioned at your GitHub?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 24, 2022 03:29PM
Hi Gisab,

I have a question about the guide you have written to install Debian on a WD EX2 Ultra. I am stuck at the uboot section, the 'ice reset' command does not show SATA devices. I have attached a SSD to the board but the device cannot be found. Any clues on this?
BootROM - 1.73
Booting from NAND flash

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

Load WD GrandTeton Serdes Config:
board SerDes lanes topology details:
 | Lane #  | Speed |  Type       |
 --------------------------------
 |   0    |  06   |  SATA0      |
 |   1    |  05   |  PCIe0      |
 |   2    |  06   |  SATA1      |
 |   3    |  05   |  USB3 HOST1 |
 |   4    |  05   |  USB3 HOST0 |
 |   5    |  00   |  SGMII2     |
 --------------------------------
PCIe, Idx 0: detected no link
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
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01-g7c1da33-dirty_v1.04 (Jul 17 2017 - 18:43:06) Marvell version: 2014_T3.0p6

mvBoardIdIndexGet(boardId) = 1
Board: GrandTeton DB6820
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1332 [MHz]
       L2     @ 666 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 666 [MHz]
       DDR 32 Bit Width, FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  512 MiB

Map:   Code:                    0x1fece000:0x1ff96010
       BSS:                     0x1ffef654
       Stack:                   0x1f9cdf20
       Heap:                    0x1f9ce000:0x1fece000
raise: Signal # 8 caught
raise: Signal # 8 caught
       U-Boot Environment:      0x00000000:0x00080000 (NAND)

NAND:  ID: daad ,256 MiB
MMC:   mv_sdh: 0
PCI-e 0: Detected No Link.
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode
Board configuration detected:
Creating 1 MTD partitions on "nand0":
0x00000f500000-0x00000ff00000 : "mtd=7"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=7"
UBI: MTD device size:            10 MiB                       
UBI: number of good PEBs:        80                        
UBI: number of bad PEBs:         0                            
UBI: max. allowed volumes:       128                          
UBI: wear-leveling threshold:    4096                         
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             32
UBI: total number of reserved PEBs: 48
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 4/1
UBIFS: mounted UBI device 0, volume 0, name "reserve2"
UBIFS: mounted read-only
UBIFS: file system size:   4063232 bytes (3968 KiB, 3 MiB, 32 LEBs)
UBIFS: journal size:       1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  200807 bytes (196 KiB)
Loading file '/mac_addr' to addr 0x02000000 with size 18 (0x00000012)...
Done
Set lan 2 WakeOnLan ok
Enable HD1
Enable HD2
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |   In-Band    |
| egiga1 |   RGMII   |   In-Band    |
| egiga2 |   SGMII   |     0x00     |
egiga0, egiga1, egiga2 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> ide reset

Reset IDE: 
Marvell Serial ATA Adapter
no device found 

Marvell>> ide reset

no IDE devices available



Edited 1 time(s). Last edit at 06/24/2022 03:34PM by Storm.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 24, 2022 03:38PM
Hi Storm,

Try

scsi reset

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 25, 2022 05:55AM
No success either, it hangs after the 'scanning bus for devices' message. I will try the USB route for now.
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...

Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 25, 2022 03:00PM
> No success either, it hangs after the 'scanning
> bus for devices' message.


So the scsi reset command is the correct one to use. But similarly to other WD MyCloud boxes, the SATA ports are not powered up. In other WD boxes and few others that use similar Marvell u-boots, the mw command must be used to poke the GPIO.

> I will try the USB route
> for now.

Yes, USB needs to work first anyway, so you'll have a rescue system.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 28, 2022 01:38PM
Short update. I managed to get it working by changing the partition table on the SSD from GPT to MBR. A similar issue is described in this post. Instructions to do the conversion with gdisk can be found here. Using the expert options i zapped the GPT table, only MBR remaining => SSD can be found in u-boot after 'scsi reset'.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 28, 2022 05:58PM
Storm Wrote:
-------------------------------------------------------
> Short update. I managed to get it working by
> changing the partition table on the SSD from GPT
> to MBR. A similar issue is described in this
> post.
> Instructions to do the conversion with gdisk can
> be found
> here.
> Using the expert options i zapped the GPT table,
> only MBR remaining => SSD can be found in u-boot
> after 'scsi reset'.

Cool!

I wonder if the 3.5" HDD works. If you have one, you might want to try in u-boot to see if it is powered up OK.

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



Edited 1 time(s). Last edit at 06/28/2022 06:00PM by bodhi.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 29, 2022 02:51AM
I checked with a 3.5” WD Blue. It is found during ‘scsi reset’. Files are shown by ext2ls.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 29, 2022 03:51PM
Okay, it only works if the HDD has a MBR partition table, not with GPT. I added a 4TB WD Blue with GPT partition table and the scsi reset commands hangs when trying to find the WD Blue. I am digging through the Marvell github to see if there are updates to GPT, ext2/4 or AHCI that can be patched to the u-boot code distributed by WD. No luck so far.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
June 29, 2022 04:14PM
Storm Wrote:
-------------------------------------------------------
> Okay, it only works if the HDD has a MBR partition
> table, not with GPT. I added a 4TB WD Blue with
> GPT partition table and the scsi reset commands
> hangs when trying to find the WD Blue. I am
> digging through the Marvell github to see if there
> are updates to GPT, ext2/4 or AHCI that can be
> patched to the u-boot code distributed by WD. No
> luck so far.

OK, thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
July 01, 2022 12:11AM
Added Storm's finding to the kernel credits so others can find it easier.

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

Quote

- Thanks vzhilov, dtd.2512, CyberPK, mcmg2 for the works in testing to finalize the DTS for the WD MyCloud Ex2 Ultra. And Storm for the finding about MBR vs GPT for the WD MyCloud Ex2 here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
July 05, 2022 02:49PM
You're welcome :-)
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: