Friday, April 10, 2015

OpenWRT on Pogoplug v3/Oxnas (Pro/Classic)

This tutorial assumes you have completed my previous tutorial - Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian
- and already running Debian from a USB drive on the Pogoplug V3.

OpenWRT will be installed on the internal flash (NAND) of the Pogoplug. You will still be able to boot Debian from USB when attached.

Known Issues:

 - RT3090 (PCIE) Wi-Fi in the Pro is not working. 
All commands below needs to be executed from Debian.

#Verify MTD partition
cat /proc/mtd
#root@debian:~# cat /proc/mtd
#dev: size erasesize name
#mtd0: 00e00000 00020000 "boot"
#mtd1: 07200000 00020000 "data"

#download firmware/nand utilities
cd /tmp

#make executable
chmod +x fw_printenv fw_setenv ubiattach ubimkvol ubiformat

#format mtd1 (data)
/tmp/ubiformat /dev/mtd1

/tmp/ubiattach /dev/ubi_ctrl -m 1
/tmp/ubimkvol /dev/ubi0 -m -N rootfs

#mount ubi rootfs to /tmp/ubi
mkdir /tmp/ubi
mount -t ubifs ubi0:rootfs /tmp/ubi

#We're using the snapshot trunk release.

#There is no rootfs tarball, so we'll extract 
#it from the squashfs sysupgrade tar
cd /tmp

tar -xvf openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar

apt-get install squashfs-tools
unsquashfs sysupgrade-pogoplug-pro/root

#move extracted rootfs to ubi
mv squashfs-root/* /tmp/ubi

#download kernel zImage
mkdir -p /tmp/ubi/boot
cd /tmp/ubi/boot

#rename zImage file
mv openwrt-oxnas-zImage zImage

#download fdt

cd /
umount /tmp/ubi

#Setup uBoot Environment
#Cut and Paste this whole section
/tmp/fw_setenv zimage '/boot/zImage'
/tmp/fw_setenv loadaddr '0x60500000'
/tmp/fw_setenv fdt_addr '0x62c00000'
/tmp/fw_setenv loadubi 'echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi'
/tmp/fw_setenv mountubi 'ubi part data; ubifsmount ubi0:rootfs'
/tmp/fw_setenv loadubizimage 'ubifsload ${loadaddr} ${zimage}'
/tmp/fw_setenv loadubifdt 'ubifsload ${fdt_addr} ${fdt_file_ubi}'
/tmp/fw_setenv bootzubi 'echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};'
/tmp/fw_setenv setargsubi 'setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}'

#Select the appropriate fdt - Pro (Wi-Fi) versus regular.

#Pogoplug Pro
/tmp/fw_setenv fdt_file_ubi '/boot/openwrt-oxnas-pogoplug-pro.dtb'

#Non-Pro (use this if unsure)
/tmp/fw_setenv fdt_file_ubi '/boot/ox820-pogoplug-classic.dtb'

etup boot order.
#USB first, then UBI/NAND
/tmp/fw_setenv dt_bootcmd_usb 'usb start; run dt_usb_bootcmd; usb stop'

/tmp/fw_setenv bootcmd 'run dt_bootcmd_usb; run loadubi; reset'

#poweroff Pogoplug and then remove USB flash drive.

OpenWRT Initial Boot via Telnet

At this point, we're ready to boot into OpenWRT. During the bootup process the LED on the Pogoplug will blink. However once it successfully boots into OpenWRT the LED will be completely off.

Note that by default, OpenWRT will default to and will (or should) act as a DHCP Server.  Plug a network cable from your computer directly into the Pogoplug and power it on (do not plug the Pogoplug into your router). You should now be able to Telnet into the Pogoplug at (username and password not required). If you're not able to telnet into the Pogoplug try setting a static IP address of on your computer.

Note that SSH is disabled and will automatically start after a root password is set.

#set passwd and enable ssh

#Reconfigure Network to DHCP Client
#disable dhcp server on lan
#Ignore if any error.
uci set dhcp.lan.ignore=1
uci commit dhcp
/etc/init.d/dnsmasq restart

#set wired ethernet interface to dhcp client
uci set network.lan.proto=dhcp
uci commit network


OpenWRT SSH and Initial Package Installation

Plug the Pogoplug and your computer back into your network/router. Check your router for the IP Address assigned to your Pogoplug. You should now be able to SSH into the Pogoplug.

Note that since we're using the daily snapshot trunk build of OpenWRT, you'll need to install your kernel packages right away (kmod-xxx), otherwise it will get out of sync.

opkg update

#Pogoplug has 128MB flash
#No need to be stingy on the packages
opkg install nano wget luci uboot-envtools pciutils usbutils htop wireless-tools kmod-rt2x00-pci kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs fdisk kmod-usb2 samba36-server samba36-client luci-app-samba kmod-rtl8187 wireless-tools kmod-usb-net-asix-ax88179 kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb kmod-usb-serial-pl2303  kmod-usb-serial-cp210x  kmod-usb-serial-ftdi picocom screen

#Assume you're using the USB RT5370 Wi-Fi below 
#Regenerate Wi-Fi configuration
#Verify if Wi-Fi is working properly
rm -f /etc/config/wireless 
wifi detect > /etc/config/wireless

#If wireless is working properly, you should see something
cat /etc/config/wireless

#Enable Wi-Fi
sed -i 's^option disabled 1^option disabled 0^' /etc/config/wireless
/etc/init.d/network restart

Note that the built in Wi-Fi (PCIE) on the Pogoplug Pro is not working.

If you need wireless, I would highly recommend a USB Wi-Fi card based on the RT5730 chipset for less than $8.

Mini Wireless 150Mbs USB Ralink RT5370 (or from Ebay)


  1. First of all, THANK YOU so much for this latest entry in your already awesome blog. I'm sure it was just a typo on the blog, but I believe the regenerate wi-fi config should be on 2 lines:
    rm -f /etc/config/wireless
    wifi detect > /etc/config/wireless

  2. Any reason you decided to use the snapshot over the RC?

    1. I wrote the tutorial prior to CC RC being released.

  3. Hi
    Last time i try re-flash PogoPlug Pro, but received not working LAN
    [ 19.199979] eth0: Could not attach to PHY
    [ 19.203993] stmmac_open: Cannot attach to PHY (error: -16)
    [ 19.212884] stmmac_ethtool_getsettings: eth0: PHY is not registered
    [ 19.219499] device eth0 entered promiscuous mode
    [ 19.228293] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready

    May be any can help me ?

  4. Hi,
    Would it be possible for you to write up a tutorial revert back to Debian or Pogoplug. Silly me, I swapped the command and made uboot to boot from nand first before usb. I try to get back into uboot environment but flash_erase command is not working. Keep getting "not found command". The current guide get you to "Bleeding Edge" and it is in non-operational stage. Luci is not working and the issue has been report in the earlier Bleeding Edge release. I really want to try Chaos Calmer.

    1. You should be able to adjust the uboot environment directly from OpenWRT. If you installed the recommended packages above, it should include the "fw_setenv" command. Not sure why you would need "flash_erase" (sounds dangerous).

    2. I make all the downloads executeable and ./fw_printev doesn't even work. It is really weird. Anyway, I gave up on that effort. I got the Pogo Pro to boot off SATA. I had to use 2012-05 version. All of the newer version DDoS my network for some reason.

      Any recommendation for guide? I went into to NAND and try to format mtd2 but it says have to detach mtd2. I am clueless on how to detach so i went into mtd2 and delete everything manually. Follow the rest of this guide at

      mkdir /tmp/ubi
      mount -t ubifs ubi0:rootfs /tmp/ubi

      I used the ubifs version instead of the squash since I cannot download squash-tools with the older version of archlinux. I got stuck in boot loop. light blink then stop 20 sec later light blink then stop and repeat. :-) Any recommendation?

      In addition, when running the command ./fw_setenv when booting off SATA. Does that set the environment on NAND or on the SATA drive? It seems the command is not passing to NAND.

      I also tried and update to 2015.10 U-boot and run this guide afterward but no success.

    3. The above instructions is meant to be run from Debian. If you're already running it from OpenWRT, the binaries provided in this tutorial will not work.

      The uboot environment variables are stored on the NAND.

    4. I got it fixed. A new uboot install from SATA should had fixed it but I had made two mistake. SATA boot assign NAND 'boot' partition as mtd1 instead of 0. I followed to the guide too close. Should used the output from 'cat /proc/mtd' ! In addition, the new uboot is case sensitive with partition label. I have to rename 'ROOTFS' to 'rootfs' and it boot right off usb. Netconsole is not working for some reason.

  5. I read your site.This web site keeping an extremely distinctive and interesting information.Thanks for reveal.keep constant. golf gps watch

  6. Hi,

    Unfortunately, the firmware/nand utilities files are not on your server anymore. Could you reupload them? I would love ti install openwrt to my pogoplug as well.

    1. fw_printenv and setenv can be found on Github. The others can be installed using apt-get install mtd-utils. For the OpenWrt files just browse around the directories on the OpenWrt domain- all files have been renamed though.

  7. Now in order to start your cost-free snapchat account registration Snapchat Login There are lots of fantastic features which Snapchat application.

  8. So you've determined directly to dive yourself into the universe of game improvement, have gathered a collection of forceful warriors to deal with all of the large issues and are organized to make the following exceptional recreation within the corporation. Gmod game

  9. Uptime is one of the most important factors in maintaining an effective online presence. Outages of any duration can be costly. Downtime can impact your organization directly by causing lost sales, signups, etc., or indirectly by hurting your reputation and brand shoes in Pakistan

  10. Starting a blog is nowhere near difficult but creating a successful blog may be another story for you. An excellent blogging how-to should tell you all the basics you will need to become successful blogging.Many business owners don't realize this but a blog can actually do so much for one's marketing plan. mens casual dress shoes

  11. Mau menang banyak dengan modal sedikit..
    Ayo gabung di Agen Domino NAGAQQ.
    =>Bonus Refferal 20%
    =>Bonus Turn Over 0,5%
    =>Min Deposit Rp15.000
    =>1 User ID 4 Games
    Situs yang bisa memberikan kemenangan AGEN BANDARQ
    raih kemenangan anda segera...
    WHATSAPP : +855967014811
    PIN BB : 2B209F68

  12. Yuk Buruan ikutan bermain di website nagaQQhoki
    Sekarang NAGAQQHOKI Memiliki Game terbaru Dan Ternama loh...
    => Bonus Refferal 20%
    => Bonus Turn Over 0,5%
    => Minimal Depo 15.000
    => Minimal WD 15.000
    => 100% Member Asli
    => Pelayanan DP & WD 24 jam
    => Livechat Kami 24 Jam Online
    => Bisa Dimainkan Di Hp Android
    => Di Layani Dengan 6 Bank Terbaik
    => 1 User ID 5 Permainan Menarik
    Ayo gabung sekarang juga hanya dengan
    mengklick AGEN BANDARQ
    WHATSAPP : +855967014811
    PIN BB : 2B209F68

  13. My friend got hooked on this site and got me hooked modern all online casinos There are great slot machines and various gambling games. You can chat and earn extra money

  14. Thanks for all the tips mentioned in this article! it’s always good to read things you have looking for antivirus security for your PC and any other digital devices than.
    I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. If you are looking for antivirus security for your PC and any other digital devices than. Visit@: my sites :- | | |

  15. I’d should talk to you here. Which is not some thing I do! I quite like reading a post which will make people believe. Also, many thanks permitting me to comment! Pakistan English news

  16. We have made our number so that sellers may quickly come in contact with we deployed professionals for Amazon Appeal Service. This will help them to receive proper guidelines to prevent the occurrence again along with working solution service.

  17. Nice blog with Amazing information .. love to read about this.
    Awaiting for your new post
    We at bring to you the most significant Information Security assignment help writing service at the best cost. With long stretches of understanding we are prepared to give assignment help online over the globe.You will be guided here with a portion of the information of Information Security assignment which could assist you in deciding writing a Information Security assignment. Nonetheless, we unequivocally prescribe you to benefit Inter Process Communication Assignment Help from our specialist to find out about marketing and its scope.We also provide Operating systems Assignment Help from our experts.