How to Mount Your Pogoplug on Linux Automatically

June 23, 2013 by
Filed under: HowTo, linux, Linux Mint, Ubuntu 

I recently received a Pogoplug as a birthday gift. If you're not familiar with the Pogoplug, it is a small Linux based plug computer that allows you to share personal files over the web. You can think of it as your own personal cloud storage server. While you can always access your Pogoplug files through the web interface, it's nice to have local access to the files straight from your file manager. In this tutorial I'll show you how to mount the Pogoplug on Linux and how to get it to mount automatically when your computer boots. I'll be writing these directions for Ubuntu Linux 12.04, (I'm using Kubuntu 12.04 actually), but it should work similarly for other versions and distributions. I'm assuming that you've already plugged your Pogoplug into your router, activated it, and you can access your files through the web interface at http://my.pogoplug.com.

My Pogoplug E02G

My Pogoplug E02G

Finally, a word of warning. If you mess this up you could end up using all of your RAM and crashing your system. So if you're not comfortable with rescuing a broken system you may want to stop after learning to mount the Pogoplug manually.

Download  pogoplugfs

pogoplugfs is the driver software you'll need to mount your Pogoplug as a local file system on Linux. There are two different versions of the software based on whether you're using a 32 bit or 64 bit version of Linux. If you're not sure whether you're using 32 bit or 64 bit Linux, open a terminal window and enter the command:

Affiliate Link
uname -i

If you're on 64 bit, you should see something like x86_64 as a result. If you're on 32 bit Linux, you should see something like i386 or i686 as a result.

OK, now that you know your architecture, let's get started. Go to your terminal window and create a directory to work in temporarily.

mkdir pogo
cd pogo

Now we'll download the needed software from pogoplug.com.

For 32 bit:

wget http://download.pogoplug.com/install/linux/pogopluginstall.tar.gz && tar -xzf pogopluginstall.tar.gz

For 64 bit:

wget http://download.pogoplug.com/install/linux/pogopluginstall-64.tar.gz && tar -xzf pogopluginstall-64.tar.gz

Install pogoplugfs

Now that you've downloaded the Pogoplug file system driver, you need to put it somewhere in your executable path. You could put it somewhere under your Home directory,  but I prefer to put it in a place more generic to the system. I'm going to put it under /usr/local/bin. You need to do this as root, so for Ubuntu I'll use sudo.

sudo cp ./pogoplugfs /usr/local/bin

Create a mount point for the Pogoplug

Now you need to create a mount point for the Pogoplug. This is the location in your file system where the Pogoplug's files and folders will show up. Since Ubuntu normally mounts USB drives under /media, that seems like a good place for the Pogoplug as well.

sudo mkdir /media/pogoplug

Now make sure that the mount point is owned by the user root and the group fuse.

sudo chown root:fuse /media/pogoplug

And finally, we need to change the permissions of the mount point.

sudo chmod 775 /media/pogoplug

Add your ID to the fuse group

In order to mount your Pogoplug, your ID needs to be a member of the fuse group. You can check to see if you're already a member with the groups command.

groups

My output looks like this:

linerd adm cdrom sudo dip plugdev lpadmin sambashare

As you can see, the fuse group isn't listed, so I'll need to add myself to the fuse group.

sudo usermod -aG fuse $(id -un)

You'll have to log out and log back in before the change takes place. (Make sure to bookmark this page so you can get back to it.) After you log back in, you can use the groups command again to verify that you're now part of the fuse group.

Mount the Pogoplug

Now that you've made the change to your group membership, you should be able to mount the Pogoplug.

pogoplugfs --user [email protected] --password YourPassword --mountpoint /media/pogoplug &

Of course, make the appropriate substitutions using the email address and password you used to register your Pogoplug. If you open your file manager and navigate to /media/pogoplug, you should now see some folders. There will probably be a folder called Team Folders that will be empty.  This is used if you've registered for Pogoplug's team collaboration service. If you haven't registered for that service it will just be an empty folder. The other folder will be named however you named your Pogoplug device on the Pogoplug web interface.

Pogoplug mounted on Linux

Pogoplug mounted

Mount the Pogoplug on Linux Automatically

If all you want to do is occasionally mount your Pogoplug, then you already know the command and you can just use that when you need it. I prefer to have the Pogoplug mount automatically every time I start up my computer so it's just like another hard drive on my machine.

The first thing you need to do is create a configuration file under /etc that will hold your login credentials for the Pogoplug. Create and edit the file as root using your preferred text editor. I'll use nano.

sudo nano /etc/pogoplugfs.conf

Enter the following into the file, again making the appropriate substitutions.

#This is the defaults file for mounting the Pogoplug with pogoplugfs

svcuser=[email protected]
svcpassword=YourPassword

Use [CTRL-O] to save the file and then [CTRL-X] to exit. Now it's kind of scary having your login credentials stored in plain text, so we'll change the permissions on that file so that regular users can't read the file. Unfortunately, we'll still need the file readable by the fuse group, so it's still a bit of a security risk for your pogoplug account if someone were able to gain access to your machine. You've been warned.

sudo chmod 640 /etc/pogoplugfs.conf
sudo chown root:fuse /etc/pogoplugfs.conf

Next we're going to make a script to mount the Pogoplug. Again, use your favorite text editor.

sudo nano /etc/init.d/pogomount

Paste the following content into the file.

#! /bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start:     $remote_fs $syslog
# Required-Stop:      $remote_fs $syslog
# Should-Start:       $named
# Default-Start:      2 3 4 5
# Default-Stop:       1
# Short-Description:  Mount pogoplug
# Description:        Mount Pogoplug with pogoplugfs
### END INIT INFO

sleep 10
sudo -u YourID /usr/local/bin/pogoplugfs --mountpoint /media/pogoplug

exit 0

Make sure to replace YourID with your Linux login ID. Save the file with [CTRL-O] and exit with [CTRL-X]. Now change the permissions of the script to make it executable.

sudo chmod 755 /etc/init.d/pogomount

Finally, we will edit /etc/rc.local to call the pogomount script during the boot process.

sudo nano /etc/rc.local

Now paste the following lines above the exit 0 line.

#Mount Pogoplug
/etc/init.d/pogomount

Save the file with [CTRL-O] and exit with [CTRL-X].

That's it. Your Pogoplug should automatically mount when you reboot your computer. This of course assumes that your computer is able to access the network during the boot process. If you can't get Internet access until you join a wireless network after logging in, then this won't work for you.

Troubleshooting

The sleep command in the pogomount script is there because I was having a problem on my computer where the script was trying to mount the Pogoplug before the network connection was fully up. I'm sure there's a more elegant way to handle this, but the sleep command works for me. If you find that your Pogoplug isn't mounting at boot time, try increasing the sleep time.

If you want to unmount the Pogoplug, use the following command.

sudo umount /media/pogoplug

To manually mount it again, use:

nohup pogoplugfs --mountpoint /media/pogoplug &

The nohup command will make sure that the Pogoplug stays mounted even after you close the terminal window.

To see all of the options for pogoplugfs, use

pogoplugfs --help

If your system is crashing, then reboot into recovery and get a root login prompt. By default you will then be in your system with read only permissions. You will need to remount the root file system with read write permission to make changes to the boot scripts. You can remount read write with

mount -o rw,remount /

Credits

The following page was helpful in figuring this all out: http://brianhiggins.com/?p=5915

Conclusion

The Pogoplug is a really neat device and if you search the net you can even find them for under $30 sometimes. It's hackable and there are versions of Arch Linux and Fedora you can run on this ARM based computer. I just got another Pogoplug so I can use one unmodified and hack the other to try turning it into a media server. Have you hacked a Pogoplug or do you have plans to? What special purpose do you have in mind for it?

 

This content originally appeared at http://tuxtweaks.com/2013/06/mount-your-pogoplug-on-linux/

Comments

7 Responses to “How to Mount Your Pogoplug on Linux Automatically”

  1. Herve says:

    Manual and automatic pogoplug mount work great on Ubuntu 14.04. Thank you very much!

  2. john says:

    Tried this on Linux Mint 16 Mate and it worked great.
    Tried it on Fedora and nothing happens. There is not a fuse group, just a wheel group. Tried to mount Pogoplug with mount command and still does not work.
    Thanks for the info, can now access in Mint.
    All of my Linux distros are in virtual drives so if I mess one up I can just copy over a backup and try again. Still have one more to try this on, but it is also Unbuntu based so it should work on it as well.

  3. bob johnson says:

    100% smooth. I had tried other sites for help, including the one credited here, but this one actually works. Thanks

  4. WacoJohn says:

    Whoa .. found POGOPLUG folder in /media in file manager. Under that are folders of my two POGOPLUG drives and TEAM FOLDERS!! All expected content is shown in each folder. I guess I can't complain about that. Not exacly the end result I expected, but indeed ... my pogoplug iron does appear in File Manager.

    Thank you ... immensely.

    • Linerd says:

      Glad you got it working. :)

      I pounded my head on the desk for hours trying to get the automatic mounting to work and it was that little sleep command that finally did the magic. I'll have to go through this again soon since I just got another Pogoplug. My E02 is now running Debian with Plex Media Server to feed my smart TV.

  5. WacoJohn says:

    Everything went perfectly ... until "Mount the Pogoplug on Linux Automatically". I followed instruction 'to the letter' .. and have not seen POGOPLUG in File Manager since. I am on Lubuntu 12.04 using PCManFM. I have increased the sleep time to 15 .. no joy. What is most upsetting is that:

    wacojohn@ubuntuCOMPAQ:~$ sudo umount /media/pogoplug

    [sudo] password for wacojohn:

    wacojohn@ubuntuCOMPAQ:~$ pogoplugfs --user john(xxxxx)@xxxxxxxx.com --password xxxxxxxxxxxxx --mountpoint /media/pogoplug &

    [1] 1964

    wacojohn@ubuntuCOMPAQ:~$
    (blank lines for clarity)

    does not (now) mount (or at least show in File Manager) either. It did before the 'automatic' step. Hopefully you will get back to me. If not .. hopefully 'reversing' the tutorial will take me back to the beginning. I am not a seasoned Linux user.

    Otherwise .. excellent tutorial. Worked flawlessly until I took that last step. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>