Pogoplug v4 - Add Option to Boot Default Pogoplug OS when USB/SD Card is Not Attached

If you followed my tutorial - Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch) - and have a Pogoplug Mobile or Series 4 running Debian or Arch Linux ARM already and would like to be able to boot the default Pogoplug OS when you don't have a USB Drive/SD Card attached, this tutorial is for you.

Note: you need to be running the uBoot in the above tutorial. This tutorial will not work if you are running the uBoot provided by archlinuxarm.org.

Don't forget that you'll need to activate the Pogoplug on my.pogoplug.com if you plan on SSHing into the default Pogoplug OS.

From Debian or Arch Linux ARM:



#For Arch Linux ARM, install mtd-utils and uboot-env
pacman -Sy mtd-utils uboot-env 
wget

#For Debian, install mtd-utils and uboot-env
apt-get install mtd-utils uboot-envtools wget


#setup fw_env.config
echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config


#mount mtd4 partition
ubiattach /dev/ubi_ctrl -O 2048 -p /dev/mtd4
mkdir /tmp/mtd4
mount -t ubifs ubi0:rootfs /tmp/mtd4

#download original uboot

#update uboot environment parameters
#update boot order to include pogoplug OS
fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset'

#chain load original uboot
fw_setenv bootcmd_pogo 'if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi'


#if you previously installed the uboot from archlinuxarm.org
#we need to reset some of the uboot parameters
cd /tmp
wget http://download.doozan.com/uboot/blparam
chmod +x blparam
/tmp/blparam arcNumber > /dev/null 

/tmp/blparam mainlineLinux=no > /dev/null
/tmp/blparam bootcmd='run boot_nand' > /dev/null

#unplug USB drive and SD Card and test
reboot

33 comments :

  1. I have followed this HOWTO. When I boot my Mobile without an SD card or USB drive it settles down to a solid red LED displayed. I can ssh into the Mobile and I can see what looks like the original Pogo OS file system layout. But when I plug in an USB drive formatted FAT32 it is not seen at pogoplug.com. I refresh there repeatedly, but the drive is not accessible. I have tried with other USB drives with the same result.

    Any idea how to get my Mobile to work with Pogoplug again?

    Thanks

    ReplyDelete
    Replies
    1. I would suggest first verifying that you are actually booting into the Pogoplug OS (you don't sound too sure). Saying that, nothing in my tutorial would have affected the functionality of the Pogoplug OS, so I would suggest double checking it isn't anything your side or an issue with the Pogoplug service itself.

      Delete
    2. I am very sure. I said I can boot it, and ssh into it, and I can see the filesystem which has your uboot.mtd0.dockstar.original.kwb in /.

      It has to be the Pogoplug OS running as there is no SD or USB drive attached.

      One symptom to note is that I can ping out by IP address, but not by hostname. There is a valid DNS server in /etc/resolv.conf. This may be preventing it from contacting pogoscope.com or wherever the service is hosted?

      I had ALARM on it for a while (http://archlinuxarm.org/platforms/armv5/pogoplug-series-4) and used their method on the Advanced tab to Revert to Stock Firmware prior to using your tutorial (http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html) to put Debian on a SD.

      I did use your entire tutorial to revert it to stock, including the steps "if you previously installed the uboot from archlinuxarm.org." When that didn't work I repeated the entire tutorial without those extra steps. Same result.

      If I put the SD card in with Debian, it works fine so it's not a full fledged brick :)

      Thanks for any insight you may have after the additional info I provided.

      Delete
  2. I was pointed to this other blog, part of which you may want to incorporate into your Debian/ALARM install tutorial.

    http://mehl.co/articles/installing_debian_on_the_pogoplug/index.html#step0

    The section I found interesting and related to my problem is Step 0 where the new Pogoplug's nand flash can be backed up to an attached USB drive. Further down in the blog are the instructions for restoring from the backup.

    ReplyDelete
    Replies
    1. Good info. However, I don't believe a nand backup is necessary.

      Delete
  3. I was able to recover the unit per this tutorial by running it again, for what must have been the third time. It now works. Thanks for your attention.

    ReplyDelete
    Replies
    1. Glad to hear you got it working. For the record, I do not believe your issue has anything to do with my tutorial. The only changes to the Pogoplug OS is two additional files - /etc/fw_config and the /uboot.mtd0.dockstar.original.kwb, which would have no affect on the functionality of the default Pogoplug OS or my.pogoplug.com service.

      Delete
  4. Is there a way to do this for the Pogoplug E02?

    Thanks.

    ReplyDelete
    Replies
    1. Probably, but not needed if you just followed the flashing instructions I have documented in my tutorial - http://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.html

      You'll have to run the "./install_uboot_mtd0.sh" script with the --no-check-uboot (double check the option name).

      Delete
  5. Hey, I have a problem.
    When I try this:
    #mount mtd4 partition
    ubiattach /dev/ubi_ctrl -O 2048 -p /dev/mtd4
    mkdir /tmp/mtd4
    mount -t ubifs ubi0:rootfs /tmp/mtd4

    This happens: ubiattach /dev/ubi_ctrl -O 2048 -p /dev/mtd4
    libubi: error!: cannot stat "/dev/mtd4"
    error 2 (No such file or directory)
    ubiattach: error!: cannot attach "/dev/mtd4"
    error 2 (No such file or directory)

    Can you help me please

    ReplyDelete
    Replies
    1. Arch or Debian? Did you install the uBoot from my other tutorial? Did you set the mtdparts back to the original?

      Delete
    2. Wow extremely fast relply! I used Arch. Yes the Uboot is from your tutorial but I think there is the problem (http://forum.doozan.com/read.php?3,18170,18261#msg-18261) I am devinger.

      Delete
    3. I took the time to reply to your post with detail instructions but you ignored it. :(

      Delete
    4. I am so sorry, forgot to mention I tryed it but at that point, the first thing that workt was bodhi his reply. I will try it right away! Sorry, really!

      Delete
    5. I am sure I did something wrong again. It doesn't load the pogo os. I will paste what i did in threat.

      Delete
    6. Hello guys,

      I'm in the same boat and stuck at the same step. I followed your tutorial and I'm running debian on a usb and it's running great, but when I try to complete this tutorial I get the same error. I think I'm either too dumb or my brain is too fried to follow to the correct fix. Can you point me in that direction and I'll get back at it after some rest?

      Delete
  6. i have got archlinux on my pogoplug 4 mobile SD card. i want to try debian. how do i do that? i assume i should go back to pogoplug OS, and then do a straight debian install. trying to follow this guide, but my archlinux doesn't have fw_setenv. where is it? thanks.

    ReplyDelete
  7. Did you use my tutorial to setup your PP4? fw_setenv should be part of mtd-utils.

    #For Arch Linux ARM, install mtd-utils
    pacman -Sy mtd-utils

    ReplyDelete
  8. i did follow your tutorial, but no fw_* commands. but pacman -Sy uboot-env will get them. still can't get the pogoplug OS to boot, not sure what's going on. to get debian going, i followed this: http://forum.doozan.com/read.php?2,12096 thanks.

    ReplyDelete
    Replies
    1. Thanks for the info on the uboot-env. I'll add it to the tutorial. Booting the Pogoplug OS isn't that difficult, you just need to follow my tutorial (and only my tutorial). Are you using the uBoot in my tutorial or are you using the uboot from archlinuxarm.org?

      Delete
    2. i was only using your tutorial. now that i was able to make another SD card with debian on it, no need to boot pogoplug OS again. the video capture drivers i wanted to use don't work, but that's another (probably insurmountable) issue. still, fun to have a $7 linux computer, and the USB video capture does work with the motion pkg.

      Delete
  9. Thanks Qui! Worked perfectly. I do enjoy being able to use pogoplug's "access anywhere" service, but it's just so buggy. However, I'd like to walk away with some features in there with the archlinux install. For instance, when we install the my.pogoplug service back into archlinux, is it possible to have the eject command from my.pogoplug.com actually eject a drive? Right now I have a python script running as a systemd service that allows me to use the eject button on the v4 to eject and shutdown the unit. However, when I try to use the eject link in 'Settings' on the my.pogoplug.com site, it doesn't work. Do you know how that link interacts with the unit and can that be mimicked in archlinux with the reinstall of the my.pogoplug service? Thanks.

    ReplyDelete
  10. Hi Qui: Any plans to update your instructions now that Debian Rootfs 3.17 is out and Kernel 3.18 is out?

    ReplyDelete
    Replies
    1. Not sure. The instructions are provided here: http://forum.doozan.com/read.php?2,12096

      Would you be willing to test for me? Hit me up on the contact me form.

      Delete

  11. This same thing happened to me as well

    "PatrickFebruary 9, 2015 at 6:26 PM: It booted without issue. However, if it doesn't have anything plugged into it, it still cycles through blinking green then blinking red, then power cycles. Rinse and repeat indefinitely."

    but I have no ssh connection.
    and does not detect the network
    how can I solve

    ReplyDelete
  12. Hi Qui Hong
    Long story make short:I installed samba using the optware/samba approach on an SD card but due to the fact that it only allows files no bigger than 3 gb i decided to go forward with a more compelx mod. I did all the arch linux installation on my new (and second on the "tunning" list) Pogoplug v4 for several times following the link below
    https://entechlog.wordpress.com/2014/08/10/pogopluge02-v4-arch-linux-samba-webmin-and-my-pogoplug-com-service/

    but everytime i finished and restarted it, it always stayed on infinite green blink status ...... After as i mentioned, several attempts following the archlinux tutorial i always use the revert approach that basically uses a blank usb drive with a folder named "revert" as described on the Official ArchLinuxArm page. it always works as long as you maintain the ArchLinux official image which i did. But recently on the last two attempts on making samba work, it seems that something did not went completely good on the revert process since i wrote the Wget command on Putty and i got the following message:
    / # wget
    -sh: wget: not found

    so Qui Hong,after this huge introduction, i would really appreciate some advicin from your side with two things:
    1. I would like to fully revert my pogo to stock using a different approach than the blank usb one. I was thinking on following the steps described on your other post (http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html) flashing a new firmware but using the uboot.mtd0.dockstar.original.kwb that you posted here. However, since you have a lot of experiance on the field i will follow your recommendations.

    2. i would like to FINALLY enjoy my pogo with Samba fully functional and pogoplug service with the confidence that if i reboot the device or the energy on my house fails and it has to restart, it will succesfully reboot and work. So of you could also lead me to the right steps and tutorials it would be excellent.

    So any advice from your side will be very appreciated.
    P.S. i already revive a pogo from almost complete death as noted here (http://forum.doozan.com/read.php?3,19081) so i might understand a bit the risks and i wouldn't like to mess it up again.

    Thanks again in advance!!!!

    ReplyDelete
    Replies
    1. Hi Felipe,

      I actually posted my recommendation in the thread you linked to. Long story short, follow my http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html tutorial.

      Qui

      Delete
    2. What about the part about booting default os when sd is not attached, should i follow the instructions there, or the ones in this post?.
      and another one, dos this step means that if i unplug everything i will loose the whole process and will have to start over again next time i plug my sd card?
      thanks!

      Delete
    3. It depends on what you're running. If you're running the stock Pogoplug OS, follow the other tutorial. If you're already running Debian/ALARM, follow this one. No

      Delete
  13. Hello,

    I installed uboot from archlinuxarm.
    Is there a way to install your verion now?
    Would like to add the pogo os to the boot list.

    Am running archlinux now.

    thx for your help.

    ReplyDelete
    Replies
    1. Yes, install the uboot in this tutorial and then follow this tutorial afterwards.

      http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html

      Delete
  14. Hello, I did followed your tutorial to install debian in a pogoplug v4 and all is ok except for the poor samba performance.

    Now I would like to boot from pogoplug os with the usb attached, and I wonder if the following commands are enough:
    apt-get install mtd-utils uboot-envtools wget
    ubiattach /dev/ubi_ctrl -O 2048 -p /dev/mtd4
    mkdir /tmp/mtd4
    mount -t ubifs ubi0:rootfs /tmp/mtd4
    cd /tmp/mtd4
    fw_setenv bootcmd 'run bootcmd_pogo; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset'

    I don't know if the folowing line need to be modified:
    fw_setenv bootcmd_pogo 'if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi'

    Could you confirm it?

    Thanks for your great work.

    ReplyDelete
  15. Hi, I followed your instructions and my Pogoplug v4 seems to be correctly booting into the stock OS when no bootable drives are attached. However, I did not pay attention to the "stock" uboot you provide actually appearing to be from a Dockstar, which seems to result in the SATA port on the top of the Pogoplug being disabled. I believe that the actual original Pogoplug Uboot is provided here: http://forum.doozan.com/read.php?3,16789,16789#msg-16789. Would it be possible for me to replace the Dockstar Uboot with that one? Thanks.

    ReplyDelete