Alternative Firmware (Debian Jessie, Synology DSM6)



Yes I’ve read that. I tried different Computers and different Browsers



would it be possible to install and boot Debian from USB flash disk?
So both rotational HDDs will be only for data - so they might sleep most of the time and start only when needed.
I have WD My Cloud EX2 Ultra.



The discussion here is quite long, and for newcomer (like me) it’s quite hard to follow all the information and recognize what is relevant and what is already obsoleted. The same apply to another forum on But my impression is, that it should work, but I’ll have to dive more deeply to this topic…

So I’ll try to learn and understand as much as possible, but of course any hint will be still highly appreciated!

PS: Using customized SATA cable to connect to the UART port works like a charm!

  1. Use search in forum
  2. Use search in Google/bing/etc…
  3. Use search on my website.


That is exactly what I’m talking about… there are lots of information and it is very difficult to sort them and pick up the relevant.

I’ve tried to follow the steps from your how to and replaced /dev/vda by /dev/vdc (the USB Flash disk). Then the boot log looks slightly strange - because firstly it says mdadm: /dev/md/1 has been started with 1 drive. and in the next step # /dev/md1 not exist!.
Could it even work this way? Or did I pick it from the totally wrong site?

Bridge firewalling registered
ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata2.00: ATA-9: WDC WD20EFRX-68EUZN0, 82.00A82, max UDMA/133
ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata1.00: ATA-9: WDC WD20EFRX-68EUZN0, 82.00A82, max UDMA/133
ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EFRX-68E 0A82 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
sd 0:0:0:0: [sda] 4096-byte physical blocks
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
scsi 1:0:0:0: Direct-Access     ATA      WDC WD20EFRX-68E 0A82 PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
sd 1:0:0:0: [sdb] 4096-byte physical blocks
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] Attached SCSI removable disk
sd 1:0:0:0: [sdb] Attached SCSI removable disk
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
Loading compiled-in X.509 certificates
input: gpio-keys as /devices/platform/gpio-keys/input/input0
usb 2-1: new high-speed USB device number 2 using xhci-hcd
hctosys: unable to open rtc device (rtc0)
Freeing unused kernel memory: 1024K
# Loading, please wait...
# Mounting filesystems...
# Check disk and init
### Press any key to stop and run shell... (2)usb 2-1: New USB device found, idVendor=0951, idProduct=1608
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: DataTraveler 2.0
usb 2-1: Manufacturer: Kingston
usb 2-1: SerialNumber: 20080125000000000000055E
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi host2: usb-storage 2-1:1.0
scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdc] 3930112 512-byte logical blocks: (2.01 GB/1.87 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] No Caching mode page found
sd 2:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1 sdc2
sd 2:0:0:0: [sdc] Attached SCSI removable disk
md: md1 stopped.
md1: detected capacity change from 0 to 1498415104
mdadm: /dev/md/1 has been started with 1 drive.
md: md0 stopped.
md0: detected capacity change from 0 to 509607936
mdadm: /dev/md/0 has been started with 1 drive.
# /dev/md1 not exist!
# Runing a shell...
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Setting IP address on eth0
Sending discover...
Sending discover...
mvneta f1034000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
No lease, failing
/ #
/ # ls /dev/md*
/dev/md0  /dev/md1

0  1

And one other question related to networking. As it is visible in the logs, it send DHCP request for IPv4 address - I also see the request in my DHCP server log together with offered address:

2018-03-29T15:00:35+02:00 info dnsmasq-dhcp[7974]: DHCPDISCOVER(eth0) be:c2:11:d8:33:4b 
2018-03-29T15:00:35+02:00 info dnsmasq-dhcp[7974]: DHCPOFFER(eth0) be:c2:11:d8:33:4b 

But the NAS didn’t get the address, and only IPv6 is configured. It happened every time I’ve boot from the USB recovery flash disk. Once I’ve installed Debian (on the rotational disks, before I’ve started to discover the possibilities to put it on flash disk), DHCP works correctly. It is not really big issue, as I have the console access, but I’m quite curious where might be the problem.


First of all, thanks for all your work!
I have succesfully installed DSM 6.0.2-8451 in MyCloud GEN2 (GLACIER) (even with 1tb disk, changing mbr to gpt with gdisk)

My question (or petition) is that I have been looking for a manual or tutorial for create a .pat with the last version of DSM (6.1.6-15266 for example) but I didn’t see nothing in this thread (not even in the “Clean OS (Debian), OpenMediaVault and other “firmwares”” thread from --> My Cloud - Personal Cloud Storage > My Cloud subforum). Nothing in the Drive Folder and nothing in your website :sweat_smile:

Is there any chance to get a how-to ? :angel:

Edit: I ask for a tutorial / how-to instead an already made .pat so all we can make our .pat files without disturbing @Fox_exe


@Syos, Some info here: (Look into dsm-patcreate.tar.xz)
Same file present in other folders (For each device).
You can try to replace only rootfs archive.

If you make working .pat - share it for all people on this forum :smiley:


Hi Syos,

I have the same problem with gpt.
I installed a 2TB disk and synology installs a mbr…

What I did till now:
sgdisk -g /dev/sdb

root@ubuntu:/home/todde# gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Still red flash and no boot…

Could you tell me the correct doing to convert to gpt?




Looked into /WDMyCloud/WDMyC’loud-Gen2/DSM/Dev , dsm-patcreate didn’t found :sweat_smile:
For WDMyCloud GEN 2 (GLACIER) … From
DSM_DS115_15266.pat <- I guess is this one ?

[ DS115 Marvell Armada 375 88F6720 <—> Glacier WD MyCloud (Gen2) Marvell Armada 375 ]

Once I have the DS115 and the dsm-patcreate…
I guess I have to unpack the .pat into patroot folder…

From notes.txt in /WDMyCloud/WDMyCloud-Mirror/SynologyDSM/dev

Calculate checksyms:

synochecksum hda1.tgz indexdb.tgz rd.bin synohdpack_img.tgz uboot_DS414.bin updater VERSION zImage > checksum.syno

Unpack rd.bin (cut u-boot header, 64 bytes):

dd if=rd.bin of=rd.lzma bs=64 skip=1
lzma -d rd.lzma
mkdir tmp
mount -o loop rd tmp

I’m going to need some help in this process :thinking:


I connected the hard-drive to a computer with Ubuntu.
With gparted, in drive properties I saw it was as MBR… check it for your drive…

Maybe your drive has a previous GPT table, but the info you want is stored as MBR…
so now you have to reconvert it from MBR with gdisk
Hope this link helps you:

I think that in your case should be:
first command : r recovery and transformation options (experts only)
and then: f load MBR and build fresh GPT from it
w write changes

And in gparted check again…



I now did a reinstall
I booted from usb-stick and installed DSM-wdmc-gen2-8451.pat via web installer
Then it initiated a reboot --> red blinking

I connected the hdd via usb to a vm
Now parted told me:
Partition table: msdos

When I tried your solution all partitons are gone

Recovery/transformation command (? for help): f
Warning! This will destroy the currently defined partitions! Proceed? (Y/N):

gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present

Found invalid GPT and valid MBR; converting MBR to GPT format
typing ‘q’ if you don’t want to convert your MBR partitions
to GPT format!

I entered “w”

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdb.

gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Booted from WD MyCloud --> Still no success… I gave up


connected to my WD-DSM via ssh:

(parted) print list
print list
Model: WDC WD10EFRX-68PJCN0 (scsi)
Disk /dev/hda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name              Flags
 1      1049kB  2551MB  2550MB  ext4            Linux filesystem
 2      2551MB  4699MB  2147MB  linux-swap(v1)  Linux swap
 3      4832MB  1000GB  995GB   ext4            Linux filesystem

Check your partition table, seems like gdisk isn’t working well for you… I used Ubuntu Desktop 17.10 as live usb… and I connected my hard drive via usb (when loaded on boot, ubuntu mounted my swap… blocking me…)


very strange…mine looks like yours:

(parted) p
Modell: NORELSYS 106X (scsi)
Festplatte /dev/sdb: 2000GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: gpt

Nummer Anfang Ende Größe Dateisystem Name Flags
1 1049kB 2551MB 2550MB ext4 Linux filesystem
2 2551MB 4699MB 2147MB linux-swap(v1) Linux swap
3 4832MB 2000GB 1996GB ext4 Linux filesystem

I used lubuntu 17.10 in a vm
maybe, I´ll try in a desktop or with a bigger disk


I installed now a 3TB disk.
Worked out of the box :grinning:
Thanks & Br


Glad to know you have it working now…
But a bit sad because we didn’t solve the problem with your 2tb disk

Now I hope fox_exe could help me in how to create a pat file from scratch :blush:


Well, now I have perhaps a simple question. I own a WDMC EX2 Ultra and wanted to install a clean Debian OS. So I tried to upload the firmware but the webgui always gives me an error. So, what can I do to install a clean Debian OS anyway? Deleting the partitiontable, deleting nand with

dd if=/dev/zero of=/dev/mtdblock1

or using a USB stick…?


Ok I got Debian 4.14.4 stretch running on my WDMC EX2 but the docker-ce installations fails. Following kernel modules are missing?

  • CONFIG_IP_NF_NAT: missing

How do I get them?


@Q-Fireball, Download kernel sources and recompile kernel.
Also you can use Official kernel from (Just add .dts file for your device).
Detailed instruction:

  • Note: You can build kernel on WDMC itself. Just remove all “cross_compile” variables.


Hi B0mB3r. You can restore Mycloud mirror g2 with the files from Fox website. The difference between g2 mycloud and g2 mycloud mirror is that you have to keep pushing the reset button forever. Try 1min, 90secs, 2min. You should be able to get up the recovery web and then you can load the original firmware. Just put these 2 files on a USB drive:

I did this myself after I wanted to go back after installing DSM (earlier version with no built-in way to restore to original firmware). I don’t think even Fox himself is aware of this possibility, but it does work.


Hey guys

I can succesfully install the debian OS on the WD mydrive, but every time I update/upgrade to stretch I can no longer get it to either boot or connect to it through the network. Any ideas?