/WDMyCloudEx2-reloaded

Steps to update your Linux Kernel for WD My Cloud Ex2

Primary LanguageShellApache License 2.0Apache-2.0

WD MyCloud Ex2 (WD MyCloud-Mirror) and EX2 Ultra with Linux stable on Debian stable

TODO

  • Explain: Why is it good to free the NAS
  • Explain: What is the kernel, what other names exist
  • Explain: What is the device tree and why do we need it
  • Explain: What is the Ramdisk, what other names exist
  • Explain: What is U-Boot and how does the ARM architecture work for that

Improvements

  • Automatically spin down the HDDs
  • Fix the leds (bring them their original behavior, mine is just blinking in blue)
  • Make the ramdisk more robust as it currently contains gparted --script code...
  • Fix the clock?
  • Other fixes

Steps to update your Linux Kernel for WD MyCloud Ex2

This Guide will explain you how to install Linux stable and Debian stable on your WD MyCloud Ex2. This procedure was tested with WD MyCloud Ex2, but it should work also for MyCloud Ex2 Ultra and the basic concepts of it can be applied to any WD Nas device.

This repository contains the image file for kernel v5.18.5 (as it is linux-stable at the time of writing).

This guide works without flashing U-Boot.

It allows for several ways to integrate the kernel:

  • Use the kernel (uImage) from /dev/mtdblock1 and the initrd/rootfs (uRamdisk) from /dev/mtdblock2 like WD has set their boxes up
  • Boot the kernel from /dev/sda
  • Boot the kernel from the usb drive
  • Boot the kernel via TFTP

The procedure is articulated in these steps:

  1. Serial Console: Get access to the serial log on your device (note: this will break the warranty, noting that the the Ex2 is officially no more supported by WD. It can also easily brick your device if you are not careful.)
  2. Kernel: This repository contains the Linux stable (v5.18.5) built for the WD MyCloud Ex2 ready-to-go. If you have a different hardware you need to build it yourself (e.g. for Wd MyCloud Ex2 Ultra).
  3. Ramdisk: build/change the initrd/rootfs (uRamdisk) if needed
  4. U-Boot: Test and install the kernel (and optionally the Ramdisk) into U-Boot
  5. OS: Install debian stable
  6. Applications: Install userspace tools

Features

  • USB or SATA drive
  • ext2,3,4, btrfs
  • raid 0,1 and LVM
  • ssh-rescue shell

References to other public projects

Credits: