I am the proud owner of a Synology DS1512+. She’s getting old but she’s still one of my more sensible purchases. The hardware quality and ease-of-use of the Synology Disk Manager (DSM) still pleases me every day.
I need my NAS to be operational. I use it for all my important stuff but I also have the “urge” to develop my own tools for it. I need a platform to develop software on, without the risk of losing any of my data.
Recently I found XPEnology. Is it a Synology DSM clone? No. It IS the original Synology DSM, without alterations. You just need something to boot it with; a bootloader. Is it legal???? I’m not sure. And when in doubt, go for safe; consider it illegal.
In retrospect, setting-up a XPEnology NAS is surprisingly easy. But for most tutorials you need a Windows computer (windows-only software is used). But on a Mac, you don’t need (most of this) 3rd party software. You have a Mac! A Mac comes with tools, but what tool to use and how?
[Edit: Aug, 05 2017: added info on updating and links to external blogs]
Before we begin, please note; Using XPEnology might be illegal in your country (it most likely is!) and I will not be held responsible for any legal action taken against you. All this posts will tell you is how great a NAS in general and a Synology NAS in particular is, and how to write a disk-image to a USB drive. I could have given the exact same tutorial for writing a DVD-image of Ubuntu to a flash-drive.
Using the Synology DSM software on non-Synology hardware is illegal.
From another blog, loosely translated from french, with my “Papa fume une pipe” knowledge of the language;
Synology: “You need to know that using XPEnology is illegal and in violation of the intellectual property of Synology and infringes its copyright. It is not allowed to install DSM on another server and this may lead to legal action.”
Personally; storing my personal data on a hacked NAS? … shivers down my spine. Also note, XPEnology and Synology are not in sync, update-wise; there is always a delay. The XPEnology-community needs to fix the bootloader for every new version.
Final note: Let us remember that the first (and most) victims of the Synolocker Ransomware attack last June were XPEnology users.
[ source: https://www.cachem.fr/xpenology-mot-fin/ ]
A quoted quote, poorly translated, but still; it most likely is illegal.
Is it safe? Yes … No … Maybe …
The entire functioning of your XPEnogoly NAS is in all aspects IDENTICAL to a real Synology NAS, which also means; the disks are interchangeable. You can start on a XPEnogoloy NAS to get used to it and then in a guilt infused fit, purchase a Synology NAS, migrate the disks and continue with your day job. (I haven’t tested it, but it should boot and run without realising the hardware has changed *1). Other way around, you can start with a Synology NAS and in the unlikely event your machine fails, run your disks on temporary hardware with XPEnology while your NAS is in repair.
Now, both these situations are hypothetical, but fuelled by the fact that when I went and set-up my XPEnology NAS on an HP DataVault X510, it asked me to migrate my data. (*1 ->) It detected the data on the old NAS disks I re-used. I was thrilled :) I halted the process, formatted the disks, and restarted the process. This time I could do a “first time install”.
Now the most important part of this story is; WHY.
WHY did I choose to build a NAS, using technically inferior parts, second-hand harddisks, hack-y software (Jun’s Bootloader) and WHY am I posting about it? Well the last question is easily answered; because I can. And because I need to store the steps I used to create the bootloader USB-drive.
The answer to WHY XPEnology?
I need a place to develop software without the risk of ruining my personal data. Simple as that. Reusing old hardware is a money-saving choice. I don’t have the spare cache to get a second NAS unit “just for the fun of it”. Alternatively, I could use a Virtual machine (In fact, I did, I created a 7-disk NAS with 24 GB of storage, in VMWare Fusion. Why? Because I can. It’s fun!). Second reason for an experimental NAS is proof-of-concept; I need something to convince some people that buying a Synology NAS is a GOOD business investment. Don’t buy a computer with loads of disks, buy a NAS. It has everything a (small/medium) business needs and Synology DSM can do so much more. But this is not the post for promoting the features of DSM and the power of the packages.
Or is it?!
Apart from basic file-storage; your NAS can be a Mail server. Or a Subversion/Git repository. It serves very well for Photo/Video storage. You can make it your DHCP server, VPN-server, etc. etc. etc. If a computer can do it, most likely a Synology NAS can do it too.
Why choose a NAS in general?
Imagine the situation of a small start-up enterprise, about 10 years ago, with say 2 computers; You need a place to store company data, so you get an external disk drive. As your business grows, you need more people, more computers, more data to store, and increased need for backups. So you get another computer that acts as a server, you put your files on a shared drive. Now your data grows, and your company grows. You upgrade some disks, add more disks. 10 years later you need to store company data for about 200 active clients, store backups of your computers, store backups of your work and your webservers. A growing development-team brought you into a position where you have your own version-control-repository (Subversion or GitLab) and host development versions of your clients websites. This all requires data. Let’s give that a number; 2TB, spread over 4 1TB disks (keep things organised and have room to expand). If one of those disks fail, you loose the data, so you keep a backup of your data; now you need 8TB of storage-space, spread over 8 disks. 8 1TB disks for 4TB effective data-space. These copies don’t make themselves, so you need software for that and maintain that software.
If one disk fails; no problem, you have a backup. If two disks fail at the same time, and both are copies of the same data, you are royally f****d.
In comes a NAS: With the same 8 1TB disks (considering an 8-disk unit) with your drives in RAID-6, you have a data-spread of 6 data versus 2 parity, giving you 6TB of available storage space (that’s 50% more!). You don’t need extra software; the NAS handles it all. If one disk fails? replace it, as you normally would, but you don’t need to spend time rebuilding the original data. the NAS does that for you. And what if 2 disks fail? Well, your RAID will run degraded, but will still run! No data loss. Again; replace the disk, tell the NAS to rebuild. Done. Grab a coffee.
More data stored, less time wasted. Money? a good server computer costs more than the average Synology NAS. And you save money because of less maintenance. Win-win! A recent study at my workplace showed that a NAS will have itself paid for in 2 years because of time saved during disaster recovery alone.
If this doesn’t convince you to buy a NAS, just Google ‘7 reasons to use a NAS’. Hours of reading, telling you the same thing.
So…, XPEnology, …, the Synology-clone-but-not-clone…, on with the technical stuff.
What did I need to do to get XPEnology running? (took met 9 tries, but I really need to lay the blame with the hardware; Crappy network cable and harddisk with nothing but bad sectors).
- Get a recent copy of JunLoader (GitHub). Windows users; follow the guide Jun (?) provides. I tested it, it works, but the Mac instructions are “soon to follow”. (My reason for my posting here. :) )
- Download the Synology software from Synology.com, make sure to select the DS3615xs, and download the PAT file for the latest supported version. Supported by Jun, that is)
- Download the Synology Assistant as well, you’ll need it to find the NAS and kickstart the installation.
- Grab a flash drive. It will be completely overwritten, so grab one that is empty, or holds no important data. 256 MB (yes, MEGA bytes) is enough, but since it’s needed for every reboot, it should be in good condition. A very small thumb drive is a practical choice (but new ones start at 16 GB, wasting 15.8 GB of storage space).
- Plug it in your Mac and open Terminal to find the device number.
#/dev/disk0 (internal, physical):
# #: TYPE NAME SIZE IDENTIFIER
# 0: GUID_partition_scheme *512.1 GB disk0
# 1: EFI EFI 209.7 MB disk0s1
# 2: Apple_CoreStorage Macintosh SSD 511.3 GB disk0s2
# 3: Apple_Boot Recovery HD 650.0 MB disk0s3
#/dev/disk1 (internal, virtual):
# #: TYPE NAME SIZE IDENTIFIER
# 0: Apple_HFS Macintosh SSD +510.9 GB disk1
# Logical Volume on disk0s2
#/dev/disk2 (external, physical):
# #: TYPE NAME SIZE IDENTIFIER
# 0: GUID_partition_scheme *16.0 GB disk2
# 1: EFI NO NAME 15.7 MB disk2s1
# 2: Linux Filesystem 31.5 MB disk2s2
# 3: Bios Boot Partition 4.2 MB disk2s3
- to clarify; in my case the target device is /dev/disk2, and for better performance, use the “raw” device /dev/rdisk2.
FAIR WARNING: choosing the wrong device will lead to data-loss, possibly leaving your mac in a non-recoverable state. Make 5000% sure you get the correct identifier.
- Issue the following command to write the contents of the image (JunLoader) to the USB driveShell command
dd if=/path/to/synoboot.img of=/dev/rdisk2 bs=1m
- The next step in Jun’s tutorial is to edit the contents of the USB drive. Well. You can’t; Not on a Mac, not on Windows. The filesystem will not mount. Not even with special loaders (like macFuse). Don’t bother. Gather all the data you need. If you have a Synology NAS, plug the USB drive in there, and use the Text-Editor package to edit the grub.cnf file. You can also use a Linux computer or Linux boot-cd in your Windows/Mac computer, whatever floats your boat.
If you don’t have any option left, build the XPEnology NAS, edit the file, reboot and start over.
- To get the Vendor and Product ID of the USB drive, you can use ‘System Information’ (alt+click on ‘About this Mac’ in the Apple menu)
- To get the Mac address of your new machine, try the DHCP list in your router :)
- When done correctly, the machine will boot from the USB drive in about 5 seconds. Some NAS-units, like an HP DataVault X510, only has 1 (one) bootable USB slot and it’s usually the bottom one. You might need to look that up!
- Wait till the machine is booted and use the Synology Assistant to detect it.
- When detected, double click it, a webpage will open and allow you to (manually) install the downloaded PAT file.
- Let the installer do it’s thing, it takes a while :)
Really, you want a recap?
- Buy a Synology NAS. Just do it. Listen to your technically-minded employee, and buy one. Everybody will be happy.
- If you need a hobby machine to develop for your in-operation Synology NAS, grab a computer with 4 or more SATA drives, and build a XPEnology unit.
- If you want/need to be on the legal side; don’t use XPEnology; get a second Synology NAS.
How’s that for a recap.
[Edit: Aug, 05 2017]
Today I updated DSM to a new bug fix release (6.1.2 to 6.1.3). It broke the installation. Another reason to BUY ORIGINAL :)
- Hook USB to real Synology NAS to backup grub config file
- Download latest Jun’s loader (1.02b) and put on USB
- Hook USB to real Synology NAS to edit grub config file
- Boot the x510
But HAHA! The x510 won’t LET you boot! Because
- disk 1 is present, so it won’t boot from USB
- cannot set boot sequence to USB only because x510 has no way of altering the BIOS settings
- A VGA header for the x510 is not enough, you need the VGA+PS/2 header cable, a PS/2 keyboard an maybe an extra jumper and maybe you need to alter the VGA+PS/2 header connector to short pins 3+4.
With good timing:
- Pull disk 1
- power on
- wait till the LAN led goes off and on again
- wait till the system status led goes from off/blue blink state to white/red blink state (normal for non-windows software on the x510) and at that specific time;
- Push disk 1
This way, no disk is present, so the system boots from USB, and Synology DSM is not yet ready for a RAID consistency check and the disk will be present at that time.
I also found a blog-post on creating the boot loader USB on Ubuntu which presents a way to mount and edit the ISO before ‘burning’ it to USB. In time I will attempt to get the same tools working on macOS.
Remon signing off, Happy coding!