Install OpenWrt on Shuttle OMNINAS KD20

Hello, im new here. I would like to Install the "openwrt-19.07.3-oxnas-ox820-shuttle_kd20-factory.tar.gz" on the stock Firmware.

Have anyone do this bevor on this device and can tell me what I must to do!!!???

Sorry for my bad English but i am from Germany. :joy:

Please help! thanks

The KD20 is badly (read as: not at all) documented in the OpenWrt wiki :frowning:

Maybe @daniel can help out and provide installation instructions?

I also would like to use it on the KD20 but searching the forums only yields results of people who bricked their device with the latest release.

Is there someone running 19.07 successfully?

What would be the best way for me to test this safely?
Currently I am not using the device so I do have the time to test things.

I have a USB UART adapter however I could not find any pictures anymore online on how to open the device.

Seems there's a serial port, and TFTP capability.

Read this thread -,17649
Even though it's not OpenWRT specific, they provide a lot of info.

Thanks, I did find that thread but all pictures regarding disassembling the device are lost as they were hosted on Google+ which is now discontinued.

So I am hoping to find some info on how to open it without breaking anything :slight_smile:

serial port is probably the four round + 1 square hole top right.

I know and this is the pin layout that I found ( ) (SG) (RX) (TX) ( ) CON5

However I have yet to get into the box, I've only found 2 screws reachable from the outside. But those screws did not loosen anything as far as I could find out.

Hi everyone!

I'm happy to see there is interest in the oxnas target and the KD20 specifically. I'm running that hardware myself ever since I ported OpenWrt to it years ago and I'm still happy with it.
The initial installation when still running Shuttle's stock firmware is quite tricky by now (given you want to avoid opening the device). This is because the image generated for that purpose grew larger than what the bootloader supports. Hence you need to build that intermediate firmware needed for initial installation yourself.
On a Linux buildhost, do the following

git clone -b lede-17.01
cd openwrt
cat >.config <<EOF
# CONFIG_PACKAGE_block-mount is not set
# CONFIG_PACKAGE_fdisk is not set
# CONFIG_PACKAGE_kmod-ata-core is not set
# CONFIG_PACKAGE_kmod-crypto-crc32c is not set
# CONFIG_PACKAGE_kmod-crypto-hash is not set
# CONFIG_PACKAGE_kmod-fs-exportfs is not set
# CONFIG_PACKAGE_kmod-fs-ext4 is not set
# CONFIG_PACKAGE_kmod-fs-xfs is not set
# CONFIG_PACKAGE_kmod-lib-crc16 is not set
# CONFIG_PACKAGE_kmod-lib-crc32c is not set
# CONFIG_PACKAGE_kmod-md-mod is not set
# CONFIG_PACKAGE_kmod-nls-base is not set
# CONFIG_PACKAGE_kmod-scsi-core is not set
# CONFIG_PACKAGE_kmod-usb-core is not set
# CONFIG_PACKAGE_kmod-usb-ledtrig-usbport is not set
# CONFIG_PACKAGE_kmod-usb-storage is not set
# CONFIG_PACKAGE_kmod-usb2 is not set
# CONFIG_PACKAGE_kmod-usb2-oxnas is not set
# CONFIG_PACKAGE_kmod-usb3 is not set
# CONFIG_PACKAGE_libblkid is not set
# CONFIG_PACKAGE_libfdisk is not set
# CONFIG_PACKAGE_libmount is not set
# CONFIG_PACKAGE_libpthread is not set
# CONFIG_PACKAGE_librt is not set
# CONFIG_PACKAGE_libsmartcols is not set
# CONFIG_PACKAGE_libuclient is not set
# CONFIG_PACKAGE_libuuid is not set
# CONFIG_PACKAGE_lsblk is not set
# CONFIG_PACKAGE_mdadm is not set
# CONFIG_PACKAGE_opkg is not set
# CONFIG_PACKAGE_uclient-fetch is not set

make oldconfig </dev/null
make -j$(nproc)

That will give you a file bin/targets/oxnas/generic/lede-oxnas-kd20-factory.tar.gz which can be uploaded to the system update web interface of vendor's original firmware.
Once you have successfully flashed the intermediate firmware, you can now access it using ssh (assuming KD20 is directly connected to eth0 on your host):

# download up to date firmware to flash, to be safe get both sysupgrade and ubinized


ping ff02::1%eth0
# look for the duplicate response, that's the KD20 link-local IPv6 address and
# replace fe80::1234:56ff:fe78:90ab%eth0 below with the actual address you saw
# in the response

scp openwrt-19.07.5-oxnas-ox820-shuttle_kd20* root@[fe80::1234:56ff:fe78:90ab%eth0]:/tmp
ssh root@fe80::1234:56ff:fe78:90ab%eth0

# you are now connected to LEDE initramdisk system on the KD20
# fingers crossed, this should flash the kernel directly to NAND and write
# squashfs-rootfs to the rootfs UBI volume.

cat /proc/mtd
# I believe 'ubi' should be mtd4, but better check

# make sure it is detached
ubidetach /dev/mtd4
# re-format UBI and write rootfs
ubiformat /dev/mtd4 -f /tmp/openwrt-19.07.5-oxnas-ox820-shuttle_kd20-squashfs-ubinized.bin

# write kernel (and maybe rootfs again, but nvm)
sysupgrade -n /tmp/openwrt-19.07.5-oxnas-ox820-shuttle_kd20-squashfs-sysupgrade.tar

I've been using my own device in production ever since I ported OpenWrt to it years ago, and I guess for years I've been the only user. However, recently more people have been reaching out to me because there aren't many other choices left for that hardware...

It'd be nice if we can work together to document and improve the initial installation process and allow people to install without serial adapter or having to open the device (I've tried that method exactly once on a new device running stock firmware ~ 4 years ago).

if you don't want to run the whole build process yourself, here is the ready file for download:

update: first of all, if you don't manage to find the IPv6 LL address via multicast ping you can connect the KD20 to your LAN and see on your router which IPv4 address it acquired through DHCP and then use that to upload files and connect via SSH.

Also sysupgrade -f -n ... won't work, for several reasons.
Hence, please do this in the shell after you have successfully UBI formatted the ubi MTD partition with the *squashfs-ubinized.bin file.

tar xf /tmp/openwrt-19.07.5-oxnas-ox820-shuttle_kd20-squashfs-sysupgrade.tar sysupgrade-shuttle_kd20/kernel -O | mtd write - kernel

That's essentially what sysupgrade should do to write the kernel to NAND in the way U-boot expects it. It should not through any errors and after that you are ready to reboot and OpenWrt 19.07.5 should come up. All future updates will work in the usual OpenWrt-way using sysupgrade (or uploading the *-sysupgrade.tar file to the System Update view of LuCI web interface).

Hit a few bumps along the way, but that's how you refine a procedure!
openwrt is up and running!


I've created a wiki page for the device documenting the initial installation process as @TechGuy and me have gone through it now:


Just to add some notes:

The 2017 brick reports occured because the bootloader does not read the full kernel/initramfs partition when booting (last argument)

loadr=nand  read.e 0x62000000 240000 280000
load=nand  read.e 0x60500000 840000 300000

Whereas the partitions are sized differently (first number):

mtd3: 00600000 00020000 "INITRD"
mtd4: 007c0000 00020000 "Kernel"

Instead of slimming down the (oversized) OpenWRT installation image, I patched u-boot to load the full partition size. This mitigates the risk of running into the same issue during an upgrade in the future.

Instructions provided as a reference for anyone looking to improve future robustness. Using the workaround by @daniel is the recommended way of installation. Do not attempt to reproduce unless you exactly know what you're doing.

If your loaders (stage1, u-boot) match SHA256

25ceb3f2f0f1b1e4f25c81bb7a85d19d8a7e5f3ca8b1e1d1d755db6fb2806131  mtdblock1.bin
9e7073ad846c715cc84bd8b0d3a09c809f1ecae8581a553aca3b676681f065a7  mtdblock2.bin

Applying this script should output two patched u-boot images matching.

e69da743f69f8ce08c8f37362896ddb95bd9de015db78bfeb6515570a101f9a3  uboot_patched.bin
b01411a337b7ec3fd2ae7bb6fb752e55dc12f3e6166edad453bb861ad0cbfe65  uboot_patched_padded.bin

Erase the u-boot partition and write uboot_patched.bin (without oob). The second checksum is provided for convenience (should match /dev/mtdblock2 on the vendor firmware after flashing).

Note: mtd numbering differs between stock firmware and WRT - WRT splits u-boot in mtdblock{1,2}.
My current stage1 & (patched) u-boot, as seen from OpenWRT:

# cat /dev/mtdblock0 | sha256sum 
25ceb3f2f0f1b1e4f25c81bb7a85d19d8a7e5f3ca8b1e1d1d755db6fb2806131  -
# cat /dev/mtdblock1 /dev/mtdblock2 | sha256sum 
b01411a337b7ec3fd2ae7bb6fb752e55dc12f3e6166edad453bb861ad0cbfe65  -

I cannot remember whether NAND oob data is used/relevant for the loaders. I think it's all 0xff for the original loaders. but by all means do verify..

Additional notes:

  • OX820 can boot from SATA. See: [MedionNAS] installation and recovery - creating a SATA bootable OpenWRT image might be useful.
  • I suppose adding the patched u-boot (and stage1) to the factory upgrade image would work.
  • The stage1/u-boot contained in the 'factory image' which used to be available on the net differ from whats shipped on the machine out of the box (slightly older - the ones I patched).

I don't have physical access to the machine I'm running OpenWRT on, nor any interest to work on any of the above. Just dropping my notes in case they end up being useful to anyone else.

I'm working on generating "proper" ramdisk in uImage, like the vendor image does as well, not yet involving oxnas, but I will get there and re-do the installer image soon.;a=commitdiff;h=7cbb3c5bf8e18dc22f11b374026344b953ff28e5

Hello everyone,

Hopefully this will be helpful to someone else. I've just recently installed OpenWRT on my rather ancient KD20 (thank you all for getting it working!) and ran into the issue of the NAS crashing on large file transfers.

I was able to de-tune Samba enough so that the poor little thing isn't getting overwhelmed and choking to death. It does limit the performance to around 15-20MB/s though.

I haven't done super extensive testing to fine tune anything, I'm just glad it's working for now.

Changes I made to the smb.conf template are:

socket options = SO_RCVBUF=65536 SO_SNDBUF=65536 

aio read size = 0
aio write size = 0

use sendfile = yes

Other changes I made include removing the firewall modules, disabling IPv6, and turning off the bridge mode on the LAN port. None of those made a difference until I monkeyed with SAMBA options though so I don't think they're relevant. I'm mentioning it just in case though.

Happy to help answer any questions, or do more testing.


I have a Omninas kd20.

I uploaded firmware :
from :

Conforms to the Openwrt instructions.
This is the "snap" version. Something went wrong.

After rebooting the device, I logged in as root,
but I couldn't do any further installation and configuration.
The openwrt directory is missing, missing wget, opkg.
I admit that without them my knowledge of Linux is there
insufficient to deal with the problem.

you could try to (win)scp the upgrade tar & bin to the device, instead of wget:ing it from teh intarweb.

latest stable version is at

1 Like

I uploaded it to the / TMP folder
from the page you specified.

After restart, the LED blinks - a sound is heard - after a few seconds the LED goes out.
I did something wrong?

if you didn't write the rootfs, as in the instructions, then yes .... :expressionless: