Intalling Open Media Vault (alpha state) (finished, there is an easier method now, i keep the post for research data))

Hello, so i manage to install debian and Open Media Vault on the MCHD. Right now it works but have some problems because i reuse the system of the MCH, this are the problems that right now i found:

-power off button don´t work.

  • boot takes a lot of time because of some scripts that try to mount MCH partitions(i need to delete those scripts).
  • I have less than 40 mb of space on the usr partition, because of the original partition layout of the 4 GB eMMC of the MCHD.

Beware that i’m not an expert, i´m not a programmer or a developer, so be careful, you can convert your device into a brick. BEFORE you do any of my steps, make a full backup of your emmc, if you don’t know how to do it, i recommend to stop right now and wait for a simpler and safer method of installation.

What I did step by step (I put a link to the required files at the end):

-First I compiled a new bootloader from the source deactivating the firmware checksum
-You need to connect the device to UART and powered off, open boot_recovery.exe from kylin_bootcode_recovery_tool_v1.4.

  • “lk option” must be unchecked, select “RTD1296_hwsetting_BOOT_2DDR3_4Gb_s1600_DDRSS.config” as the HW setting file and “wd_pelican.uboot32.fb.dvrboot.exe.bin” as dvrboot.bin file, press write button (with device always off)
  • Now you can power on the device, the process is automatic, and on the end you must receive an ok message. THIS CHANGE YOUR BOOTLOADER!!!
    -Now you can boot into recovery with the usb files that i post, in recovery you need to write the new kernel (compiled with PARANOID_ANDROID option deactivated), new rootfs (modified to pass the root to debian), and format the required partitions and untar the files of the new operating system (this files are from forth32 debian installer for the MCH). I wrote the kernel and rootfs on the first addres that i think it was located (by the boot log from UART) and also on the recovery address, i already have done it because I was trying different methods, but maybe you just need to write it to the load address, and don´t need to write to recovery. CHECK THE MEMORY ADDRESSES with your boot log, on the section that says “LOAD NORMAL FW TABLE”, I don´t know if always are the same between firmware versions.

Commands to copy:
kernel: busybox dd if=Image of=/dev/mmcblk0 seek=50331648 bs=1 conv=notrunc
kernel recovery: busybox dd if=Image of=/dev/mmcblk0 seek=80674816 bs=1 conv=notrunc
Rootfs: busybox dd if=rootfs.bin of=/dev/mmcblk0 seek=35651584 bs=1 conv=notrunc
Rootfs recovery: busybox dd if=rootfs.bin of=/dev/mmcblk0 seek=97452032 bs=1 conv=notrunc

Formating filesystem:
make_ext4fs -L debian /dev/mmcblk0p2
make_ext4fs -L var /dev/mmcblk0p5
make_ext4fs -L usr /dev/mmcblk0p6

create new folder or reuse the existing ones on the /mnt/ folder to mount the 3 partitions, and untar with this command “tar zxf” every file on their corresponding partition:

  • 20-root.tar.gz on mmcblk0p2
    -21-var.tar.gz on mmcblk0p5
  • 22-usr.tar.gz on mmcblk0p6

Done, unmount the partitions, and restart your device, after a few minutos you can access to OpenMediaVault (admin/admin) and connect via ssh (root/root).

I think that maybe writing a full raw eMMC image you can achieve the same result, but I don’t know, because i think that the mac address and serial number are stored on a different chip, and no directly on the eMMC, but i don´t share a image until someone who knows more about this can confirm that.

In the next days i´m gonna mess with the partitions, to see if stils boots making mmcblk0p2 one big partition, to have more space for updates and plugins. Sorry for my english, and if anyone that understand about this more that i do want to create an script, or improve the OS, please do it. This device with open media vault is a snappy compact nas.

Files: 581.17 MB folder on MEGA

3 Likes

I close this thread, forth32 on the 4pda forum make an usb installer, easier and safer than this method, he never share how to edit the fwtable, and i don’t think he is gonna (for what i think is something super easy for anyone that understand about programming, and I don’t understand any). @Fox_exe if it not much to ask, please update your mirrors with forth32 files, thanks to your mirrors I believe it was possibly to change the OS and convert that abomination that WD made into an useful NAS, and i was not wrong, my NAS is working in perfect conditions for a week without interruption with OMV5, using jellyfin and qbittorrent in docker containers. And now with forth32 installer is easier for anyone that want to have an useful NAS.

Here we go: https://fox-exe.ru/WDMyCloud/WDMyCloud-Home-Duo/OpenMediaVault/

2 Likes

Hello Fox_exe
,
I tried to install but bricked my MCHD.

restore-emmc.sh → error → backup files not working.

Замена раздела #5 (KERNEL ): /mnt/backup/kernel05.orig, размер 12051968 (0x00b7e600) байт, контрольная сумма = 4a7cca7b Индекс 12 выходит за пределы таблицы (11)

Could you upload working backup files (rootfs08, rootfs09, kernel12, kernel05, bootConfig)

to

https://fox-exe.ru/WDMyCloud/WDMyCloud-Home-Duo/OpenMediaVault/

Sorry, not mine. Try to ask author (Original post / Russian): WD My Live\Book\Cloud\Cloud Mirror - 4PDA

Hello,

I did have the same issue as Fox_Mail.
For some reasons the rescue partitions were missing

/ # fwtutil -l


 **** Firmware list ****

 ## ro lzma  version   tg_addr    offset   length   paddings checksum  type
--------------------------------------------------------------------------------

 00  1   0  00000000  03000000  00a70000  00c49000  00c49000 4c6454be  31 - GOLD_KERNEL
 01  1   0  00000000  01f00000  00630000  0000ef5a  0000f000 001ee0de  32 - GOLD_RESCUE_DT
 02  1   0  00000000  02200000  01a70000  00c00000  00c00000 4003784f  33 - GOLD_RESCUE_ROOTFS
 03  1   0  00000000  01b00000  00670000  00317c30  00317e00 0dd71a22  34 - GOLD_AUDIO
 04  1   0  00000000  00000000  069f0000  00000000  00000000 00000000  37 - UBOOT
 05  1   0  00000000  03000000  02bb0000  00c49000  00c49000 4c6454be  02 - KERNEL
 06  1   0  00000000  01f00000  048b0000  0000ef02  0000f000 001ed4cc  03 - RESCUE_DT
 07  1   0  00000000  01f00000  02770000  0000f312  0000f400 001fcdb7  04 - KERNEL_DT
 08  1   0  00000000  02200000  05cf0000  00c00000  00c00000 33ed4ab7  05 - RESCUE_ROOTFS
 09  1   0  00000000  02200000  03bb0000  00400000  00400000 14183172  06 - KERNEL_ROOTFS
 10  1   0  00000000  01b00000  027b0000  00317c30  00317e00 0dd71a22  07 - AUDIO

I edited install-omv.sh and removed the reference to the missing ones.

mkdir /mnt/backup
fwtutil -x 5:/mnt/backup/kernel05.orig -x 8:/mnt/backup/rootfs08.orig -x 9:/mnt/backup/rootfs09.orig
cp /config/bootConfig /mnt/backup

echo --- ............ ................ EMMC  -------
fwtutil -r 5:/mnt/emmc.uImage  -r 8:/mnt/rootfs-debian.bin -r 9:/mnt/rootfs-debian.bin
cp /mnt/bootConfig /config

Instead of

mkdir /mnt/backup
fwtutil -x 5:/mnt/backup/kernel05.orig -x 12:/mnt/backup/kernel12.orig -x 8:/mnt/backup/rootfs08.orig -x 9:/mnt/backup/rootfs09.orig
cp /config/bootConfig /mnt/backup

echo --- ............ ................ EMMC  -------
fwtutil -r 5:/mnt/emmc.uImage -r 12:/mnt/emmc.uImage -r 8:/mnt/rootfs-debian.bin -r 9:/mnt/rootfs-debian.bin
cp /mnt/bootConfig /config

I could complete the install and boot up my DUO this way under OMV.

The restore-emmc.sh also have this missing reference, so removing it should bring back WD OS.