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
wget http://download.qnology.com/pogoplug/v4/fw_printenv
wget http://download.qnology.com/pogoplug/v4/fw_setenv
wget http://download.qnology.com/pogoplug/v4/ubiattach
wget http://download.qnology.com/pogoplug/v4/ubimkvol
wget http://download.qnology.com/pogoplug/v4/ubiformat

#make executable
chmod +x fw_printenv fw_setenv ubiattach ubimkvol ubiformat

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

#attach
/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
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar

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

#unsquashfs
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
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-zImage

#rename zImage file
mv openwrt-oxnas-zImage zImage


#download fdt
wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro.dtb
wget http://download.qnology.com/pogoplug/oxnas/ox820-pogoplug-classic.dtb


sync
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'

#S
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.
poweroff

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 192.168.1.1 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 192.168.1.1 (username and password not required). If you're not able to telnet into the Pogoplug try setting a static IP address of 192.168.1.2 on your computer.

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

#set passwd and enable ssh
passwd

#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

#reboot
reboot

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)

59 comments :

  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

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

    http://downloads.openwrt.org/chaos_calmer/15.05-rc2/oxnas/generic/

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

      Delete
  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 ?

    ReplyDelete
  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.

    ReplyDelete
    Replies
    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).

      Delete
    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.

      Delete
    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.

      Delete
    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.

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

    ReplyDelete
  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.

    ReplyDelete
    Replies
    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.

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

    ReplyDelete
  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

    ReplyDelete
  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 image.cheap shoes in Pakistan

    ReplyDelete
  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

    ReplyDelete
  11. 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 :-
    mcafee.com/activate |
    office.com/setup |
    McAfee.com/activate |
    office.com/setup

    ReplyDelete
  12. 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

    ReplyDelete
  13. 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.

    ReplyDelete
  14. Nice blog with Amazing information .. love to read about this.
    Awaiting for your new post
    We at Fullassignment.com 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.

    https://fullassignment.com/

    ReplyDelete
  15. Thanks for all the tips mentioned in this article!

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

    ReplyDelete
  16. NAGAQQ | AGEN BANDARQ | BANDARQ ONLINE | ADUQ ONLINE | DOMINOQQ TERBAIK

    Yang Merupakan Agen Bandarq, Domino 99, Dan Bandar Poker Online Terpercaya di asia hadir untuk anda semua dengan permainan permainan menarik dan bonus menarik untuk anda semua

    Bonus yang diberikan NagaQQ :
    * Bonus rollingan 0.5%,setiap senin di bagikannya
    * Bonus Refferal 10% + 10%,seumur hidup
    * Bonus Jackpot, yang dapat anda dapatkan dengan mudah
    * Minimal Depo 15.000
    * Minimal WD 20.000
    *Meyediakan Deposit pulsa XL & SIMPATI

    Memegang Gelar atau title sebagai QQ Online Terbaik di masanya

    9 Games Yang di Hadirkan NagaQQ :
    * Poker Online
    * BandarQ
    * Domino99
    * Bandar Poker
    * Bandar66
    * Sakong
    * Capsa Susun
    * AduQ
    * Perang Bacarrat (New Game)


    Info Lebih lanjut Kunjungi :
    Website : NAGAQQ
    Facebook : Facebook
    WHATSAPP : +855977509035
    Line : Cs_nagaQQ
    TELEGRAM :+855967014811

    BACA JUGA BLOGSPORT KAMI YANG LAIN:
    agen bandarq terbaik
    Winner NagaQQ
    Daftar NagaQQ
    AGEN POKER ONLINE

    ReplyDelete
  17. Some times its a pain in the ass to read what people wrote but this web site is very user friendly ! .
    Pakistan Urdu News

    ReplyDelete
  18. In the quickbooks accounting tool accounts can easily perform in case facing the issue of quickbooks update error 15227 it can be solve by quickbooks update error

    ReplyDelete
  19. I simply wanted to write down a quick word to say thankyou so much to you for those helpful and very beneficial suggestions and tips you are showing on this website many blog posts. I am waiting your new post, I am taking a look forward to contact you. Will you kindly drop me a mail? Please let me know after reading my comment. psychology assignment help - application essay writing - biology assignment help

    ReplyDelete
  20. moonforg.com is powered by Chip - an e-commerce platform that empowers artists
    worldwide to create and sell their unique design products. Chip only works with
    reliable print-on-demand suppliers in the US and Asia from our San Francisco head office.
    VISIT HERE>>>> www.moonforg.com

    ReplyDelete
  21. Thank you for sharing this useful content. The information you describe here would be useful. I want to share with you all a useful source- BigPond Contact Number Australia
    Looking for technical support for the internet and telecom of Bigpond in the Australia region. We are third-party service provider of Bigpond and the best telecommunication & internet service provider in Australia, So whenever you are stuck with your internet connection issue talk to our Bigpond contact number, just call at +61-480-020-996

    ReplyDelete

  22. You have done a great job on this article. It’s very readable and highly intelligent.
    You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you
    amazon quiz
    gk quiz
    general knowledge quiz
    english stories
    bedtime stories
    short stories kids
    english short stories
    short bedtime stories

    ReplyDelete
  23. idm crack download has been tested before upload in our database. At the time of uploading, Free-4paid.com was satisfied but if you find any issue regarding the installation, you can put your issue in the comments section. The expert team will look into the matter and rectify the issue as soon as possible. However, we are not responsible for the crack version; this may cause the issue if you have not installed all the files in the bundle. Additionally, you must test all the links available on the site, maybe some links have the corrupt files but you will find the exact one that you are searching for.

    ReplyDelete
  24. This is awesome article, thanks for sharing this type article you can also get my accounting software service at

    QuickBooks Customer Service

    ReplyDelete
  25. OpenWRT works fine until the Wi-Fi is on, but whenever I turned Wi-Fi on, OpenWRT shuts down abruptly. I am sure that your blog will help me to Buy Dissertation Online and solve this issue.

    ReplyDelete
  26. Informative content! If you don't know how to research Persuasive Essay Topics then you should visit our website and get more information about the same. Browse our website for knowing more details about our services. We provide the best academic writing facilities at low prices.

    ReplyDelete
  27. MaiLash Brows’s Eyeliner Tattoo Scottsdale procedure has been refined throughout time. It involves minimal pain; rather, clients describe the sensation as uncomfortable and itchy due to the vibration of the machine.

    ReplyDelete
  28. 스포츠토토
    that is the finish of this article. Here you will locate some web pages that we believe you’ll enjoy, just click the links ove

    ReplyDelete
  29. 바카라사이트
    I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.Here is deep description about the article matter which helped me more.

    ReplyDelete
  30. Hi there

    Very nice content and blog, I found it very informative and useful, hope to read more nice articles like this one around here,

    Keep sharing the best content,

    Best regards!

    Your follower

    Salvatore from:

    Compra de Ingresso on-line – Os ingressos para visitar o Patrimônio Mundial Natural e uma das 7 Maravilhas da Natureza, que abriga as Cataratas do Iguaçu, são limitados e vendidos exclusivamente on-line, com agendamento de dia e horário para o passeio no site Tour Cataratas Passeio de Barco Cataratas É importante lembrar que não existe a opção de compra de bilhete físico no parque. É necessário adquirir o ingresso de entrada no Parque Nacional do Iguaçu com antecedência em sites autorizados.

    Thanks and take care

    ReplyDelete
  31. This is the best thing through which the user might get al the effective and all sorts of ideas out here.
    Delhi High Profile Girls

    ReplyDelete
  32. This comment has been removed by the author.

    ReplyDelete
  33. Hey there, thank you for your information, I’ve definitely picked up something new from this website right-away. Its a nice moment surfing around your blog. unimed cut off mark for physics with electronic

    ReplyDelete
  34. Free YouTube Download Premium Crack is one of the most well-liked and well-known YouTube downloader programs for the internet today....

    ReplyDelete
  35. "I love how you provide practical tips. It's not just theoretical; you give readers actionable steps to apply the knowledge you share."
    myindigocard
    jjsploit download


    ReplyDelete
  36. This comment has been removed by the author.

    ReplyDelete
  37. Saturday Morning
    LoveThisPic offers Happy Saturday Sprinkle Love Today pictures, photos & images, to be used on Facebook, Tumblr, Pinterest, Twitter and other websites.

    ReplyDelete