Jump to content
RESET Forums (homeservershow.com)

repurposed DX4000 with OPNSense


Recommended Posts

So, it has been a very long time since I've been able to contribute to this community...  but I creep in every so often ;)


Some may know of this NAS that Western Digital offered back in 2012 called the DX4000.. flavors included storage up to 16TB and it ran Windows Server 2008 R2.  I made a few articles on my blog, showing how to convert it to use Windows Server 2012 R2 back then, and it had been running like a champ ever since, last month.  I decided to re-purpose it as a firewall, and began searching for alternatives to pfSense...  I naturally gravitated to OPNsense, and experimented with getting it to run on the metal.

It may seem strange to want to do this with a device built to be a storage server, but I've outgrow the storage... and it actually had decent adapters on-board (2x Intel 82574L), the form factor was small, and included redundant power supply capabilities.

To make it possible, there had been some advancements by the community on how to access the BIOS on the machine, found here on YT posted by Martin Meise.  A BIG "Thank You" to that guy for showing how to mod the PCB to include a serial converter.  I picked up a USB to TTL serial cable from Adafruit.com, soldered some extension wires to the PCB on the DX4000 (which currently stick out the side).. and had instant terminal bliss.  I can plug/un-plug the adapter when needed this way, just a note...  the RS on board will plug into the TX on the adapter, as does the TX onboard to the RS on the cable.. anyway.  works great.  (just a note, the PCB has what seemed like a polyurethane coating on the pads, and I had to dissolve/scrape it off to get the solder onto them)

The only setting on the BIOS that needed to be changed was to switch the controller from RAID mode to AHCI.. which allows you to use independent storage without the needed RAID setup.

I picked up one of those ICY DOCK 2.5" to 3.5" converters a while ago to use for this, and an in-expense Kingston 120GB SSD on Amazon for 20$USD.  It was a tight fit, but works great.

The difficult part in this setup was to get FreeBSD installed on this thing...  I tried dozens of times using the OPNSense ISO and serial versions to get it going, and gave up after while defeated.  I also tried other FW flavors like pfSense, and Sophos.. all failed to use the serial terminal to complete installations.  I gave IPFire a shot and actually got it working accidently after modifying the serial console to use TTYS1 instead of TTYS0.. and a light in my head got turned on...  it had that I.D.10.T message.


I went back and built a USB with OPNsense serial version image on it.. fired up a FreeBSD VM on my windows workstation.  note, the USB must be 'offline' in windows to use as an attached disk in hyper-v... just take it offline in disk manager, and add the usb as an iscsi disk in the vm settings.



* startup FreeBSD in the VM, logon as root and mount the device.  For me this ended up being device /DEV/DA1A   (mount /dev/da1a /mnt/usb )

* cd to /mnt/usb/boot , you can copy the loader.conf file to loader.conf.local or just VI a new file called "loader.conf.local"  (it is important to have a local file so your changes are not auto-overwritten)

* include the following into loader.conf.local:


** it is important to note that after installation is complete, you may NEED to do this again and add a loader.conf.local file to the system to access the things via ttyS1


I was now able to use my usb to serial cable connected to my workstation to open PuTTy (mod the BIOS) and step through a serial installation of OPNsense...  it was defaulting to use ttyS0, instead of ttyS1 which is what is needed for this machine.


The only things I have NOT been able to manage getting to work are the fan speed controls, and my BackUps powersupply over USB for monitoring power.. other than those, this little thing has been solid.


So far, I've been able to get the LCD working great using LCDd... i get all the goodies i need being displayed... and I apologize that I have no pictures of my lovely PCB soldering nor of the LCD working.  I'll try to get some in the coming days, and post a new blog on my blugged.wordpress.com site.. but i've been super busy with a new software engineering position these past 9 months, and just don't get much free personal time anymore.




I hope someone has enjoyed this quick write-up!




Link to comment
Share on other sites

I certainly did. Great detective work! does the bios allow you to change the serial port's configuration?

Reminds me of the time I used a gen7 microserver as a router and had to use a USB hub for the firewall distribution to let me type into it during setup.

  • Thanks 1
Link to comment
Share on other sites

Hi nrf,  There are some serial port settings available in the BIOS.. believe i recall mainly switching between VT100, VT100+, ANSI and a few others... but I don't recall any specifics.  I can certainly run a USB cable over there and take a peak though ;)

Link to comment
Share on other sites

On 4/28/2019 at 4:48 PM, nrf said:

just wondered if you could re-order or re-assign instead of what you went thru.


I don't believe so, seems to be locked on that serial port #... if i find later that's not the case i'll report back though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • phillai
      By phillai
      I was about to buy 4 x 8TB WD Red's (for my HP MicroServer Gen 8) when my friend asked me to double check if my HP Smart Array P222 Controller can actually support this...
      Does anyone know the answer for me please?
    • Joe_Miner
      By Joe_Miner
      $169.99 WD VR 10k WD1000DHTZ - Newegg ShellShocker Limited Deal
      Nice 1TB drive with Stats like: Performance Tests WD1000DHTZ VelociRaptor
    • diehard
      By diehard
      Looks like Western Digital's DX 4000 supports only 3 models of hard drives.

    • diehard
      By diehard
      My backup to the Western Digital DX4000 failed. Since this is a headless server, it's nice to see that the LCD shows the warning. It hasn't cleared off the LCD, which is good, because you always have that message staring you in the face to fix it.
      Hopefully it will when the backup is fixed.
    • diehard
      By diehard
      Hi Guys,
      I'll be updating this post as things change.
      As a Microsoft Windows Home Server MVP, a few months back, I found out from my Microsoft Team Leader that Western Digital would soon be releasing the DX4000 Small Office Storage Server. And that I should contact Western Digital to see if I can get a unit for review. I did. Thanks Western Digital.
      The DX4000 comes with the Windows Storage Server 2008 R2 Essentials software. I'll write a few post on this in the future, so look for that. I'll also tweet when I do and discuss it on future podcasts.
      So, on the the nitty gritty of why I'm writing this post.
      Let me start by saying that if you know me, I like to bang on my server until something breaks, and then figure out how to fix it. This also helps the community just in case you unfortunately find yourself with the same issue.
      So this post is not to say how Western Digital's product is flawed in some way.
      OK, so while putting the screws to this box, I successfully managed to kill it to a point where I was getting a "STORAGE BAD" error on the LCD display. Not fun at all. Repeated reboots didn't resolve this. Things were looking grim. So as the type of guy I am, break first, then read the instructions to find a fix, I turn to the User Manual, http://www.wdc.com/w...4779-705064.pdf
      Ok, so after refering to the pdf and getting a reply from an email to Western Digital ( thanks for that WD), I found out that I messed up the RAID array. Time to rebuild the array.
      How do you do this with a headless box with no access to the BIOS or OS ?
      Since this box is headless, WD allows you to download a full copy of the OS that includes a few options. According to the pdf, you create a bootable USB stick <512 meg and boot off of that. Then you will get some details from the LCD screen as to your progess. It look 7 hours to rebuild the drives, OUCH that took a while. But in the end, of course it worked.
      Then I wanted to reinstall the OS. That involves a similar process to the making the repair RAID USB stick, but you need a 8GB stick because it will hold the OS. ( This is similar to how it's done with the MediaSmart Server but the OS is on the USB stick instead of the PC.)
      So now I'm all up and running fine.
      Now to try and break it with some Add-ins.
      If you have any questions on the Western Digital's DX4000, I'll give support on this box as long as I can until I have to return it.
      Soon to be continued.....
  • Create New...