Friday, March 29, 2013

[Tutorial] - Pogoplug E02/V4 with Arch Linux ARM - NAS (SAMBA), AirPlay, AirPrint, Google CloudPrint, SqueezeBox (Logitech Media Server), SqueezeLite, Plex Media Server

Pogoplugs sporting 1TB USB HDs, USB DACs and USB Wifi

In this tutorial I'm going to show you how to setup the following on a Pogoplug running Arch Linux ARM (aka ALARM for short).

SAMBA (NAS)
   - enable swapfile
Apple AirPlay
SqueezeLite Player (Logitech Media Server/SqueezeBox Client)
SqueezeBox (Logitech Media Server)
Plex Media Server
Apple AirPrint
Google CloudPrint
Re-install my.pogoplug.com service
Enable uPNP/DNLA (my.pogoplug.com)
Wireless Configuration
Motion Webcam
BitTorrent Sync
Transmission, Sabnzbd, SickBeard and CouchPotato
Sonarr (aka NZBDrone)
OpenVPN (client)
Webmin
Mongoose (Simple Web Server)
OwnCloud (nginx php-fpm sqlite)
Backup and Restore ALARM

Requirements:


Want to take a small gamble? Pick up the Pogoplug P21 or P22 (Black) or Pogoplug B01 (Pink). Even though the box is labeled as a P21/P22/B01, chances are the Pogoplug itself will be a E02 model. I've bought at least 6 P21/B01 from various vendors - Adorama,  JR.com, and Ebay - and so far I have only received E02. Note that recently a small percentage of users (~20-30%)  have reported receiving a new P22 model which isn't supported under Arch Linux ARM.

Ebay is another good source for the Pogoplug E02.

Check the bottom of the Pogoplug to confirm Model number. Ignore the Model number listed on the box.

The E02 model is the ideal choice with 256MB RAM and a 1.2Ghz CPU versus other models (Series 4) which only has 128MB RAM and 800Mhz CPU. Don't get fooled by the USB 3.0 Ports in the Series 4 model; the CPU is a bottleneck and there is no performance difference with the USB 3.0 ports. Saying that, I like the Pogoplug Series 4 form factor with its SATA USM slot. For the Pogoplug Series 4, I would recommend the USM slot compatible Seagate Backup Plus 1 TB USB 3.0 Portable Hard Drive.


Pogoplug Series 4 with (USM Compatible) Seagate Backup Plus 1TB USB 3.0 Portable HD

This will be a work in progress, so please excuse the typos and grammar. Arch Linux ARM is constantly changing, so not everything is guaranteed to work.

Note/FAQ Troubleshooting:
- Watch out for run-on commands. I'm having issues with the blogger editor.
- For bootup issues, see Troubleshooting ALARM Boot Up Issues near the end.

Assumptions:
 - Pogoplug is installed behind a Router/Firewall on a secured LAN (home use only)
 - The Pogoplug is new and hasn't been registered on my.pogoplug.com. If it was, you may need to enable SSH via my.pogoplug.com. Activation is required for the Pogoplug Mobile/Series 4.

If you only want to setup a simple NAS and/or have a unsupported Pogoplug version V3 (oxnas), please take a look at my Optware Tutorial.

Last Updated: 08/18/2015

Note that with OpenSSH 7.0, SSH root login is disabled. Please try alarm/alarm instead. Switch to root by using the "su" command and password of "root".

Official Arch Linux ARM Installation Instructions:

Official Instructions for installing Arch Linux on the Pogoplug E02 can be found here:
http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray#qt-platform_tabs-ui-tabs2

Note that the uBoot installation instructions from archlinuxarm.org does not support booting into the default Pogoplug OS when nothing is attached. My summarized version below uses a different uBoot and will allow you to boot into the default Pogoplug OS when nothing is attached which is very useful for reinstallation.

For the Pogoplug Series 4 and Mobile, please use this tutorial for the latest uBoot (SD Card booting support) and then come back here to complete the installation.
http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html


Pogoplug E02 Arch Linux ARM Installation Instructions (Summarized Version)

Note: If you get a command not found for "wget" or "reboot", try adding "busybox" in front of the command - "busybox wget http://xxx", "busybox shutdown"

Plug in the Pogoplug without any USB drive attached
SSH into Pogoplug
Log in as root/ceadmin. 


#Stop the Pogoplug software
killall hbwd

#Install UBoot
cd /tmp
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh

#Would you like to disable the Pogoplug services? [Y/n]
#n - to keep original Pogoplug software 
#when booting without USB drives attached
#y - if you're not planning on ever using the stock
#Pogoplug software again

#Plug in USB Flash Drive or Hard Drive
#Use the back bottom USB port

If you plan to setup the Pogoplug as NAS using SAMBA with a hard drive, my recommendation would be to install ALARM directly on the hard drive and skip using a USB flash drive. This will avoid some potential boot up issues. To do this, create two partition, a small 4GB partition for ALARM and the rest for data.

#Partition your USB flash/hard drive
/sbin/fdisk /dev/sda

# Type in the following commands to erase
# and re-partition USB flash/hard drive 
#(WARNING - FLASH/HARD DRIVE WILL BE COMPLETELY WIPED): 

# p # list current partitions
# o # to delete all partitions
# n # new partition
# p # primary partition
# 1 (one) # first partition
# <enter> # default start block
# <enter> # default end block (to use the whole drive)
# If you're using a hard drive, create a small
# 4GB partition instead of using the whole drive,
# leaving the rest for a data partition
# +4G # to create a 4GB partition
# w # write new partition to disk

#Format USB Flash Drive
cd /tmp

wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod 755 mke2fs

#format and label partition
./mke2fs -L ROOTFS -j /dev/sda1

#mount usb flash drive
mkdir -p /tmp/usb
mount /dev/sda1 /tmp/usb


#Download Arch Linux ARM (aka ALARM)

#and extract to USB Drive:
cd /tmp/usb
wget http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz
tar -xzvf ArchLinuxARM-kirkwood-*.tar.gz
#Unmount USB Drive and reboot
rm ArchLinuxARM-kirkwood-*.tar.gz
sync  # Takes a while when using a flash drive
cd ..
umount /tmp/usb

#Update uboot env variables
#Have uboot mount partition as ext3 
#safer in power outages
#E02 only, V4 defaults to ext3 already
/usr/sbin/fw_setenv usb_rootfstype ext3

#Correct machid - make LED Green versus Orange
#Only for E02
/usr/sbin/fw_setenv machid dd6

reboot

Note that after the reboot, the IP Address of your Pogoplug may have changed. However, you should be able to ping it by name - "ping alarm". Otherwise double check your router or use a IP scanning tool like AngryIP (Legacy) to confirm the IP Address of your Pogoplug.

SSH back into your Pogoplug and login with the username and password of root/root. If root/root doesn't work, please try alarm/alarm. If you're using putty and still having issues, make sure to download the latest version. 


Success? Congratulations! At this point, Arch Linux is now running on your Pogoplug.

Initial Arch Linux ARM Configuration and Package Installation


#Switch to root, password root
su

#Upgrade kernel and install some initial packages
#Hit Enter when prompted with "Enter a selection (default=all):"
#'Y' when prompted with linux-kirkwood and linux are in conflict.
#Remove linux? [y/N]
#Go get some coffee
pacman -Syu linux-kirkwood linux-kirkwood-headers ntp base-devel nano wget rsync

#list timezone
timedatectl list-timezones

#set timezone
timedatectl set-timezone America/Los_Angeles

#autostart ntp 

#pogoplug has no hardware clock
systemctl enable ntpd

systemctl start ntpd

#Generate New OpenSSH Keys
rm /etc/ssh/ssh_host*
ssh-keygen -A

reboot


SAMBA Server - Setup your Pogoplug as a Network Attached Storage (NAS)

The Pogoplug makes an excellent NAS. Expect read/write performance between 23MB-28MB/s on a wired gigabit network using ext3/ext4. If you are using a 10/100Mb network, expect a maximum transfer rate of 9-10MB/s, which is the limit of 10/100Mb network. Wireless will be slower. Using NTFS partition will also affect performance (don't use it).

If you plan to setup the Pogoplug as NAS using SAMBA with a hard drive, my recommendation would be to install ALARM directly on the hard drive and skip using a USB flash drive. This will avoid some potential boot up issues. To do this, create two partition, a small 4GB partition for ALARM and the rest for data.

The instructions below assumes you have ALARM installed on the first partition of your USB hard drive. Replace "/dev/sda2" (second partition on first hd) with "/dev/sdb1" (first partition second hard drive) if you have ALARM installed on a USB Flash Drive and adding a new USB Hard Drive for SAMBA.

Note that these instructions are only applicable to 2TB drives or less. If you have a 3TB drive, you need to use gdisk to setup a hybrid MBR, which is not covered in this tutorial.





#Create a 2nd Partition on your USB Drive
/sbin/fdisk /dev/sda

# Type in the following commands to create a 2nd
# partition on your USB hard drive 
#
WARNING - HARD DRIVE SHOULD NOT CONTAIN ANY DATA, 
EXCEPT ALARM INSTALLATION ON 1st PARTITION
p       # list current partitions
# n       # new partition
# p       # primary partition
# <enter> # default to second partition
# <enter> # default start block
# <enter> # default end block #use the whole flash drive
# w       # write new partition to disk

#Format newly created 2nd partition, label as USB
#a reboot may be required for new partition 
#to be recognized
mkfs.ext3 -L USB /dev/sda2

#mount disk
mkdir -p /media/usb

#mount 2nd partition (/dev/sdb1)
mount /dev/sda2 /media/usb

#install samba and upgrade everything
pacman -Syu samba

#Create folder we'll be sharing
#will also hide the swap and lost+found folder
mkdir -p /media/usb/share

#download example smb.conf for public share
#no authentication require, everyone has 
#read/write access to / (root$) and usb (/media/usb/share)
cd /etc/samba
wget http://dl.dropbox.com/u/42238/pogoplug/v2/smb.conf

#Edit smb.conf (optional)
#change name, add additional shares
#nano /etc/samba/smb.conf


#mount after reboot
#all one line
echo "LABEL=USB /media/usb ext3 rw,noatime,nofail 0 0" >> /etc/fstab


#start samba
systemctl start smbd nmbd

#autostart samba on reboot
systemctl enable smbd nmbd

#test from computer: 

#\\pogoplugIPAddress\root$
#\\pogoplugIPAddress\usb

#reboot and test

reboot

Enable Swap File

Only create a swap file if you're using a hard drive. It is not recommended to setup a swap file on a USB flash drive as it can wear out and fail.

#This will create a 1024MB swap file
#Named "swapfile.img" in /media/usb (USB HD).
dd if=/dev/zero of=/media/usb/swapfile.img bs=1M count=1024

mkswap /media/usb/swapfile.img

#update swap file permissions
chmod 0600 /media/usb/swapfile.img

#You can now turn the swap file on using:
swapon /media/usb/swapfile.img

#check if swap is enabled
free

#turn swap off by using:
#swapoff /media/usb/swapfile.img

#enable swapfile on reboot
echo "/media/usb/swapfile.img none swap sw,nofail 0 0" >> /etc/fstab

#reboot and test
reboot
free


Apple AirPlay (aka Shairport) - Stream music from your iOS Device or iTunes

Compatible/Recommended USB Sound Cards (Plug and Play)

#Install some required packages
pacman -Sy libao alsa-utils avahi libpulse

#audio fix
echo "use_mmap=no" >> /etc/libao.conf


#Configure alsa - asound.conf file
cd /etc
wget https://dl.dropbox.com/u/42238/pogoplug/v2/asound.conf


#download pre-compiled version of shairport
#compiled 6/26/2014
cd /usr/local/bin
wget http://dl.dropbox.com/u/42238/pogoplug/v2/shairport


#make shairport executable

chmod a+x shairport

#or compile shairport on your own
cd /tmp
wget --no-check-certificate https://github.com/abrasive/shairport/tarball/master
tar xzf master
cd *shairport*
make
make install

#restart dbus
systemctl restart dbus

#autostart avahi-daemon
systemctl start avahi-daemon
systemctl enable avahi-daemon

#start shairport and test
shairport -a Living_Room -v


#Test, Control C to stop

#autostart shairport on reboot
#edit shairport.service file to update AirPlay name
cd /etc/systemd/system

wget http://dl.dropbox.com/u/42238/pogoplug/v2/shairport.service

#start shairport and test

systemctl start shairport
systemctl status shairport

#autostart shairport on reboot
systemctl enable shairport

#reboot and test
reboot

#Schedule ShairPort to restart daily
#switch editor to nano
export EDITOR="/usr/bin/nano"

#edit/create crontab
crontab -e

#paste in the below and exit
#restart shairport @ 5AM everyday
00 05 * * * /usr/bin/systemctl restart shairport


#list crontab
crontab -l



Adjusting the volume

#Find name of mixer control
#Typically PCM or Speaker
amixer

#Simple mixer control 'PCM',0
#  Capabilities: pvolume pswitch pswitch-joined
#  Playback channels: Front Left - Front Right
#  Limits: Playback 0 - 38
#  Mono:
#  Front Left: Playback 27 [71%] [-8.26dB] [on]
#  Front Right: Playback 27 [71%] [-8.26dB] [on]

#set volume to 90%
amixer set PCM 90%


#save setting
alsactl store

#Troubleshooting commands
lsusb
aplay -L
cat /proc/asound/card0/pcm0p/sub0/hw_params



SqueezeLite Player (SqueezeBox/Logitech Media Server Client)

pacman -Sy faad2 libmad mpg123 libao alsa-utils avahi
#if not already done
#audio fix
echo "use_mmap=no" >> /etc/libao.conf


#Configure alsa - asound.conf file
cd /etc
wget https://dl.dropbox.com/u/42238/pogoplug/v2/asound.conf


mkdir -p /usr/local/bin
cd /usr/local/bin

#download the latest squeezelite version

wget http://squeezelite-downloads.googlecode.com/git/squeezelite-armv5te
mv squeezelite-armv5te squeezelite

#make executable
chmod a+x squeezelite

#download service file
cd /etc/systemd/system
wget http://dl.dropbox.com/u/42238/pogoplug/v2/squeezelite.service

#edit name (optional)

#nano /etc/systemd/system/squeezelite.service

#start squeezelite and avahi-daemon
systemctl start squeezelite 
avahi-daemon

#autostart squeezelite and 
avahi-daemon on reboot
systemctl enable squeezelite avahi-daemon



SqueezeBox (Logitech Media Server) Installation



#Install pre-compiled version (7/30/2015)

pacman -U http://dl.dropbox.com/u/42238/pogoplug/v2/logitechmediaserver-7.9.0.arch2-1-arm.pkg.tar.xz
#start logitechmediaserver
systemctl start logitechmediaserver

#autostart logitechmediaserver on reboot
systemctl enable logitechmediaserver

#make music and playlist folder

mkdir -p /media/usb/share/music
mkdir -p /media/usb/share/playlist

#update permissions
chmod 777 /media/usb/share/music
chmod 777 /media/usb/share/playlist

#Configure @ http://pogoplug:9000 or http://ipaddress:9000


LMS Build Instructions

#Requires Swap of 512MB or more
#Takes 3 hours

#Create non-root account for building
mkdir -p /media/usb/share/build

chmod 777 /media/usb/share/build
pacman -Sy sudo adduser
adduser builder
echo "builder ALL=(ALL) ALL">> /etc/sudoers
su builder


cd /media/usb/share/build
wget --no-check-certificate https://aur.archlinux.org/packages/lo/logitechmediaserver/logitechmediaserver.tar.gz
tar -xvzf logitechmediaserver.tar.gz
cd logitechmediaserver
makepkg -Acs

#LMS has a perl version dependency
#pacman -Syu --ignore perl

Plex Media Server

Plex is probably the best solution for accessing your music over the internet using a computer, iPhone or Android device.

Note that Plex on the Pogoplug (ARM in general) does not support transcoding. This means your media need to be natively supported by your Plex Client (e.g., mp4/m4v on iOS devices).

Major kudos to moonman on ALARM forum for providing the PKGBUILD.



#Install pre-complied version (7/25/2015)
pacman -U http://dl.dropbox.com/u/42238/pogoplug/v2/plex-media-server-0.9.12.4.1192-1-arm.pkg.tar.xz

#start plexmediaserver
systemctl start plexmediaserver

#autostart plexmediaserver on reboot
systemctl enable plexmediaserver


#Plex Media Server Build Instructions
#Requires SWAP
pacman -Sy svn
mkdir /media/usb/share/build
chmod 777 /media/usb/share/build


#Create non-root account for building
mkdir -p /media/usb/share/build

chmod 777 /media/usb/share/build
pacman -Sy sudo adduser
adduser builder
echo "builder ALL=(ALL) ALL">> /etc/sudoers
su builder

cd 
/media/usb/share/build
svn checkout https://github.com/archlinuxarm/PKGBUILDs/trunk/aur/plex-media-server

cd plex-media-server
makepkg -A


#Configure @ http://PogoplugIPAddress:32400/manage



If you're having issues adding your media, try changing the permissions on the folder - chmod 777 /media/usb/share/music


AirPrint Server - Print to your non-AirPrint enabled printers

(2/19/2015) - Confirmed working. Cups is now at version 2.0.1. systemctl name changed from cups to org.cups.cupsd.

#Install CUPS and print drivers
pacman -Sy cups gutenprint ghostscript python2-pycups python2 avahi 

#link python to python2
ln -s /usr/bin/python2 /usr/bin/python


#For HP Printer Drivers
pacman -S hplip

#For Samsung Printer Drivers
pacman -S splix

#Backup original cupsd.conf

cd /etc/cups
mv cupsd.conf cupsd.conf.org


#download my cupsd.conf
wget http://dl.dropbox.com/u/42238/pogoplug/cupsd.conf

#Start CUPS

systemctl start org.cups.cupsd

Configure CUPS Printer(s)

Now open up your web browser and go to http://alarm:631/admin.

This part is YMMV. Not all printers will work.


Click the "Add Printer" Button.

In my case, I am using a Brother HL-2270DW (highly recommended, works great and cheap toner) which has built in wireless and supports various printing options - socket, ipp, http, etc. I'm going to use socket (AppSocket/HP JetDirect) which is the same option you would select if you had your USB printer directly connected to your PogoPlug. 


USB attached printers should be auto detected (untested).

For the Brother wireless printer, the Connection address I'm using is "socket://<PrinterIPAddress>:9100" ( for the record "ipp://<PrinterIPAddress>/pcl_p1" would also work).


If you're using a DD-WRT or TomatoUSB Router as your print server, "socket://<RouterIPAddress>:9100", would be the correct Connection address..

Name your printer. Check the "Share This Printer" checkbox. Select the Make/Model of your Printer. Basically you are selecting the drivers to use. For my Brother HL-2270DW, I went with "Generic"->"Generic PCL 6/PCL XL Printer".

Click Add Printer.

Set your Default Options.

Print a test page. Maintenance->Print Test Page.

Printing a test page needs to work. If not, you can not continue. Not all printers will work. Try different drivers (or a different printer) if you're having a problem with printing a test page.


Back in the SSH Console


#download avahi airprint script

mkdir -p /opt/airprint
cd /opt/airprint

#this is all one line
wget -O airprint-generate.py --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py

#make script executable
chmod 755 airprint-generate.py

#add mime types needed for iOS6
echo "image/urf urf string(0,UNIRAST<00>)" > /usr/share/cups/mime/airprint.types
echo "image/urf application/pdf 100 pdftoraster" > /usr/share/cups/mime/airprint.convs

#autostart avahi-daemon
systemctl start avahi-daemon
systemctl enable avahi-daemon

#restart cups to pick up new mime types
systemctl restart 
org.cups.cupsd

#Generate AirPrint service file
cd /etc/avahi/services
/opt/airprint/airprint-generate.py

#Check for AirPrint-<PrinterName>.service file
ls

#Test AirPrint from iOS Device

#autostart cupsd after reboot

systemctl enable org.cups.cupsd


As a reference please check out this posting - [Tutorial] Apple AirPrint on TomatoUSB Router


Google CloudPrint - Print over the internet via Chrome Web Browser. Share your printer with friends/family.

Requires AirPrint Server (Cups) configuration above.
Updated and verified (7/26/2015)
pacman -Sy git

#download cloudprint
mkdir /opt
cd /opt
git clone git://github.com/armooo/cloudprint

#build and install cloudprint
cd /opt/cloudprint
python2 setup.py build
python2 setup.py install



#Run once to create printer. 
#Follow instructions to claim printer.
cloudprint

#Test print from your Chrome we
b browser
#Control+C to close cloudprint

#python2-daemon needed to demonize cloudprint
#Install pre-compiled version
pacman -U http://dl.dropbox.com/u/42238/pogoplug/v2/python2-daemon-2.0.5-1-any.pkg.tar.xz


#setup cloudprint to run on startup via systemd service
cd /etc/systemd/system
wget http://dl.dropbox.com/u/42238/pogoplug/v2/cloudprint.service


#Enable cloudprint service on reboot and start
systemctl enable cloudprint.service
systemctl start cloudprint.service


#Instructions for building python2-daemon from AUR
#https://aur.archlinux.org/packages/python2-daemon/

#mkdir -p /media/usb/share/build
#cd /media/usb/share/build

#switch to non-root account to build
#wget https://aur.archlinux.org/packages/py/python2-daemon/python2-daemon.tar.gz
#tar -xvf python2-daemon.tar.gz
#cd python2-daemon

#makepkg -Acs

#Clear google credentials/auth files
#not sure if this is still valid.
#rm /root/.cloudprintauth
#rm /root/.cloudprintsaslauth


Cloudprint is very fragile. If you're having start-up or printing issues try the following steps.

- Clear your Google CloudPrint Print Queue - https://www.google.com/cloudprint/#jobs
- Delete your stored credential and reboot and start over.

One more thing regarding CloudPrint, my recommendation is to set up a new Google Account dedicated just for CloudPrint. Use this account for the above cloudprint login, and then share your printer(s) with your main account. I'm a little paranoid of having my email authentication stored on my router (even though its hashed or encrypted).


Re-install my.pogoplug.com service (original software) 

Great piece of software. My favorite is the iOS/Android app automatic photo/video backup feature. This is a simple and effective way to backup your phone's camera stream.

[Updated 5/14/2015] - Cloud Engine software was updated to 3.4.5.10

Please go here for latest instructions/update:
http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3343 (Thanks moonman!)

#If upgrading from previous release
#uninstall old version
pacman -R pogoplug

#you may need to delete this file otherwise
#the new package will complain
#rm /usr/local/cloudengines/bin/hbplug.conf

#install pogoplug software
pacman -U https://dl.dropboxusercontent.com/u/15043728/ArchLinuxArm/my.pogoplug.com/pogoplug-3.4.5.10-1-arm.pkg.tar.xz


#download my sample pogoplug.conf file
#if upgrade, you can skip this
cd /etc
wget http://dl.dropbox.com/u/42238/pogoplug/v2/pogoplug.conf

#edit configuration file

#edit vfsdir0
#add svcid (ID) from the bottom of your PogoPlug (no dashes)

nano /etc/pogoplug.conf

##example below: vfsdir<number>=<name>,<path>
#vfsdir0=PogoPlug_USB,/media/usb/share
#installdir=/usr/local/cloudengines
##datadir=.
#datadir=.
#nohotplug=1
##use the ID from the bottom of your Pogoplug 

#26 char (no dashes)
#svcid=35DFBFL73RD2CX5FJMAAAA1111

#tcpport=89


#note /etc/pogoplug.conf will be copied to
#/usr/local/cloudengines/hbplug.conf on service startup 
#hbplug.conf is the file that matters.
#if things are not working as expected, verify
#the content of the hbplug.conf file

#start pogoplug service

systemctl start pogoplug


#autostart pogoplug service on reboot
systemctl enable pogoplug

#reboot and register @ http://my.pogoplug.com

reboot



Enable uPNP/DNLA (my.pogoplug.com)

The Cloud Engine my.pogoplug.com software has a (limited) built-in uPNP/DNLA server. Also note that Plex Media Server and Logitech Media Server both have built in DNLA Servers.

On my.pogoplug.com -> Settings -> Media












Wireless Configuration
Last Updated: 8/14/2013 (needs updating 6/26/2014)

The following USB wireless adapters are Plug and Play:
Alfa AWUS036H (RTL8187)
Etekcity High Power 802.11 B/N/G 300M USB Wireless 1000mw Wifi Network Adapter with Dual Antenna (RT3072) - You can save yourself a few dollars picking up a generic one from China on Ebay.

These USB wireless adapters are not Plug and Play:
Airlink101 AWLL5099
Mini Wireless 150Mbs USB Ralink RT5370


NETCFG has been replaced by NETCTL
https://wiki.archlinux.org/index.php/Netctl


#install netctl and related packages
pacman -Sy wireless_tools netctl ifplugd wpa_actiond dialog

#Connect to wireless network and create wireless profile
cd /etc/netctl
wifi-menu


#check if wireless profile got created
#you should see wlan0-SSIDName
ls /etc/netctl

#Auto Connect to Wireless Network
systemctl enable netctl-auto@wlan0.service

#Auto Connect to Wired Network
systemctl enable netctl-ifplugd@eth0.service

#reboot and test
ifconfig
iwconfig


Motion WebCam

Attach a USB Webcam to your Pogoplug and turn it into a surveillance system.
More info - http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide

Confirmed working with:
Logitech HD Webcam C270


#install motion and other required packages
pacman -S motion x264 fswebcam

#change to motion folder and edit motion.conf file
cd /etc/motion

#turn off localhost access only
sed -i 's:webcam_localhost on:webcam_localhost off:' ./motion.conf

#adjust resolution to 640x480
sed -i 's:width 320:width 640:' ./motion.conf
sed -i 's:height 240:height 480:' ./motion.conf

#disable http remote control
sed -i 's:control_port 8080:control_port 0:' ./motion.conf

#change webcam http port to 8088
sed -i 's:webcam_port 8081:webcam_port 8088:' ./motion.conf

#change folder where picture/video are saved
sed -i 's:/usr/local/apache2/htdocs/cam1:/media/usb/share/motion_capture:' ./motion.conf

#create required folders
mkdir -p /var/run/motion
mkdir -p /media/usb/share/motion_capture
#Start motion and access webcam @ http://pogoplug:8081
#Bug in Chrome, no longer allow you to view stream.
#Use Firefox or VLC

#A little hack to get motion to detect webcam correctly
fswebcam -r 320x240 -d /dev/video0 -v /dev/null

#start motion (non-daemon mode)
motion -n

#download service file, includes fswebcam hack
cd /etc/systemd/system
wget http://dl.dropbox.com/u/42238/pogoplug/v2/motion.service

#auto start motion on reboot
systemctl enable motion

BitTorrent Sync

BitTorrent Sync is a free utility that uses the bittorrent protocol to keep folders in sync across devices. It can be used with OS X, Windows, Android and Linux.

#create folder
mkdir -p /usr/local/bin
cd /usr/local/bin

#download and untar
wget http://download-new.utorrent.com/endpoint/btsync/os/linux-arm/track/stable
tar -xzvf stable

#delete unneeded files
rm LICENSE.TXT stable

#create default btsync.config

btsync --dump-sample-config>/etc/btsync.conf

#download service file
cd /etc/systemd/system
wget http://dl.dropbox.com/u/42238/pogoplug/v2/btsync.service

#start btsync
systemctl start btsync

#autostart btsync on reboot
systemctl enable btsync


#http://pogoplug:8888/gui



Transmission, Sabnzbd, SickBeard and CouchPotato

Requires a swap partition or swapfile - 1GB recommended.

pacman -Sy sabnzbd sickbeard-git couchpotato-git transmission-cli python2-pyopenssl

#start and stop all apps to create config files
systemctl start transmission sabnzbd couchpotato sickbeard

#check status
systemctl status transmission sabnzbd couchpotato sickbeard

#shut them down
systemctl stop transmission sabnzbd couchpotato sickbeard

#transmission - allow login from any computer
cd /var/lib/transmission/.config/transmission-daemon/

sed -i 's^"rpc-whitelist-enabled": true^"rpc-whitelist-enabled": false^' ./settings.json

#sabnzbd - allow login from any computer
cd /opt/sabnzbd
sed -i 's^host = localhost^host = 0.0.0.0^' ./sabnzbd.ini

#start all
systemctl start transmission sabnzbd couchpotato sickbeard


#auto start after reboot
systemctl enable transmission sabnzbd couchpotato sickbeard

#make sure you change the permission of your folders appropriately
#chmod 777 /media/usb/share/downloads

# sabnzbd - http://alarm:8080
# couchpotato - http://alarm:5050/
# sickbeard - http://alarm:8081/
# transmission - http://
alarm:9091

Sonarr/NzbDrone


#SONARR/NZBDRONE
pacman -Sy mono mediainfo sqlite3
cd /opt
mkdir sonarr
cd sonarr
wget http://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz
tar xvfz NzbDrone.master.tar.gz
cd NzbDrone
mono --debug NzbDrone.exe
cd /etc/systemd/system

#Enable sonarr service on reboot and start
systemctl enable sonarr.service
systemctl start sonarr.service

#Give it plenty of time to startup
#http://IPAddress:8989


TimeMachine Backup
Configure Netatalk in Arch Linux for Time Machine Goodness


OpenVPN (Client)

As a reference please check out my other two tutorials on OpenVPN:
[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN
[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN (TomatoUSB)


pacman -Sy openvpn

#generate keys on CA and copy them over
mkdir -p /etc/openvpn/keys

#copy sample client.conf to /etc/openvpn
cp /usr/share/openvpn/examples/client.conf /etc/openvpn

#edit openvpn client.conf
nano /etc/openvpn/client.conf

#Update the following lines
#remote vpnserverIPAddress 1194
#ca /etc/openvpn/keys/ca.crt
#cert /etc/openvpn/keys/pogoplug.crt
#key /etc/openvpn/keys/pogoplug.key

#start VPN manually to test
openvpn --config /etc/openvpn/client.conf

#autostart OpenVPN client on reboot
systemctl enable openvpn@client.service

Webmin

pacman -Sy webmin perl-net-ssleay nano


#allow any IP to connect
sed -i 's^127.0.0.1^0.0.0.0^' /etc/webmin/miniserv.conf

#start webmin
systemctl start webmin

#auto start after reboot
systemctl enable webmin


#https://PogoplugIPAddress:10000


Mongoose (Simple Web Server)
https://code.google.com/p/mongoose/


pacman -U http://dl.dropbox.com/u/42238/pogoplug/v2/mongoose-3.7-1-arm.pkg.tar.xz


pacman -Sy php-cgi

#Optional - Edit mongoose.conf

#nano /etc/mongoose/mongoose.conf

systemctl start mongoose
systemctl enable mongoose


#place files in /srv/http
#Access Web Server @ http://PogoplugIPAddresss:8088


OwnCloud (nginx php-fpm sqlite)

Note - I'm no longer actively working on owncloud. The default PogoPlug software works well enough for my needs. There is a bug with using a self sign certificate (expect a WebDav error). You'll need to mount a different disk for your owncloud data folder - /srv/http/owncloud/data (I was not able to get owncloud working if I used a different data folder path).

pacman -Sy owncloud nginx php-fpm sqlite3 php-sqlite

#copy owncloud files

cd /srv/http
cp -R /tmp/owncloud .

#update owner

chown http:http /srv/http/owncloud 
chown http:http /srv/http/owncloud/config
chown http:http /srv/http/owncloud/apps


#uncomment out required modules
sed -i 's^;extension=gd.so^extension=gd.so^' /etc/php/php.ini
sed -i 's^;extension=xmlrpc.so^extension=xmlrpc.so^' /etc/php/php.ini
sed -i 's^;extension=zip.so^extension=zip.so^' /etc/php/php.ini
sed -i 's^;extension=iconv.so^extension=iconv.so^' /etc/php/php.ini
sed -i 's^;extension=sqlite3.so^extension=sqlite3.so^' /etc/php/php.ini
sed -i 's^;extension=pdo_sqlite.so^extension=pdo_sqlite.so^' /etc/php/php.ini



#Maximum execution time of each script, in seconds
sed -i 's^max_execution_time = 30^max_execution_time = 300^' /etc/php/php.ini



#Maximum amount of time each script may spend parsing request data.
sed -i 's^max_input_time = 60^max_input_time = 600^' /etc/php/php.ini



#Maximum allowed size for uploaded files.
sed -i 's^upload_max_filesize = 2M^upload_max_filesize = 100M^' /etc/php/php.ini



#Maximum size of POST data that PHP will accept.
sed -i 's^post_max_size = 8M^post_max_size = 400M^' /etc/php/php.ini


#Maximum amount of memory a script may consume
sed -i 's^memory_limit = 128M^memory_limit = 512M^' /etc/php/php.ini



#http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configuration

#backup config and download working nginx.conf
cd /etc/nginx 

mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.original
wget http://dl.dropbox.com/u/42238/pogoplug/nginx.conf



#Configure SSL
#http://wiki.nginx.org/HttpSslModule


#create folder to store certs
mkdir -p /etc/nginx/certs
cd /etc/nginx/certs

#Now create the server private key

#you'll be asked for a passphrase
openssl genrsa -des3 -out pogoplug.key 1024

#Create the Certificate Signing Request (CSR):
openssl req -new -key pogoplug.key -out pogoplug.csr

#Remove the necessity of entering a 
passphrase 
#for starting up nginx with SSL using the above private key:
cp pogoplug.key pogoplug.key.org

openssl rsa -in pogoplug.key.org -out pogoplug.key

#sign the certificate using the above private key and CSR
openssl x509 -req -days 3650 -in pogoplug.csr -signkey pogoplug.key -out pogoplug.crt


#start nginx and php-fpm
systemctl start php-fpm
systemctl start nginx

#autostart nginx and php-fpm after reboot
systemctl enable php-fpm
systemctl enable nginx


#Finish configuration via https://PogoPlugIPAddress/owncloud/ or https://pogoplug/owncloud




Backup and Restore

Having a backup is always a good idea and is highly recommended. Its quick and simple and will save you the hassle of re-installation from scratch if anything ever happens to your flash drive (very common) or if you want to duplicate/clone your setup to another Pogoplug.

Offline Backup (Recommended) - These two methods, Disk Image and Tarball, requires unplugging the usb drive you want to backup and plugging it into another linux computer or VM, another pogoplug running ALARM (Arch Linux ARM), or same Pogoplug running alarm using a different USB flash drive.

Credit/Reference

1) Disk Image

#assumes /dev/sdb is the flash drive you want to backup
dd if=/dev/sdb of=/savetopath/pogoplug.e02.rootfs.backup.img bs=4M


#restore, swap if (in) and of (out)
dd if=/savetopath/pogoplug.e02.rootfs.backup.img of=/dev/sdb

2) Tarball (recommended and what I use)

#assumes the flash drive you want to backup is /dev/sdb1

mkdir /tmp/usb
mount /dev/sdb1 /tmp/usb

#backup to root
cd /tmp/usb
tar -cvzf /pogoplug.e02.rootfs.backup.tar.gz ./

#restore
cd /tmp/usb
tar -xzvf /pogoplug.e02.rootfs.backup.tar.gz

Online Backup using rsync
http://mouhassan.wordpress.com/2012/06/30/backing-up-arch-linux-arm-alarm-on-pogoplug/


NTFS Formatted Drives

I'm not a fan of using NTFS drives with the Pogoplug for various reasons - performance, complexity, non-native linux, etc. If you have the option, my recommendation is to keep things simple and dedicate a ext3 formatted drive to your Pogoplug.

However, I understand in certain cases you have no choice - like when your data is already on a NTFS drive and you have nowhere to back it up. So saying that, try the following:

pacman -Sy ntfs-3g udevil
systemctl enable devmon@root.service
systemctl start devmon@root.service
df -h
#you should see your drive mounted under
#/media/xxx

#You might need to edit
nano /etc/udevil/udevil.conf



Please see Obihoernchen's blog for some NTFS performance tip. Also note, people have reported boot up issues with NTFS drives attached.

Again, this is something I don't use so I can not support it. And again, keep things simple and use a dedicated ext3 drive if possible.


Reverting Back to Stock

E02 model only. V4 doesn't have the option to boot to stock OS with USB flash drive unplugged.
Credit to Moustafa.

This isn't truly reverting your Pogoplug back to stock. What it will do is allow you to disconnect your USB flash drive from your Pogoplug and have it boot up to the default Pogoplug OS and connect to the my.pogoplug.com service.

During the uBoot installation, the script asks whether to disable pogoplug service, and the default answer is y

Would you like to disable the pogoplug services? [Y/n]

You can turn back on the my.pogoplug.com service by the following steps:
  1. Boot into original firmware (disconnect all USB drives)
  2. Connect using SSH
  3. Edit /etc/init.d/rcS script, and remove the comment(#) in front of the line reading /etc/init.d/hbmgr.sh start
After rebooting into original firmware again, the my.pogoplug.com services will be available as before.

Troubleshooting ALARM Boot Up Issues

The most common (and frustrating) issue with the Pogoplug and Arch Linux ARM is getting your Pogoplug to boot up consistently. This is not going to be an exhaustive troubleshooting guide, but I did want to point out some things I've learned and experienced that may help you.

- Double check your router for the correct IP Address of your Pogoplug. Otherwise use a network scanning tool like AngryIP (Legacy) to confirm the IP Address of your Pogoplug. On my iPhone, I use a free app call iNet.

- Not all USB drives (flash or hd) will behave the same. Use a high quality name brand USB drive if possible. If you experience boot up issues, try a different USB flash drive or hard drive. I've noted the USB drives that I've had success with above.

- USB flash drive or hard drive is corrupted due to improper shutdown. Plug the flash drive into a linux computer or another Pogoplug running ALARM and perform a fsck.

#/dev/sdb1 = drive and partition that needs fixing
fsck /dev/sdb1

- A cold/hard boot (disconnect/reconnect power cord) can behave differently than a warm boot (executing the 'reboot' command via the console). Yes, very strange. I've experienced where if I do a cold boot, the default Pogoplug OS will boot up and not ALARM. However, if I execute a reboot command from within the default Pogoplug OS, ALARM will boot up properly. I've also experienced the opposite, where ALARM will boot up properly from a cold boot, but if I execute a 'reboot' command via the console, ALARM will not boot properly. This all depends on your USB flash/hard drive. Try the following, it may help and typically it shouldn't hurt. I'm using the below bootcmd for two of my Pogoplugs with Western Digital My Passport drives.

#E02 - Only. Fix boot issue with some USB drives
#credit - http://archlinuxarm.org/forum/viewtopic.php?f=18&t=1717&p=9527#p9527
#print default bootcmd value
fw_printenv bootcmd

#default bootcmd
#[root@pogoplug ~]# fw_printenv bootcmd

#bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; #run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; #reset

#update bootcmd value to start, stop and start usb again
#all one line
fw_setenv bootcmd "usb start; usb stop; usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset"


#confirm update
fw_printenv bootcmd

- If you plan to attach a hard drive for SAMBA, try installing ALARM on a small partition on the hard drive (4GB) and skip using a USB flash drive. This will allow you to avoid any boot up issues related to multiple USB drives attached. [Update - 9/25/2013] I've updated the SAMBA installation section.

- If you have multiple USB drives attached, try Moustafa blog - Booting Pogoplug From The Correct USB Disk. Note that Moustafa's blog isn't applicable if you're having boot up issues with only one USB drive attached.

Setup Netconsole to see what truly is happening. Netconsole allows you to remotely view the Pogoplug boot up process. Here is a tutorial on setting up Netconsole.

- Do a re-installation. Unplug your USB drive and start over. During the uboot installation, reset the uboot env back to default.

- Try using a static IP Address. After installing ALARM to your USB drive (do not reboot), while still in the Pogoplug OS, edit the /tmp/usb/etc/netctl/eth0 file. You'll need to use vi (google if you're not familiar with using vi).

#while in the Pogoplug OS, after installing ALARM
vi /tmp/usb/etc/netctl/eth0

The content of the eth0 file should look like the following:

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.100/24')
Gateway='192.168.1.1'
DNS=('192.168.1.1')

- Corrupted uBoot Environment. You'll need to reset via a Serial console. Please see my tutorial on setting up a Serial Console Connection for the Pogoplug E02.

- On the Pogoplug V4 and Mobile, booting up to the default Pogoplug OS without the USB drive attached is not support; you'll get a green blinking led. If your installation is corrupted or not working for whatever reason and want to reinstall ALARM, you'll need to use another linux computer - http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3312&p=19207#p19207

Miscellaneous Commands

#update hostname to pogoplug
hostnamectl set-hostname pogoplug

#change password
passwd

#poweroff (note that the light will not turn off)
sync #just in case
poweroff

#check what ports are used/listening on
netstat -nptl

#check disk space usage, human readable output
df -h


-------------------------------------------------------------------

That's it for now.

Please leave a comment if this is helpful or if you run into any issues. Thanks

Please consider donating to the Arch Linux ARM group. They are the ones that made this possible.

457 comments :

  1. Thanks for assembling all of this into a single location. It took me a while to dig through the forums and discover that I needed to change the machine id in order to get the green light back. I also appreciate the shairport builds!

    ReplyDelete
  2. THIS IS THE BEST TUTORIAL I HAVE EVER SEEN IN REGARDS TO EXTENDING THE FUNCTIONALITY OF POGOPLUG. THANK YOU VERY MUCH. IT'S SHARP CRISP AND TO THE POINT. A DEFINITE BOOK MARK.

    ReplyDelete
  3. Great tutorial! Have you heard of the downloader called Headphones? If so, do you know if that works good on the Pogoplug and if it could handle sab, couch, sickbeard, transmission & headphones all at one time?

    Again, thanks for such a thorough tutorial, start to finish!

    ReplyDelete
    Replies
    1. It should work, but performance will depend on your usage.

      Delete
  4. Very nice tutorial, all in one place. Thank you. Will give it a try very soon.

    ReplyDelete
  5. This looks great, and I intend to try it out. I have one question first, though. If I reboot the Pogoplug with the USB drive disconnected, will it boot into the standard Pogoplug software? It would be nice to select between the standard Pogoplug installation and ArchLinux, based purely on whether the ArchLinux USB drive is attached.

    A second question: in the SAMBA section, you set up an external drive using ext3. Can the drive be set up as NTFS or even FAT32? I'd like to have a drive that I can dismount and plug directly into a Windows machine should the need arise.

    Thanks for any help! This is new territory for me.

    ReplyDelete
    Replies
    1. 1 - not sure. never had a need to go back to stock.

      2 - yes. not recommended.

      Delete
  6. Hi Qui Hong, I somehow managed to get it running. Had to install pulseaudio. It did some crazy update to the whole system whith all it´s dependencies, but now it´s running. The only strange thing is, that I have a 1gig rootfs now. The system became pretty large, or is that normal? I am just using the pogo for shairplay so far, nothing else installed. how large is your fs on the stick?

    ReplyDelete
    Replies
    1. That's good news. Did you install pulseaudio and configure it and everything or did you just install it? If you configured it, can you share your notes? Otherwise, sounds like you we're missing a dependency.

      1gb rootfs is normal. My rootfs is around 2gb.

      Delete
  7. i just installed it and it began to load all kinds of depended stuff. this stuff also had some conflicts with already installed software, but that didn´t harm the installation. i think that was it and avahi worked. it was late in the night... ;)

    sounds good, I´ll proceed with samba, external hdd etc. I really like your work on this blog article! it was a pain in the ass before you came to find all this info. thanks so much!

    ReplyDelete
    Replies
    1. What USB DAC are you using? Just curious. Thanks

      Delete
  8. found some more. lsusb says this:
    "Bus 001 Device 004: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter". This is it: http://www.speedlink.com/?p=2&cat=17&pid=23371&paus=1

    ReplyDelete
    Replies
    1. I have a similar sound card - 0d8c:000e versus 0d8c:000c.

      Make sure you got mmap disabled properly otherwise you'll get distorted sound. You'll need a default asound.conf file in /etc.

      Take a look at this - http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3686&p=20928&hilit=asound#p20928

      I plan to split out the audio/shairport portion of this tutorial in the future (too complex).

      Delete
  9. I´ve seen that post whenI did my first installation without your tutorial, but actually with this tutorial everything runs just fine. Sound is perfect and crystalclear. Beside the pulseaudio hazzle I had, it runs just nice.

    ReplyDelete
  10. thank you for quick reply
    i will check settings.json file as you adviced.
    i am a noob and there are 2 questions:
    1.how do you delete files from /var/lib/transmission/Downloads after downloads finish?
    2.after i edited preference from /var/lib/transmission/Downloads to media/usb, transmission stopped downloading. so how can i fix it?
    thank you for your attention

    ReplyDelete
    Replies
    1. Sorry, I would suggest looking elsewhere for transmission support.

      Delete
  11. Thanks for the next great tutorial!
    I've managed to get everything working except AirPlay...
    First time I had the same error with starting avahi as mentioned by Dirk Fidde. Somehow I successfully started avahi.service without installing pulse audio, but I got error with libpulse.so when starting shairport. Pacman -S libpulse solved this, got shairport working BUT I can't stream music from AirFoil. iTunes and iPhone AirPlay works great, but when I try to connect from AirFoil to stream music from VLC/Spotify it is dropping connection immediately.

    console output:
    [root@Pogoplug bin]# shairport -a Living_Room -b 282 -vvv
    ERROR: Failed to load plugin /usr/lib/ao/plugins-4/libpulse.so => dlopen() failed #ALREADY FIXED by installing libpulse
    Listening for connections.
    Established under name '883559FC949D@Living_Room'
    received request: OPTIONS * RTSP/1.0
    User-Agent: Airfoil/4.7.5 (Macintosh; N; Intel)
    CSeq: 1
    DACP-ID: AB30101A3D39B694
    Apple-Challenge: oHOeTu/pDjqn/x+JA/Jd5A
    Client-Instance: 6E1D5CC1972851CF
    Active-Remote: 4148683808
    sending response: RTSP/1.0 200 OK
    Apple-Response: sjc72MVtgtWcKRCMW4ZwtiLc3Whlcv0/gobskR6URRBNuBeKDGzVJMYm4D1SKzX7LiH7+HVlQIs0WTYV0GqzdteS1xlEV1edXsxs7QBfnIqQRDJaGb2EMj9d4/2772E6RVnm/eqFdKkCoZ9tNHpLkfs24ii9B12+j2qFHkXyodSpcOaRM7lM/1/O8jJ17PXYpkvba4qOhkRQouZjIj+gj2tvTUziOFJsbNGP13eqNfoA2JPdLs9jvkVykRqNXD2hOXTE1EU06zokvFCSwD76um0df9Z9Zj9s9G/cadgZsBHO9k658QVWa8HhEyaeDgmjluuuemsnentgcbz8+2kqMQ
    CSeq: 1
    Audio-Jack-Status: connected; type=analog
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER
    received request: ANNOUNCE rtsp://fe80::21e:52ff:fe7d:b7e4/3451033766 RTSP/1.0
    Client-computer-name: MacBook (Krzysztof)
    Client-instance-identifier: 54AE8680-C87C-4450-8AFB-CE7A179B1BED
    Active-Remote: 4148683808
    DACP-ID: AB30101A3D39B694
    User-Agent: Airfoil/4.7.5 (Macintosh; N; Intel)
    Client-Instance: 6E1D5CC1972851CF
    Content-Type: application/sdp
    Content-Length: 579
    CSeq: 1
    sending response: RTSP/1.0 200 OK
    CSeq: 1
    Audio-Jack-Status: connected; type=analog
    RTSP connection closed
    received request: OPTIONS * RTSP/1.0
    User-Agent: Airfoil/4.7.5 (Macintosh; N; Intel)
    CSeq: 1
    DACP-ID: AB30101A3D39B694
    Apple-Challenge: wYHInc2kLDMhkXr/nEN3YA
    Client-Instance: 6E1D5CC1972851CF
    Active-Remote: 4148683808
    sending response: RTSP/1.0 200 OK
    Apple-Response: 2tpzeYdoUSb4gRGyY5A/51v8q9kgcrzoaUTO9pftpjEYeF/hLSwJfG+evenzglw2rZPNwek9YqdgkV7STR9f1k0cvijtkZGccXK5pSulm8QDJy7+bphd6u5DcgRdT9RnJW+jQWr2B5LzKED9inbGP/L1ObcHSttug137RHcoWh3cuM1d9IIZelQmmOzQHkflSmUW33fMnhlsK53ZKOGknW67wWgt9iAm04NeZt31s0eGVxcdYaxC+YGff53GGNQWb+TxiXaQ4FFMSxf+hjIKrFLQxedwuBeCJngEwPCgoB27+UNDU/+C+COaaxs7MIZVjKpZ0hNSm3bHdj45OTMcHg
    CSeq: 1
    Audio-Jack-Status: connected; type=analog
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER
    received request: ANNOUNCE rtsp://192.168.0.10/3451033766 RTSP/1.0
    Client-computer-name: MacBook (Krzysztof)
    Client-instance-identifier: 54AE8680-C87C-4450-8AFB-CE7A179B1BED
    Active-Remote: 4148683808
    DACP-ID: AB30101A3D39B694
    User-Agent: Airfoil/4.7.5 (Macintosh; N; Intel)
    Client-Instance: 6E1D5CC1972851CF
    Content-Type: application/sdp
    Content-Length: 571
    CSeq: 1
    sending response: RTSP/1.0 200 OK
    CSeq: 1
    Audio-Jack-Status: connected; type=analog
    RTSP connection closed

    AirFoil is very important for me, so any kind of help will be appreciated.
    I'm sure it IS working with shairport because I had Belkin router with Tomato before (also configured based on Your tutorial) and shairport + airplay + airfoil was working without any problems.

    ReplyDelete
    Replies
    1. Fixed by compiling shairport from
      https://github.com/albertz/shairport/tarbal /f2b52ea9db1723c9c53f5df8da4de7ce90d3129f
      It seems that something must be wrong with version you provided.

      Delete
    2. KaM, glad you got it working. I do not own a copy of Airfoil so I can not test it. I've asked the developer to donate me a copy for testing. We'll see if they will deliver.

      Note that the shairport master branch is obsolete and will be replaced by the 1.0-dev branch.

      Can you do everyone a favor by submitting an official issue regarding Airfoil compatiblity on Github - https://github.com/abrasive/shairport?

      Thanks

      Delete
    3. Finally I found time to sit in front of PC and check whats going on. Didn't have chance to submit this bug earlier, but now it's submitted @github.

      Delete
    4. Hi KaM and Qui Hong.

      I am using a Griffin iMic (old sound adapter with USB) to hopefully connect from Pogoplug to speakers. Currently my AirFoil connection is dropping though as soon as connecting.

      How do I compile from the same tarball of Shairport that KaM used? Do I download it to the pogoplug USB drive, and then run some commands? I am new to linux and have not done a compile yet.

      I think the iMic should work. I tested from my iphone Airplay, which connects fine to the pogoplug. It then plays the music OK but my pseakers play it at a very low volume. This might mean the speakers are not going to work, perhaps. However I hope that the compiling will help matters!

      Delete
    5. just found 2 links by people successfully using griffin imic with Raspberry Pi (also ARM) so this should work. I think I need to do something funky with the asound config files. Can someone post an example config file so I can try and understand what? many thanks again for this tutorial - lots of fun, even if I am not quite there yet!

      Delete
    6. luke, as pointed out above, there is/was an issue with Airfoil. Not sure if the problem has been resolved or not - check github.

      I provide an asound.conf that is compatible with many USB DAC (USB Audio/Sound Cards). If you're having issues with the imic, the problem can easily be solved with the $7 Syba sound card.

      Delete
    7. I also provided instructions for setting the volume. Did you see or try that?

      Delete
  12. I got "There is no enough space on root$" when trying to copy large file(1.5G) from other computer to a NTFS external hard drive mounted using udevil.
    I installed Arch Linux on a 1G flash drive and it has 129M free space.
    I have no problem copy small file from my windows 8 machine to the mounted NTFS hard drive.
    Is it using some disk space on root$ as cache while copying? If so how can I disabled it? Thanks.

    ReplyDelete
    Replies
    1. I am not sure. My recommendation would be to use a >=2GB flash drive and not use NTFS or udevil.

      Delete
  13. Awesome tutorial! Just used this to set up a wireless speaker set in my living room. :)

    ReplyDelete
  14. Thanks for the tutorial on installing samba.

    #install samba
    pacman -Syu samba

    should be used not the -Sy option as the smbd and nmbd services will not start because of a missing library.

    Also.. my pogoplug says B01 on the box but is in fact an EO2 model (on bottom of pogoplug) - I connected a 40GB 2.25" SATA drive through a USB 2.0 bridge and installed unix on that rather than a flash drive - all seems to be functional - next step the airprint server!

    ReplyDelete
    Replies
    1. Thanks John for the suggestion. I'll update the tutorial appropriately. With Arch being a rolling release, its hard to keep the tutorial up to date. Your help is really appreciated.

      As you can see from the picture of my PogoPlug(s), I have 1TB portable USB HD attached to mine. One thing I noticed was that after a hard reboot (unplug AC), the PogoPlug doesn't correctly reboot into ARCH, but instead boots into the default OS. So after a hard reboot/power on, I need to SSH into the PogoPlug and login in with root/ceadmin, and execute a "reboot" command before ARCH is booted properly. Please let me know if you experience this same issue.

      Keep us updated on the AirPrint Server setup...

      Delete
    2. I forget exactly how I did it, but I know I used this to help me ensure things boot correctly:
      http://www.leeandcathy.com/2011/10/persistent-usb-mount-locations-on.html

      Delete
  15. First I would like to say thank you for writing up such a detailed and useful guide, I really appreciate it. I've followed most of it and everything is working great, I'm thinking of adding a 2nd USB hard drive and was wondering if there was anything I should watch out for? I can basically follow the same steps you list for the first USB drive correct?

    ReplyDelete
    Replies
    1. Are you using a USB Flash Drive plus a USB Hard Drive currently? Or just a USB Hard Drive?

      You should not have any major issues with adding an additional hard drive. The only problem I can think of is that sometimes the PogoPlug might have issues with detecting and booting to the proper HD when multiple usb hard drives are attached.

      Thanks for the feedback. Always nice to hear my work is appreciated.

      Delete
    2. Currently I have a flash drive running everything and 1 USD hard drive connected also with all my media. Both were configured per you guide. I just picked up a second USB hard drive that I want to use for file backups, it's currently formatted to NTFS. I was thinking I would connect it and then configure it like the first one by following the same steps in your guide, although I'd give it another name. But now I was thinking that since I reinstalled the Pogoplug software via your guide, maybe I could just plug the 2nd USB hard drive in and let the Pogoplus OS take care of it and it would be separate from my SAMBA shared drive. Does that make sense?

      Delete
    3. Yes, you should be able to just plug in your second USB HD.

      - reformat to ext3
      - add appropriate entry in fstab to mount it
      - update smb.conf if you want to access it via SAMBA.

      Delete
  16. Great tutorial, I performed an installation of samba and tested, everything worked until I rebooted. After reboot, I'm no longer able to SSH in. The flash drive that's connected flashes slowly (showing no activity) almost as if uboot is not booting to the flash drive. I tried disconnecting the power and disconnecting the ext hdd but still no go. Any suggestions?

    ReplyDelete
    Replies
    1. Update: I removed the rootfs flash drive and performed a cold boot and was able to access the default pogoplug system via SSH. I'm going to try netconsole to see what is going on in uboot. From searching around, I suspect that uboot is not identifying the rootfs flash drive correctly.

      Delete
    2. @Randy, from your other comment, looks like you had a bad entry in fstab.

      If you're fstab file has any errors or tries to mount a partition that doesn't exist Arch Linux will not load.

      Delete
  17. By thx for the step by step. I was going over this again and I thought maybe I should append the command and force a "--no-uboot-check" ? Is this my only option? Thanks advance.

    cd /tmp
    wget http://projects.doozan.com/uboot/install_uboot_mtd0.sh
    chmod +x install_uboot_mtd0.sh
    ./install_uboot_mtd0.sh --no-uboot-check

    ReplyDelete
    Replies
    1. If you're doing a re-installation, you can skip the uboot section (only need to be done once per pogoplug device).

      Delete
    2. Just read your other comment with the "Unknown uBoot detected on mtd0" error. Not sure whats going on there. Does not sound like you started with a clean system.

      Delete
    3. Thx Qui, I just recv'd the pogoplug v4 out of the box and doing a clean install following your uboot installation instruction. Should I skip the uboot install and go to format step > and install alarm?

      Delete
    4. To add, this is why I'm considering forcing the uboot just nervous I'd brick the pogoplug. :(

      Delete
    5. @chodaboy,

      Ah..the uboot instructions above are specific to the E02. Here are the instructions for the V4:

      http://archlinuxarm.org/platforms/armv5/pogoplug-series-4

      cd /tmp
      wget http://archlinuxarm.org/os/ppv4/ppv4-install.sh
      chmod +x ppv4-install.sh
      ./ppv4-install.sh

      Everything else is the same. I'll update the tutorial appropriately. Thanks

      Delete
    6. It worked! Thx man! Sorry for the bother but have another question. I have one usb flash drive (4gigs) which I intend to use to boot from and will use another 3TB drive (which I will plug on top-usb in the back) to act as main storage for media server. Once I boot the pogo with both connected: usb to boot from and the 3TB. There shouldn't be an issue with this setup right?

      Delete
    7. Great. Should be fine. Just follow the instructions (don't use NTFS).

      Delete
    8. Yup. So Qui, I got to (below) however after I envoke "reboot" I get -"sh: reboot: not found". So hard booted (turned power off on pogo) and when I power the pogo it just blinks green, I'm assuming it's not booting from the usb boot flash drive. Any suggestions? Sorry for the troubles.. regards

      # This will take a long time
      rm ArchLinuxARM-armv5te-*.tar.gz
      sync # Takes a while when using a flash drive
      cd ..
      umount /tmp/usb

      reboot

      Delete
    9. The default Pogoplug OS on the v4 might be a little different from the E02. In some cases, you may need to add "busybox" in front of your command - "busybox reboot".

      If the "reboot" command wasn't recognized, did the "wget" command work?

      Not exactly sure what your issue is. I would suggest trying a different flash drive. Not all flash drives are the same, and some don't boot properly.

      Delete
  18. I'm installing ArchLinux on one USB HD [120GB]; when I plug in a second [of any size, apparently], the device will not boot [or SSH just never comes ready, can't really tell the difference].

    Suggestions?

    ReplyDelete
    Replies
    1. OK, now with alarm installed on a flash drive, this all works with a single USB HD which has been formatted as ext3. If I plug in either of two 2TB drives, one NTFS and one HFS+, netconsole looks fine but SSH never comes ready.

      U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
      Pogoplug E02
      arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
      GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
      Hit any key to stop autoboot: 0
      (Re)start USB...
      USB: Register 10011 NbrPorts 1
      USB EHCI 1.00
      scanning bus for devices... 5 USB Device(s) found
      scanning bus for storage devices... 3 Storage Device(s) found
      Loading file "/rescueme" from usb device 0:1 (usbda1)
      ** File not found /rescueme
      reading /rescueme.txt

      ** Unable to read "/rescueme.txt" from usb 0:1 **
      Creating 1 MTD partitions on "nand0":
      0x000002500000-0x000008000000 : "mtd=3"
      UBI: attaching mtd1 to ubi0
      UBI: physical eraseblock size: 131072 bytes (128 KiB)
      UBI: logical eraseblock size: 129024 bytes
      UBI: smallest flash I/O unit: 2048
      UBI: sub-page size: 512
      UBI: VID header offset: 512 (aligned 512)
      UBI: data offset: 2048
      UBI: attached mtd1 to ubi0
      UBI: MTD device name: "mtd=3"
      UBI: MTD device size: 91 MiB
      UBI: number of good PEBs: 727
      UBI: number of bad PEBs: 1
      UBI: max. allowed volumes: 128
      UBI: wear-leveling threshold: 4096
      UBI: number of internal volumes: 1
      UBI: number of user volumes: 0
      UBI: available PEBs: 716
      UBI: total number of reserved PEBs: 11
      UBI: number of PEBs reserved for bad PEB handling: 7
      UBI: max/mean erase counter: 1/1
      UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
      Error reading superblock on volume 'ubi:rootfs'!
      Loading file "/boot/uImage" from usb device 0:1 (usbda1)
      1 bytes read
      Found bootable drive on usb 0:1
      Loading file "/boot/uImage" from usb device 0:1 (usbda1)
      3314744 bytes read
      Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
      ** File not found /boot/uInitrd
      ## Booting kernel from Legacy Image at 00800000 ...
      Image Name: Linux-3.9.4-2-ARCH
      Image Type: ARM Linux Kernel Image (uncompressed)
      Data Size: 3314680 Bytes = 3.2 MiB
      Load Address: 00008000
      Entry Point: 00008000
      Verifying Checksum ... OK
      Loading Kernel Image ... OK
      OK
      Using machid 0xdd6 from environment

      Starting kernel ...

      Delete
    2. It's been booted for five minutes or so:


      | ~ @ gerard (chazlarson)
      | => ssh root@192.168.1.143
      ssh: connect to host 192.168.1.143 port 22: Operation timed out

      Delete
    3. Do you by chance have an fstab entry to auto-mount the external drive?

      Delete
    4. I do. As described in the tutorial above.

      Delete
    5. I'm in the process of backing up and reformatting the 2TB externals to ext3 rather than HFS+ and NTFS, to see if that's related.

      Delete
    6. I had to modify my fstab. echo "/dev/sdb1 /media/usb ntfs-3g defaults 0 0" >> /etc/fstab. Did that and it worked great.

      Delete
    7. @Chaz, not sure whats going on with your system. @Randy's recommendation to check fstab is a good one.

      Delete
    8. So far so good. I'm about to install Samba, and with Randy's fstab line:

      echo "/dev/sdb1 /media/USB01 ntfs-3g defaults 0 0" >> /etc/fstab

      instead of my original:

      echo "/dev/sdb1 /media/USB01 auto defaults 0 2" >> /etc/fstab

      The thing has rebooted correctly and SSH started. I also cleared the boot flag on /dev/sdb1.

      Delete
    9. With 1 NTFS drive connected and samba installed and running, working fine. It seemed to take an awful long time for SSH to come ready, but it eventually did and the samba share is showing up on the network.

      Delete
    10. I ended up leaving both big drives out of fstab. Arch is installed on a USB HD, and I enabled rc.local and mount the drives then stop-start samba from there.

      Everything works great, no hang on boot. I'm thinking maybe that NTFS drive in fstab along with another drive causes my problems [maybe there's some confusion about sdb/sdc?]. Maybe if I reformat it as ext, that problem would go away, but for the time being I'm happy with where it is, given that every time I reboot the fileserver it shows right up with both drives available.

      Delete
    11. @Chaz,

      Thanks for the update. Using rc.local isn't a bad solution and I'm not recommending you change it (if it isn't broken don't fix it). However, using systemd is probably better.

      In general, I don't recommend using NTFS formated drives, but if you insist, another solution would be to use udevil to automount your drives.
      http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/

      Delete
  19. Sorry for the late reply. I was in New Orleans all of last week for the Microsoft TechEd Conference. Saw Tina Turner and Drew Brees at the SuperDome and picked up a Surface RT for $100 and a Surface Pro for $400.

    I updated the tutorial today and added a newly discovered uboot option (fw_setenv bootcmd) that resolved my USB HD Drive booting issue.

    Also note that for people using USB Hard Drives (2TB or less), a USB Flash Drive is not needed. You can partition your USB HD with a small partition (4GB/8GB) for Arch Linux and a second partition for your data (with appropriate edits to fstab) and boot directly to the USB HD. I wasn't recommending this before because of the boot issues I was having when booting to a USB HD, but that problem has been resolved with the "fw_setenv bootcmd" command.

    BTW, I also added SqueezeLite Player and Webmin to the tutorial.

    ReplyDelete
  20. Have a little trouble with sabnzbd. It installed and runs fine but can't enable ssl. Is there anything else I need to install to use ssl?

    ReplyDelete
    Replies
    1. Sorry, I am not going to be much help as I don't use sabnzbd. I documented the installation because it is frequently asked about.

      Try here: http://wiki.sabnzbd.org/https

      Delete
    2. Use this command for SSL in sabnzbd and after install reboot whole system.

      pacman -Sy python2-pyopenssl

      Delete
    3. Thanks for that, I'll update the tutorial and will include that package.

      Delete
  21. can we please get a tutorial for rtorrent+rutorrent
    its very hard to install from archwiki

    ReplyDelete
  22. Just wanted to help anyone else who came accross this article with a little info. The script file downloaded (install_uboot_mtd0.sh) has the old web address of jeff.doozan when it should be projects.doozan. just used vi to edit the script. It kicks an error otherwise that origianlly led me to think something was wrong with my nand on the pogo. btw thanks for the tutorial.

    ReplyDelete
  23. Qui

    I am trying to do the swapfile section. When I go to command to swapon it says something about insecure file owner 600 or 0.

    I could have sworn you had a line before with that command?

    What was that command?
    Thanks.

    ReplyDelete
  24. I am using an EXT4 partition external hard drive. I think I figured it out. Right after I create the swapfile I used chmod 600 /location/swapfile and I didn't get this error when I swapon.

    What is strange is I couldn't chmod 600 if the swapfile was swapfile.img or if I did the chmod command at a later time. I needed to do it right after creating the swapfile.

    ReplyDelete
    Replies
    1. The warning message is benign. However, I've updated the swap file section with the chmod command. You were probably having issues updating the permissions of the swapfile because swap was enabled (file was in use).

      Delete
  25. what does this mean??
    an oxnas or kirkwood e02??

    Pogoplug:~$ cat /proc/cpuinfo
    Processor : ARM926EJ-S rev 1 (v5l)
    BogoMIPS : 1192.75
    Features : swp half thumb fastmult edsp
    CPU implementer : 0x56
    CPU architecture: 5TE
    CPU variant : 0x2
    CPU part : 0x131
    CPU revision : 1
    Cache type : write-back
    Cache clean : cp15 c7 ops
    Cache lockdown : format C
    Cache format : Harvard
    I size : 16384
    I assoc : 4
    I line length : 32
    I sets : 128
    D size : 16384
    D assoc : 4
    D line length : 32
    D sets : 128

    Hardware : Feroceon-KW
    Revision : 0000
    Serial : 0000000000000000

    ReplyDelete
    Replies
    1. What's the model number on the bottom of the Pogoplug?

      Delete
    2. Then you're good. Doesn't matter what the box says, only what's on the bottom of the Pogoplug. Like I said, take a small gamble and order the P21/B01 and chances are you'll get a E02.

      Delete
  26. managed to run airplay but its saying player not found.
    shairplay is able to play but very much distortion..
    any help would be appreciated :)

    ReplyDelete
    Replies
    1. Not sure what you mean by "player not found" but yet you're getting distortion.

      What USB DAC/Sound Card are you using? What's the content of your asound.conf and libao.conf files?

      Delete
  27. I have a pogoplug series 4. I installed alarm on it with no problems. I then tried to install squeezelite player per your instructions. I didn't not understand what I was supposed to so with "#edit name
    #nano /etc/systemd/system/squeezelite.service"
    I entered the config but didn't know what name to change or what to change it to.
    Currently when I view my serial connection upon booting my plug the Squeezelite service fails to start. It attempts multiple times.
    Thank you,
    Eric

    ReplyDelete
    Replies
    1. #edit name
      #nano /etc/systemd/system/squeezelite.service

      is optional. That's why it's commented out. Sorry if that wasn't clear.

      What USB Audio Adapter are you using? Did you setup AirPlay? You'll need to do the libao.conf and asound.conf parts.

      What is the output if you run squeezelite manually?

      squeezelite -n PogoPlug_SqueezeLite

      Delete
    2. On boot I get:
      Started Squeezelite lightweight headless squeezebox emulator
      Stopping Squeezelite lightweight headless squeezebox emulator
      multiple times.

      then [FAILED] Failed to start Squeezelite lightweight headless squeezebox emulator.
      See 'systemctl status squeezelite.service' for details.

      Upon running sqeezelite -n PogoPlug_SqueezeLite
      I get: test_open:159 playback error: No such file or directory
      output_init:1359 unable to open output device

      I don't have any apple devices so I didn't install Airplay.
      I don't have a usb adapter yet. Will that stop the process?
      I'm new to linux, sorry.

      Delete
    3. Yeah, you need a compatible usb sound adapter, otherwise the process will not start. Note that you will need an asound.conf and libao.conf file.

      Delete
  28. Great article! I have compiled the Logitech LMS with Perl > 5.18... I'll post it on my blog with instructions soon.

    ReplyDelete
    Replies
    1. Thanks. Please share how you got LMS compiled correctly for 5.18. I spent a good week trying to get it to work, but just ended up with cryptic CPAN issues!

      Delete
    2. As promised, here it is:

      http://www.gardencitytech.com/?p=356

      Delete
  29. All I had to do was I modified the PKGBUILD:

    depends=('perl>5.15' 'perl<5.20')

    my existing cpan section didn't need changing:

    build_cpan() {
    rep=slimserver-vendor/CPAN/
    mkdir slimserver-vendor
    mkdir ${rep}
    cp -r ../../../${rep}/[^m]* ${rep}/
    pushd ${rep}

    wget http://search.cpan.org/CPAN/authors/id/S/SM/SMUELLER/Class-XSAccessor-1.13.tar.gz
    sed \
    -e 's/XSAccessor-1.05/XSAccessor-1.13/g' \
    -e '/RUN_TESTS=1/c RUN_TESTS=0' \
    -e 's/perl5.12/perl/g' \
    -e 's/5.12/5.16/g' \
    -i buildme.sh
    sh buildme.sh

    popd
    cp -r ${rep}build/5.16/lib/perl5/*-linux-thread-multi/* CPAN/
    cp -r ${rep}build/arch CPAN/
    rm -fr ${rep}
    }

    ReplyDelete
    Replies
    1. That's what I read, but for some reason it didn't work for me. However, I was trying to build nightly 7.8 and using a pogoplug with perl 5.16, so maybe that had something to do with it.

      Delete
    2. The instructions I posted will work with the nightly 7.8 build of LMS... However, I don't really notice anything different between 7.7 and 7.8.

      Delete
    3. Hey Riddlr, I actually gave your instructions a try and was able to build LMS successfully. However, I wasn't able to install the packages on a different Pogoplug.

      Anyways, LMS on AUR (7.7) was recently updated and build is like 3 commands - wget tarball, extract tarball, make. Wait 3 hours and its done. Note that you need a large swapfile.

      Thank you.

      Delete
    4. Interesting - it's a two part process - perhaps you needed to install the slim-servervendor package first before the main package.

      Delete
  30. Thanks for your tutorial -- it helped me greatly.

    If you are having trouble with the Pogoplug randomly not booting when two USB drives are attached, this seems like the best and cleanest solution to the problem:

    http://mouhassan.wordpress.com/2012/06/27/booting-pogoplug-from-the-right-usb-disk/

    ReplyDelete
  31. Thank you. No, I have not looked into ReadyMedia. The DNLA server provided by the PogoPlug app works well enough for me. What's wrong with minidnla? What features are you looking for?

    ReplyDelete
  32. I was hoping to use the 2 external usb drives I originally had hooked to my pogoplug before I hacked it. The drives have a lot of data already on them and I don't have anywhere to back it up to. Can I mount these drives without having to erase them? Thanks!

    ReplyDelete
    Replies
    1. Hi Rick,

      You should be able to mount them without erasing them. However, it might be outside the scope of this tutorial. I'll try to give you some basic steps though.

      First, how are they formated? NTFS?
      If so you'll need the ntfs drivers:

      pacman -Sy ntfs-3g

      Note that NTFS drives will be slow on ArchLinux. I'm not a big fan of using NTFS drives on ArchLinuxARM (hence why I don't even mention it). But if you must use it, check out this blog which has some good tips - http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/

      To get your drive automounted, you need the proper line in fstab. Note that if you don't have the correct line (or if your drive is not present), your Pogoplug will not boot.

      Another option is to use udevil versus fstab to automount your drives.

      pacman -Sy udevil
      systemctl enable devmon@root.service
      systemctl start devmon@root.service
      df -h

      Hopefully you will see your drive mounted under /media.

      Good luck

      Delete
  33. I seem to have screwed things up with mine, is it possible to write the basic setup detailed here, to a USB flash drive via a Linux PC? My Pogo shows up on my router but I can't SSH in anymore and it isn't recognized by the PogoPlug service anymore, it shows up as Offline. My original flash drive is wiped so I need to set up a new one. Or could someone post an image file of the setup I could write to a flash drive? Would that even work?

    ReplyDelete
    Replies
    1. Sorry I don't understand your first question. If your original flash drive is wiped, you'll need to reset it up from scratch. Just skip the uboot installation part. A pre-built image would work. Please see the backup and restore section. I suggest you make a backup the next time you get things setup the way you want.

      Did you try SSHing in with root/ceadmin (default username and password for Pogoplug OS)?

      Delete
    2. Hi Qui, thanks for the reply. Sorry I'll try and do a better job of explaining. I had connected two external drives to my Pogoplug and things were not going smoothly, so I decided I would do the whole thing over and just set up the one larger hard drive. I assumed that if I removed the Flash Drive and rebooted to Pogoplug it would just boot into the stock software, but that doesn't seem to be happening. The light flashes and it's a solid green but I am unable to SSH back into the Pogoplug with the default login, the connection is refused. The Pogoplug site also doesn't see it and shows it as Offline. Any suggestions would be appreciated.

      Delete
    3. Can I assume you're using a Pogoplug E02?

      If you remove all your flash/hard drives, the Pogoplug should boot back into the default pogoplug OS. You should be able to log in with the default username/password of root/ceadmin. If you're not able to do that, I'm not sure what's going on.

      When you install the uboot, one of the questions is:

      #Would you like to disable the pogoplug services? [Y/n]

      So if you answered with a 'Y', you have your answer why its showing as offline.


      Delete
    4. Thanks, yes it's the E02. I've disconnected all USB drives and unplugged the power cord for a minute, then plugged the power cord back in. When I try to SSH in from my Linux Mint box using root/ceadmin I get: Permission Denied, Please try again. on the 3rd attempt I get Permission Denied (publickey,password).

      Looks like I've messed things up good and proper.

      Delete
    5. Just some random things you can try:

      - try whatever password you used with Arch
      - try from a different computer

      Otherwise, I would assume you could reset the password via a serial connection.

      Check the Arch Linux ARM forums for help - http://archlinuxarm.org/forum/viewforum.php?f=58

      Delete
    6. Alright, I think I now understand your original question now.

      Yes, you can setup your USB Flash drive with Arch Linux ARM using your Linux MINT computer. Just format it as EXT3 (assuming you ran "fw_setenv usb_rootfstype ext3") and extract the ArchLinuxARM-armv5te-latest.tar.gz tarball to the USB flash drive. Plug it into your Pogoplug and hopefully Arch Linux ARM will boot up.

      At which point you should be able to reset the root password of the default pogoplug OS. See here -http://archlinuxarm.org/forum/viewtopic.php?f=18&t=4907

      Delete
    7. You are the best! I tried another computer and in a last ditch effort I tried a couple of passwords I almost never use and one of them worked! I'm going to start over now and I'll be sure to follow your steps to make a backup this time :)

      Delete
    8. That good news. I was king of hoping you would test the password recovery method I linked to though ;)

      Any idea how the password in the default pogoplug OS got changed? I never bother to set a password on any of my pogoplugs because they are constantly being worked on.

      Delete
  34. Hi Qiu Hong,

    Thanks for your tutorial. I was able to get my Pogoplug E02 running arch linux with samba and everything works great. Recently I was trying to set up Airprint with my USB-printer Canon imageClass D420. I installed CUPS and was able to get to the web interface by going to http://:631/admin. I connected the printer to one of the USB ports on the back and clicked "Find printers", I could see the "Canon D400-450 (UFRII LT) (Canon D400-450 (UFRII LT))" under local printer, which means the connection was recognized. But when it asked me to select a drive for the printer, I couldn't find the exact model under Canon. I believe this specific model isn't included in the "gutenprint" package. If I select "Generic CUPS-PDF printer" or "Generic PCL printer", it won't print.

    Now, I can find the Linux UFR II driver from Canon's official website here:
    http://www.usa.canon.com/cusa/support/consumer/printers_multifunction/imageclass_series/imageclass_d420#DriversAndSoftware
    or from the AUR database here:
    https://aur.archlinux.org/packages/canon-ufr/
    The downloaded file is named "Linux_UFRII_PrinterDriver_V270_us_EN.tar.gz" and when I unzip it in windows (sorry i don't have linux system), i ended up having .deb and .rpm files, in folders named "32bit-driver" and "64bit-driver".

    My question is, how do I install the printer driver to the CUPS system on my Pogoplug?
    Option 1: Is it through PACMAN command? What exactly shall I type?
    Option 2: Can I install the driver via the web interface (by going to http://:631/admin), and select "Choose a PPD file" when Add a printer? Which file should I use, 32-bit or 64-bit? .deb or .rpm?

    Can you help me? (I'm a Linux newbie, so you'll have to explain a little more detailed.) Thanks in advance!

    ReplyDelete
    Replies
    1. Hi Biz Bee,

      Sorry to hear you're having issues getting your printer to work. It doesn't look like your printer is supported under ARCH LINUX ARM.

      Delete
    2. That's a bummer. :(

      Thank you Qui Hong anyways. Your instruction has helped me a lot as well as many others I believe. Good work!

      Delete
  35. Man I badly need your help.I followed your instruction here and few steps from here http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/
    Because I wanted to have a NTFS drive so I can use them when needed in other pc and this guy seems to have found a workaround for slow speed of NTFS.
    The issue I'm facing is:
    The system doesn't reboot when hdd is attached at all and when I remove the HDD it boots ONLY after several hard reset.Softboot is not working at all.
    SO I tried this method http://mouhassan.wordpress.com/2012/06/27/booting-pogoplug-from-the-right-usb-disk/ but seems it is also not working.So I guess I would start from scratch using new USB FLash drive as that seems to be an issue but no clue how to do that.Can you give me an idea how can I reinstall the entire thing in a fresh UDB stick?Please help as I'm a noobie.

    ReplyDelete
    Replies
    1. I've added a section just for you! :)

      I'm not a fan of using NTFS drives with the Pogoplug for various reasons - performance, non-native linux, etc. If you have the option, my recommendation is to keep things simple and dedicate a ext3 formatted drive to your Pogoplug.

      However, I understand in certain cases you have no choice - like when your data is already on a NTFS drive and you have nowhere to back it up. So saying that, try the following:

      pacman -Sy ntfs-3g udevil
      systemctl enable devmon@root.service
      systemctl start devmon@root.service
      df -h
      #you should see your drive mounted under
      #/media/xxx

      #You might need to edit
      nano /etc/udevil/udevil.conf

      Also, please see Obihoernchen's blog for some NTFS performance tip. Also note, people have reported boot up issues with NTFS drives attached.

      Again, this is something I don't use so I can not support it. And again, keep things simple and use a dedicated ext3 drive if possible.

      Delete
    2. Thanks a zillion for such fast reply Qui.I have been literally sitting in front of pc hoping to get a reply from you.
      Actually I also posted here http://archlinuxarm.org/forum/viewtopic.php?f=53&t=5985
      I've totally understood the issue and decided to use EXT3 rather as you have suggested.
      However from the very beginning my system was not booting at all after cold reboot.Everytime I had to unplug and plug it(warm boot).After going through forums I guess it must have something to do with my thumb drive.
      So now I want to do everything from scratch as par your guide and move with ext3.But how to do that?One guy in the forum gave me a link to this http://archlinuxarm.org/support/reinstallation
      But being a windows user I have no clue how to use this direction in my case.
      So current situation is I'm somehow able to ssh to the system so can you tell me how can I re install everything from scratch in a new thumbdrive.I have serached on Google but found no definitive guide.
      The one and only post on this subject is available here
      http://archlinuxarm.org/forum/viewtopic.php?f=18&t=4899
      But it is giving me wget:command not found error in the first step itself!!!Please help me how to reinstall everything in a new thumbdrive without bricking the pogoplug!!
      Thanks a lot for your kind support and help.

      Delete
    3. Or do you think I should try to install original Pogoplug software and redo everything from that point?Will that work?

      Delete
    4. Just run through the tutorial like you just unboxed the pogoplug. I believe I have a comment about wget not working. Just add busybox infront of the wget command.

      Delete
    5. Thanks.I tried to do that (busybox) but it was not working but I managed to make that work by running this
      pacman -Sy wget
      It seems wget was not installed or was not running properly.
      Now to do this from scratch I removed everything from the pogo and connected a new usb drive but now it is not booting at all!!!:(
      Before I tried this method
      http://mouhassan.wordpress.com/2012/06/27/booting-pogoplug-from-the-right-usb-disk/
      So do you think that has something to do with the issue as bootloader might be looking for ROOTFS still:(

      Delete
    6. I just tried to connect my old usb drive back and login back now it is not booting at all.Think I've bricked my plug man..:(

      Delete
    7. Step back and relax. Like I said, just go through the tutorial like you just unboxed your pogoplug. That means unplugging everything from your pogoplug, booting it up into the default OS, attaching your usb flash drive and follow the tutorial. At which point do you get stuck?

      Please ignore mouhassan blog, its not applicable.

      Delete
    8. Hi,I have unplugged the pogo and removed everything attached to it and plugged back.I waited for sometime for it to boot(some blinking green light and then steady green) and at this point I tried to ssh but getting nothing:(((..saying connection time out!

      Delete
    9. You're awesome!I followed your instruction and after few tries I was able to ssh in pogoplug again.The bash prompt says pogoplug~
      I will not touch it now and going to buy a new flash drive and redo everything stated in your blog post and update you.Thanks a zillion for your support.Do you have a donate button or Amazon wishlist I can help you with.Fell free to let me know,I appreciate your time.
      thanks

      Delete
    10. Awesome! You can buy me a cup of coffee (button at the top right). :)

      Delete
    11. Great.Just sent you a cup of coffee:)
      I have started doing everything from scratch following your instructions.However I have a few queries.
      1>I don't really need my.pogoplug service but according to your instruction I may have to anyway install it to us the DLNA service.Any specific reason for this and not using miniDLNA?Do you recommend instead I should follow miniDLNA instruction stated here
      http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/
      or here
      http://www.naspberrypi.com/pogoplug.html
      ?

      2>In this site
      http://www.naspberrypi.com/
      This guys has done a cool thing which is described here
      http://www.naspberrypi.com/openvpn-transmission.html
      What it does is it let Transmission to only route torrent traffic through the VPN, and if the VPN is not connected Transmission will just stop torrenting until the VPN is reconnected.
      As from your tutorial I can get both OpenVPN and transmission any chance of this method working here as well?
      Waould wait eagerly for your reply.
      Have a nice day.

      Delete
    12. Sorry to bother you again but after installing Samba according to your instruction I ran reboot command as stated in last step.
      Now it is not letting me to ssh again.I guess it is taking the 2TB hdd attached as first device instead of the USB drive.(One thing I shoukd mention after using this new USB drive the system was soft booting everytime I did reboot so this stick I guess is fine).
      So now do you suggest me to unplug pogo and detach the 2tb hdd and let it boot and then should I plug in the hard drive?
      Or should i try as mentioend in this forum?
      http://archlinuxarm.org/forum/viewtopic.php?f=18&t=5700

      Delete
    13. Sorry I don't use miniDNLA or Transmission so I can't really help there. The built in pogoplug software upnp/dnla and Logitech Media Server DNLA works well enough for me when I do use dnla which is very rare.

      Did you switch to using ext3 on your 2tb drive?

      Delete
  36. Thanks for this awesome guide.

    I'm getting one of the compatible USB audio adapters for my pogoplug. I was wondering if you know of any way to use the Pogoplug as a live audio stream output device? I was thinking of using a microphone and the USB audio adapter to turn it into a baby monitor.

    ReplyDelete
    Replies
    1. I'm sure its doable, but it's not something I've done.

      Delete
  37. Completed archlinux install. And reboot. Installed SAMBA pkg but after last reboot command lost network connection. Remove USB drive and install on my ubuntu system tocheck latest updated files, which say "updated DHCPD". Now I am stuck. I have no communication with the pogoplug.
    Without USB pogoplug reboot, and repeat the archlinux install procedure. Now I will stop here and may generate USB drive image to reinstall if require so that I do not have to repeat the install process.

    Still I do not know why and how network DHCPD failed to connect? I check router DHCP clients list but no pogoplug listed. Does anyone can explain what went wrong here? What did SAMBA install process do to break the network DHCPD / connection?
    Is there any other option to connect with pogoplug to repair network connection issue?

    One more experience on my second install. After first reboot, the pogoplug host name changed to "alarm". So after reboot my DHCP address changed. But I continue my putty process with older IP address which failed. I found out the new address for the host "alarm" from the router DHCP client list.

    ReplyDelete
    Replies
    1. Some people are reporting issues with DHCP on the Arch Linux Arm forum - http://archlinuxarm.org/forum/viewforum.php?f=53

      Check there for help.

      Delete
  38. Great instructions. You saved lot of time for beginners like me. Thanks.
    One thing I don't follow - why do Sickbeard and Motion have the same web address (http://pogoplug:8081)? Does that mean I can only install and use one of them?

    ReplyDelete
    Replies
    1. Thanks! Those are the default port used by the application. You'll need to update the configuration file for one of the apps, motion or sickbeard, if you plan to run both.

      Delete
  39. 2 quick questions, first I installed arch using an 8gb flash drive, then attached an external 1TB drive, both work great but i wanted to remove the 8gb drive and somehow get the arch install moved onto the 1TB drive. Possible or too much of a hassle?

    second I installed plex and got the movies all mapped out in the settings, but when i try to play and of the videos from the browser it give me an error "Cannot load M3U8: 404" i think its trying to transcode the video or something, I dont see anywhere in the settings to change this, has anyone run across this error yet?

    ReplyDelete
    Replies
    1. If it works, I would not recommend messing with it.

      However, yes you can install ARCH on your 1TB drive and skip using a flash drive. Just create a small partition, 4GB or 8GB for ARCH and another partition for data. I wanted to keep the tutorial simple and didn't want to confuse people with disk partitioning, but if you know what you're doing, it's totally possible.

      Not sure about your Plex issue. I don't run Plex on my Pogoplug. I built myself a real Plex Server a year or so back (great investment). Check the Plex Forum.

      Delete
  40. Everything is working however when i want to download a torrent to the external storage device i tell it to store to /media/usb/share, the torrent always fails and says "permission denied to file"

    ReplyDelete
    Replies
    1. Try:

      mkdir -p /media/usb/share/download
      chmod 777 /media/usb/share/download (or whatever folder you're using)

      Delete
  41. this is all awesome! I think I read through all the comments but didn't see any questions like this. if install arch Linux on my pogoplug, and re-enable the pogoplug service for my.pogoplug.com will I lose the archlinux functionality? I wanted to maintain all the archlinux installation and features above while still having content from an external usb drive synced to the pogoplug cloud for offsite backup. thanks again! all good stuff!

    ReplyDelete
    Replies
    1. Hi Sal. No, you will not lose the archlinux functionality. What would be the point then?

      Delete
  42. 1073739776 100% 5.33MB/s 0:03:12 (xfer#11, to-check=24/43)
    1073739776 100% 5.26MB/s 0:03:14 (xfer#17, to-check=17/43)
    1073739776 100% 5.22MB/s 0:03:15 (xfer#18, to-check=16/43)

    I'm doing some RSYNC from the pogo to my 'real' NAS and this is what I'm getting using SAMBA. Speed are about the same copy to/from Windows 7 wired-gigabit network

    normal speed is about 120 MB/s on my network between the PC-NAS-Laptop. Pogo is connected to a 2.5" drive for boot/system/storage (no USB flash), I know I'm not expecting more than 30 MB/s but ~5MB/s is slow...

    what kind of speeds are you getting?

    ReplyDelete
    Replies
    1. As my screenshot shows, I'm getting up to 28MB/s via wired gigabit ethernet.

      You failed to mentioned what type of disk format you're using. With those numbers, I'm going to assume you're using NTFS.

      Delete
  43. Very nice tutorial. And thanks for putting all these together.

    Being a total newbie to Linux, I was still tempted to set my E02 as an "NAS". Followed most of your tutorial except the NTFS part. I really wanted to keep my data on the existing hard drive so I followed the Obihoernchen's blog you referred. Somehow I screwed up though and the hard drive ended up being RAW in windows 7. So had to use EaseUS to retreive the data blah blah.

    Anyway, now I had the hard drive formatted as Ext 3 and everything is ok so far. So thank you very much for the tutorial. Can you help with some questions though?

    1. I started with a 4G flash drive. Now I realized I also have a 2G one. Sorry for being cheap, but is there a quick way to map my 4G drive content to the 2G one? The 2G one is currently formated as NTFS.

    2. Will this "NAS" abuse my harddrive? I read somewhere else somebody is complaining about the harddrive being read all the time. I doubt this is true. But is it necessary to turn it off during the day and turn it back on at night? I mainly use it as an access point for my ipad or Logitech Squeeze Touch.

    Many thanks.

    ReplyDelete
    Replies
    1. You're welcome! I read your first paragraph and thought, "Don't even ask me about NTFS!" Glad to hear you switched to EXT3 and it's working for you better.

      1) Yes. Follow the instructions in the Backup and Restore section. Backup your 4GB to a tarball and then format your 2GB drive like you're setting up a new installation and untar your 4GB tarball to it. Double check how much space you're using first though - "df -h"

      2) Sounds like BS. I wouldn't worry about it.


      Delete
    2. Thank you Qui for your detailed direction. You do know what I meant "Being a total newbie to Linux".:)

      1) Well. Somehow I screwed up with the system and I redid everything from scratch. But thank you for the direction.
      2) I'll take your word then.

      Now my ipad works perfectly with it. Somehow my Logitech Squeezebox cannot play any track although names of songs are displayed. And it's not showing any Chinese folders correctly. Still a lot of digging to be done. Nothing is ideal in real world.

      Delete
  44. I followed the guide to install archlinux on my pogoplug v2 e02

    Normally after I SSH into the device, I see the command starts with -bash-3.2#:

    When I tried to do /sbin/fdisk /dev/sda, it say fdisk can't open /dev/sda

    I tried couple of things that I have no idea. After a while, when I SSH back into the device, the command start with pogoplug:~$

    It seem to me that the device can't find my USB stick, so it somehow install the whole Archlinux on the internal storage, it got full during the install.

    Please help me . This is my first attempt at this.

    ReplyDelete
  45. Here is my screen shot. Do you think the USB need to format to anything before the pogo can recognize it?

    http://imageshack.us/photo/my-images/15/h5m8.jpg/

    ReplyDelete
    Replies
    1. Just start from scratch (pretend you just opened the Pogoplug box).

      - In your screenshot you booted into the default Pogoplug OS. You need to mount your USB stick/drive before "df -h" will see it.
      - "fdisk can't open /dev/sda". However, in your screenshot, fdisk opened /dev/sda just fine. One reason why you might get this message is if your /dev/sda disk is mounted. You can't partition a disk that is in use.

      Delete
  46. Having trouble with the Pogoplug reinstallation. I go through the steps totally and am getting tripped up at what the hbplug.conf or pogoplug.conf files need to include. I have a 1 TB external hd connected to my PP and a 200 GB external hd. In the file I have it as...

    #example below: vfsdir=,
    vfsdir0=Pogoplug_USB,/media/usb/share
    installdir=/usr/local/cloudengines
    #datadir=.
    datadir=.
    nohotplug=1
    #replace the svcid with the one found on the bottom of your pogoplug
    svcid=CORRECT NUMBER
    tcpport=89

    I understand I need to probably include another "vfsdir" for the other HD, but even the 1 isn't working. In my.pogoplug.com, I get a listing for "alarm Pogoplug_USB" but then a message that says "This drive is not available.

    You have attached a hard drive that your Pogoplug device does not recognize. Please click here to contact customer support."

    ReplyDelete
    Replies
    1. The error message is a big hint.

      Does "/media/usb/share" exist? Did you properly mount your drive to "/media/usb"?

      Delete
  47. I have followed your BT Sync, but it doesnt work at "systemctl start btsync",
    it said "Job for btsync.service failed. See 'systemctl status btsync.service' and 'journalctl -xn' for details."

    seems like problem with the btsync.service file?

    ReplyDelete
    Replies
    1. Thanks for letting me know.

      The issue is with BTSync itself, not the service file.

      See this thread - http://forum.bittorrent.com/topic/22654-btsync-1169-arm-alignment-error/

      Originally, I tested it against 1.1.48, however the current version is 1.1.70.

      Long story short,

      echo 2 > /proc/cpu/alignment
      systemctl start btsync

      Delete
    2. FYI - I updated the btsync.service file to include the echo command now needed to start btsync.

      Delete
    3. still doesn't work, now it says "No such file or directory"

      [root@pogo system]# systemctl start btsync
      Failed to issue method call: Unit btsync.service failed to load: No such file or directory. See system logs and 'systemctl status btsync.service' for details.
      [root@pogo system]# systemctl status btsync
      btsync.service
      Loaded: error (Reason: No such file or directory)
      Active: inactive (dead)

      Delete
    4. Sounds like you didn't download the service file as instructed.

      #download service file
      cd /etc/systemd/system
      wget http://dl.dropbox.com/u/42238/pogoplug/v2/btsync.service

      Delete
    5. ok, I deleted all the old btsync.service [and the .1 & .2] files and RE-DOWNLOADED them,

      still same message when I try to start btsync, not working :(

      Delete
    6. Sorry, not sure what's going on with your setup. Something definitely isn't right. Start over.

      Delete
  48. "- If you plan to attach a hard drive for SAMBA, try installing ALARM on a small partition on the hard drive (4GB) and skip using a USB flash drive. This will allow you to avoid any boot up issues related to multiple USB drives attached."

    If you were willing to include directions for how to do this, I know that I (and least one other person from the comments) would be quite interested. Totally understandable if you didn't want to though.

    Great tutorial by the way. I needed to reference several other sources to tackle a few other quirks I had with configuring my setup, but yours was an article that I kept open as a reference throughout the process.

    ReplyDelete
    Replies
    1. Thank you. My goal is to keep the tutorial as simple as possible. I did not want to coverage linux disk partitioning.

      Saying that, if you want to use a single HD, all you need to do is partition it correctly - create a small 4GB partition for the rootfs and another partition for the rest of your data and adjust the mount and fstab entry appropriately. Sorry I can not provide a step by step.

      Delete
    2. FYI - 9/25/2013, I've updated the SAMBA section in the tutorial to assume you will be using a single HD for both ALARM and SAMBA.

      Delete
  49. I spent several hours trying to get SAMBA installed on my E02 after installing ALARM on a 8GB flash drive. Followed your instructions very carefully. Each time SAMBA installs fine and I can see the POGOPLUG drive from my laptop over the home network. But after the last step (/sbin/reboot) I can't SSH in to it anymore. And the NAS drive connection also dissappears from the laptop.

    I am guessing this is to do with a conflict between the two USB drives during boot up time. However, I have taken care to label each drive (ROOTFS and USB) in /etc/fstab.

    Please help.

    ReplyDelete
    Replies
    1. Did you read and/or try any of the suggestions I documented in the "Troubleshooting ALARM Boot Up Issues" section?

      Delete
  50. VERY awesome and mega tutorial :)

    I had the same issue starting Avahi daemon, as Dirk Figge. (April comments) . I followed the log and it pointed to having nss-mdns being necessary so I installed that. Still didnt work. Then I Read I had to restart dbus daemon after systemctl restart dbus. This fixed it, and avahi works. Thanks again for great info!

    ReplyDelete
    Replies
    1. A reboot would also fix the issue. However, I'll go ahead and add a line to restart dbus. Thank you.

      Delete
    2. Hi Qui thanks for replies! Ah I did not notice the volume part, also reading it again (Easier in the morning!) I see I missed about compiling own shairport. Also the issue of AirFoil is fixed I think looking at : https://github.com/abrasive/shairport/issues/213 I will try soon and report back.

      Delete
  51. I have a couple of these setup now. I run debian with vamp, logitech media server, and squeezlite player. I'm in the process of getting wifi working, and going to experiment with a different mac address to see if I can get LMS to view it as a real squeezeplayer.

    I was looking at the pics above and was thinking some Velcro tape or double sided tape would look much cleaner than the zip-ties. Just a suggestion

    ReplyDelete
    Replies
    1. I've been thinking of giving Debian a try. Maybe even port the tutorial over. Since Arch Linux is a rolling release, its hard to keep the tutorial up to date. If/when I get a Pogoplug V3 (oxnas) device and some time, I'll give it a try.

      Regarding the zipties, yes a few other people commented on them. I've seen switched over to 3M double sided form tape, which is crazy strong.

      Delete
    2. I managed to get my wifi dongle working in debian. It has a realtek RTL8188 chipset, I used realtek firmware .36 from the weezy non-free repo. I think the A/B/G/N dongle was $7.

      I was also able to change the mac address of both the ethernet and wifi adapters to reflect a slim devices squeezeplayer. This allows me to stream pandora without a subscription. Before I had to sync with my real squeeze player to stream pandora. Now I can play a different Pandora station from each player if so desired.

      The Ethernet mac change was easy just added hwaddress ether 00:04:20:XX:XX:XX to the /etc/network/interfaces file

      this didn't work for wlan0, I ended up installing macchanger and adding pre-up macchanger -m 00:04:20:XX:XX:XX eth0 to the same interfaces file. To my surprise this worked, I say to my surprise because I must have tried 100 other ways to change the wireless MAC add.

      Delete
    3. "Stream Pandora without a subscription"? Sounds very interesting! How exactly do you do that? Can you provide me some more details?

      BTW, I was playing with squeezelite last night (on OpenWRT) and noticed that it has an option to specify a macaddress (-m ). I'm assuming it was designed specifically for this reason.


      Delete
    4. Yeah absolutely. I'm running debian on mine so I'm not sure if there will be any difference compared to arch or not, but this is what worked for me. If you just want to change the mac address of the Ethernet adapter you can skip installing macchanger.

      SSH and login to arch/debian pogoplug as root
      #install macchanger
      apt-get install macchanger
      #open interfaces file
      nano /etc/network/interfaces

      This is what my interfaces file looks like. If you aren't connected via wifi you can ignore everything under "wireless settings"

      # This file describes the network interfaces available on your system
      # and how to activate them.
      #
      # The loopback network interface
      auto lo
      iface lo inet loopback
      #
      # The LAN network interface
      auto eth0
      iface eth0 inet dhcp
      hwaddress ether 00:04:20:1E:XX:XX
      #
      # wireless settings
      pre-up macchanger -m 00:04:20:1E:XX:XX wlan0
      allow-hotplug wlan0
      iface wlan0 inet static
      address 192.168.1.18
      network 192.168.0.0
      netmask 255.255.255.0
      gateway 192.168.1.1
      wpa-ssid "Mywirelessnetwork"
      wpa-psk "password"

      The magic line for permanently changing the mac address for Ethernet is:
      hwaddress ether 00:04:20:1E:XX:XX (replace XX with anything else)

      The magic line for the wireless is:
      pre-up macchanger -m 00:04:20:1E:XX:XX wlan0 (again replace the XX's)

      Be sure to hit ctrl x and save your changes. Reboot and your device should reflect the new mac address' and Pandora will work just like a normal squeezeplayer, the device will even show up like an official squeezebox on the mysqueezebox.com website. Remember to verify the devices new IP address in your routers configuration. I think that's about it, let me know how it works out on arch Linux.

      -Brent

      Delete
    5. Brent, thanks for the detail explanation.

      I'm fairly new to LMS and wanted to know how you actually play Pandora from LMS? Is it a plugin?

      Delete
    6. Yes just add the plugin to LMS and sign into your pandora account. I think you can also add it through mysqueezebox.com, it might be required to have a mysqueezebox.com account (free) for it to work.

      One thing I've recently noticed is that I have full access to pandora controls, stations, etc through LMS web interface (192.168.1.XXX:9000)provided my mac address' are spoofed to slimdevice players. BUT if I use my android remotes it will give me an error message that this device is already registered on someone else's account. After some research I found this message doesn't actually mean what it says, but is a result either mysqueezebox.com knowing its not a true player or it not actually adding it as a player. Initially it worked with all my remotes so I'm not sure what happened. If Pandora was the last thing I was listening to I can play that pandora staion and have full control of skipping songs, thumbs up/down and such, but I can't switch stations, or switch media and return to Pandora. (again only on the android remotes) In order to get full control of pandora I have to go through the LMS web interface. A work around I found is to add pandora stations as either favorites or playlists, I can then use my android remote without issues, this method works just fine for me. Let me know if you have any issues and I'll see if I can help out.

      -Brent

      Delete
    7. One thing to more directly answer your question. Pandora is a plugin for LMS, but the actual playing will come from squeezelite on the pogoplugs, not from the server. You probably know that, just wanted to clarify.

      Delete
    8. Thanks for the reply. I just got a Logitech UE Smart Radio which immediately downgraded to SqueezeBox (simple procedure done via the menu). I'm pretty happy with the purchase so far. Great "alarm clock radio" for $80 shipped (onsale)!

      Delete
  52. hi

    I got the AirFoil working finally - you were right the volume was too low it was just 50% :) ( I had to compile my own Shairport as they fixed the Airfoil 2 weeks ago!). Great :)

    I know have added Time Machine and NEtatalk capability, adding a suer for that. But I am stuck as I do not know how to share a USB drive that is also plugged into the Pogoplug. (I am running archilinux on a USB stick in the Pogoplug but I want Time MAchine to be another drive that is 1Tb big). So from this guide: http://www.afp548.com/2013/05/06/afp-services-on-a-linux-server/ I want to know how to specify the path to my USB drive in the pogoplug? I don't understand archilinux enough on the drives ... is it a device that is somewhere like /dev/sdb1 ?

    if anyone can help say I have a feeling this is basic linux newbie stuff :)

    ReplyDelete
    Replies
    1. I got a free copy of Airfoil (thank you Rogue Amoeba! What a awesome little app!) for troubleshooting and actually tested the latest build of shairport with Airfoil last night (on OpenWRT not Arch), and it worked well. I'll update the precompile version of shairport in this tutorial soon.

      I've not tested or used Time Machine (I got rid of my macbook air a year or two back). Saying that, my recommendation is to follow the SAMBA setup section which will help you partition, format and mount your 1TB drive.

      Delete
  53. ok. I spent a week on it but no luck.

    1. Somehow the Squeezebox server cannot finish scanning the library(it has some 13,000 files). Every time it stopped at 6000~7000 files.
    2. So I renamed the music folder, created another one, and moved some files to the folder. Now the server finished the scan. But the squeezebox touch screen doesn't show the elapsed time on the progress bar. The funny thing is if I play directly from the server, the elapsed time will be shown on the computer screen. And more importantly, no sound output. Tried to plug a thumb drive directly into the squeezebox and it played fine. So the squeezebox should be in working order.

    So do you have any suggestion what might have happened? The first one I may be able to compromise but definitely have to solve the second issue. TIA.

    ReplyDelete
    Replies
    1. Sorry, I'm far from an expert with regards to Squeezebox server. You should check on the squeezebox forums for help.

      Delete
    2. Actually I already googled some of them but couldn't find the answer. Since my Squeezebox works with USB drive, I think the issue is specific to this setup. Hence I tried to see whether you ran into similar problem.

      This might be a stupid question, but I don't need to install the "SqueezeLite player", right? My understanding is that I only need the Squeezebox Server to feed the data to my Squeezebox Touch.

      Delete
    3. Correct, Squeezelite player is for playing music.

      Delete
    4. Thank you. I guess I'm out of luck then. Will keep searching.

      Delete
  54. Silly question, why install kirkwood kernel?

    pacman -Sy linux-kirkwood linux-headers-kirkwood

    What is the benefit of doing this step?

    ReplyDelete
    Replies
    1. Far from silly, actually a great question.

      To be honest, I'm not sure if I'm qualified to answer. From what I understand the new linux kernel has more features and drivers. You'll probably get a better answer on the arch linux forum or a generic linux forum.

      Delete
  55. I have my HDD in ext3 format connected to my pogoplug and followed your directions precisely, but the max transfer speed I am getting it ~9 mbps, this drops down to around 2-3 when I am trying to copy over directories with many small files in them. Do you know if there are other limiting factors that might be affecting my performance?

    ReplyDelete
    Replies
    1. You didn't mention if you're using wireless or wired connection. For 23-28MByte/s transfer speed, I'm using gigabit wired connection transferring large files. Smaller files will transfer slower.

      My assumption is you're on a wireless connection. Otherwise I'm not sure what your issue is.

      Delete
    2. The pogoplug is wired into the router. My laptop is wireless. I tested a wired connection on my laptop and that pushed me up to ~11 mbps, but not beyond that. (I tried an iso and m4v file). Is 9 mbps the expected speed for a wireless router with a listed capacity of 300 mbps (Linksys E1200)? Since I primarily intend to use it via wireless, not hitting the 25 range might not even matter much. Thanks for your help! And great tutorial!

      Delete
    3. You failed to mention if you were running 10/100 or Gigabit network. Also it's not clear if you are talking bits versus bytes.

      9-10MByte/s is about the maximum speed you'll get via wired 10/100 ethernet. Wireless transfer speed isn't applicable to this tutorial, but if you're getting 9MB/s that's way better than what I would expect.

      Delete
    4. Thank you for your response. Turns out my router doesn't support gigabit ethernet. This makes sense now. And yes I was referring to ~8-9 MByte/s via WiFi, and ~10-11 MByte/s via ethernet so I suppose that's exactly what I should expect. Once again thank you for answering and great job with the tutorial, it was very helpful!

      Delete
    5. Your results are about right. I get between 10-12MBytes /s over a 300MBps wifi connection and avg 24-26 over gigabit wired connection. I believe 18MBps is the theoretical limit for single direction transfer speed, you also have to account for overhead, noise, distance. You can try changing channels and such if you're in noisy environment. Ie: apartment complex's and such.

      -Brent

      Delete
  56. Qui,

    Thanks for assembling this tutorial. I am one of the unlucky who recv'd pogo p-22. Although not supported by archlinux - any other ideas what to do them?

    thanks in advance

    ReplyDelete
    Replies
    1. Sorry, I'm not going to be much help as I don't own a P22. I believe your best bet is to install Debian or keep the existing Pogoplug OS and add Optware for SAMBA.

      Delete
  57. Does a 4 TB drive work with two partitions? If not, then why not? If my USB sticks are not botting then what other options do I have?

    Thanks,

    ReplyDelete
    Replies
    1. You should be able to. Send me your 4TB drive and I'll test it for you. :)

      Delete
  58. Hey Qui, Sorry for the noob questions in advanced, but I do not want to do something wrong and screw everything up. So I have a pogoplug v4 and was thinking of installing archlinux, but I am so new to doing this. So bare with me, after I install archlinux and everything goes as planned, will I have to ssh into pogoplug one more time in order for my pc to look at my files on my network? Will I have to add more instructions in ssh to turn the pogoplug into samba and my windows pc can see all my files on my 1TB hard drive? I hope you understand what I am saying, I am so sorry for asking such dumb questions I just want to learn how to do this never did this before, but I have ssh into my apple tv before to install xbmc onto it. That is why I want to learn how to turn my pogoplug as like a samba server. So thanks in advance if you can help me, if not I am doomed!!!! Nah just kidding, but help I understand ur tutorials most of it, just some terms i do not understand sorry. I need networking for dummies for me lol. Thanks again

    ReplyDelete
    Replies
    1. Once you have arch Linux you will need to follow the guide in his blog for installing and setting up samba. It's all pretty straight forward and instructions for setting up samba on Linux can be found allover the internet if you need additional help. Once you have Linux on the pogoplug it's not much different than any other computer running Linux from command. All the same packages and instructions will apply. You will need to ssh into the pogoplug every time you add packages since command line is the only way to access it. You will probably ssh into the device several times as your testing and configuring samba alone. Hope that helps

      -Brent

      Delete
    2. Thanks Brent, for the quick reply and helping me, would you recommend anyone to do this types of command to the pogoplug or this is only for advanced people to try out? I do not want to try and I am going to get stumped or even brick my pogoplug device. Thanks again

      Delete
    3. I will try to do it, but if I don't succeed try, try again I will get it to work.

      Delete
    4. Did you try the troubleshooting tip where I recommended using a different USB Drive? :)

      Delete
    5. For the Pogoplug V4, please make sure you're using the top USB Port. If you're having boot up issues with your particular USB flash drive, I would recommend picking up a SanDisk Cruzer Fit or the Seagate Hard drive I mentioned above. I've tested both with my Pogoplug V4 and have no boot up issues.

      Delete
    6. Wow I did it very good instructions on how to do this. Thank you Qui, and Brent for giving me the courage and wisdom in my time of need, nah just kidding, but really thanks a lot, there is no way I could of done this searching everywhere on how to do this type of stuff. I have 2 more questions, first is on the top I have a usb flash drive and a 1TB seagate portable drives and I would like to know how would I add another hard drive to the pogoplug? I would have to remove the usb flash drive? Let me know what is my next step on how to add another 1TB hard drive to the pogoplug please thank you.Second question do I need to format my 1 TB hard drive? Or just leave it default? I have added arch linux and samba to the usb and portable hard drive just to let u know and the speed I am transferring is about 5 MB I have a pretty good isp, but maybe I needed to format my 1TB hard drive I dont know what I am doing wrong I just hoping I can get faster media transfers 5 MB is a little slow I want your 23 MB speed lol. Please I hope you understand what I am saying, I am just learning, and would like to learn more so please let me know and thank you so much.

      Delete
    7. You can plug additional USB Drives into the USB slots on the back of your Pogoplug. Yes you should format the drive as ext3. Please read my other comments regarding network speeds.

      Delete
  59. Hi; Nice tutorial you describe here, very helpful in configuring the mos common use uno do in a device like the pogoplug.
    Fro the post I understand you use Apple devices, I got some windows computers that I would like to backup to my pogoplug and the better choice I have found is to use CrashPlan as backup solution form my PC.
    I have try to install CrashPlan to my pogoplug but haven't been successful so far (java errors trying to start the setup), any help will be appreciated

    ReplyDelete
    Replies
    1. Sorry, can't provide you any help with crash plan (not something I use).

      For Windows backup, Windows Home Server 2011 has some really mic backup features. Otherwise, just use the built in Windows backup pointed at a samba share hosted by the Pogoplug isn't a bad option.

      Delete
  60. First let me thank you, this post has been extremely helpful. I have a Pogoplug up and running as a NAS, working perfectly! I have a laptop drive being used as an OS drive, and a 3.5 external drive used as the storage drive.

    One question - would you happen to have instructions on how to get the storage drive to spin down after X amount of time? I have seen many posts on the Arch Linux ARM site, but its all a bit confusing to me!

    Thanks again!

    ReplyDelete
    Replies
    1. Sorry this is not something I'm familiar with or care about.

      Some good discussion on the topic here - http://archlinuxarm.org/forum/viewtopic.php?f=53&t=2167

      Delete
    2. Thanks a bunch - will read through that in detail!

      Delete
  61. Shairport - again :(
    After updating to your latest compiled ver I've lost the sound. Itunes/Airfoil connected and playing but completely nothing comming out of the speakers.
    PCM is set to 100%. Sound card haven't changed.

    ReplyDelete