THIS TUTORIAL ASSUMES
- POGO-E02
- 1TB USB powered USB drive
PREP THE POGOPLUG FOR SSH ACCESS
NOTE: by default the pogoplug comes with ssh disabled now so you must activate it first on my.pogoplug.com- Connect an ethernet cable to your router or modem and then to the pogoplug.
- With no drives connected, connect the power cord to the pogoplug to turn it on.
- Go to my.pogoplug.com. Sign up, then sign in.
- Click Activate Device at the bottom of the page. Complete all of the necessary steps to activate your device.
- Click the gear in the upper right corner > Settings > Security > select the checkbox for Enable SSH > create a password > click ok.
NOTE: you should now be able to ssh into your pogoplug
FIRST TIME SSH INTO POGOPLUG
- Log in to your router or modem and find the page that lists your connected devices and their associated IP addresses. For my c1000a modem it is Modem Status > Resource Table > LAN Device Session Log > Device Name and IP Address.
- From this list identify the most likely IP address of your pogoplug.
- ssh into your pogoplug:
# From a linux terminal enter the following command.
# Where 192.168.1.19 is the ip address of your pogoplug
ssh root@192.168.1.19
# Enter the password you set up in step 5 above.
# Hit Enter
# You should now see a prompt similar to this:
Pogoplug#
ARCH LINUX ARM INSTALLATION
- Stop the pogogplug software otherwise it will interfere with the installation process. This only needs to be done once.
- Download and install a bootloader that can boot from USB drives:
cd /tmp wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh # make it executable chmod +x install_uboot_mtd0.sh # run the install script ./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 - to "remove" the original Pogoplug software
- Connect a 1GB or larger USB drive. This is where we will install Arch Linux Arm. WARNING: This drive will be wiped of all it's data.
- Partition your USB drive. We will be using 3 partitions. One for the root partition (/), one for the swap partition, and one for the /home partition.
!! WARNING: ALL DATA ON THIS DRIVE WILL BE LOST DURING THIS STEP !!
/sbin/fdisk /dev/sda # list partitions p # new partition n # primary partition p # first partition 1 # default to start block # press enter # 10GB root (/) partition +10G # list partitions and verify your first partition p # new partition n # primary partition> p # second partition 2 # default to start block # press enter # create 1GB swap partition +1G # list partitions verify it's 1GB partition p # change type t # select partition 2 you just created 2 # changes to linux swap type 82 # list partitions verify it's linux swap now p # new partition n # primary partition p # third partition 3 # default to start block # press enter # default to end block. use remainder of disk # press enter # list partitions verify all three are correct p # write new partition table to disk w
- Download linux filesystem creation tool
wget http://archlinuxarm.org/os/pogoplug/mke2fs # make it executable chmod 755 mke2fs
- Format your first partition to ext3 filesystem and label it ROOTFS
./mke2fs -L ROOTFS -j /dev/sda1
- Mount your root partition into a temporary directory to facilitate installation of Arch Linux into the root partition (/dev/sda1)
mkdir usb mount /dev/sda1 /tmp/usb
- Download and install Arch Linux ARM.
cd usb wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz # This can take a while tar -xzvf ArchLinuxARM-armv5te-*.tar.gz rm ArchLinuxARM-armv5te-*.tar.gz sync
- Clean up and reboot.
cd .. umount usb /sbin/reboot
killall hbwd
INITIAL CONFIGURATION
- ssh back into the pogoplug
# Note: your ip address might have changed. # check your router again for the ip. ssh root@192.168.1.19 # this time the password will be root
- Change the hostname. I'm using tvcloud.
hostnamectl set-hostname tvcloud
- Format and label your partitions. Add fstab entries, mount partitions.
# add ROOTFS to fstab # so file system check will run when needed echo "LABEL=ROOTFS / ext3 rw,noatime 0 1" >> /etc/fstab # make /dev/sda2 a swap partition with SWAP label mkswap -L SWAP /dev/sda2 # add entry to fstab for the swap partition echo "LABEL=SWAP swap swap defaults 0 0" >> /etc/fstab # turn swap partition on swapon -a # check swap swapon -s # format/label third partition. # this will take a while for over 900GB mkfs.ext3 -L HOME /dev/sda3 # add HOME to fstab # so file system check will run when needed. # Also mounts to /home. echo "LABEL=HOME /home ext3 defaults,noatime 0 2" >> /etc/fstab # mount all in fstab mount -a
- Upgrade the kernal and install some needed packages
pacman -Sy linux-kirkwood linux-kirkwood-headers ntp base-devel nano wget # Hit enter when prompted with "Enter a selection (default=all)" # Answer Y when prompted with # linux-kirkwood and linux are in conflict. Remove linux [y/n] # This might take a while
- Set your timezone
# to list available timezones timedatectl list-timezones # once you've identified yours then set it timedatectl set-timezone America/Denver
- Set the network time protocol daemon to autostart since the pogoplug has no hardware clock
systemctl enable ntpd # start the ntp daemon systemctl start ntpd
- Set a static IP addresss
cd /etc/netctl/ # move the current eth0 config to a backup location mv eth0 examples/eth0.old # copy the static example cp examples/ethernet-static eth0 # edit the current eth0 config nano eth0 # Change the following sections to match your network. # My ip address is going to be 192.168.1.252. # My router is 192.168.1.2. Address=('192.168.1.252/24') Gateway='192.168.1.2' DNS=('192.168.1.2') # CTRL+O to write your changes # CTRL+X to quit
- Force a time update after the network starts
echo "ExecUpPost='/usr/bin/ntpdate -u pool.ntp.org'">>/etc/netctl/eth0
- Install needed apps fw_printenv/fw_setenv is no longer working. Run the install_uboot_mtd0.sh script from within Arch Linux ARM. It will install the applications for you.
- Have uboot mount partition as ext3.
fw_setenv usb_rootfstype ext3
- Correct machid - make LED Green versus Orange
fw_setenv machid dd6
- Check if ethaddr is defined
fw_printenv ethaddr
- if you run into issues running fw_setenv and fw_printenv commands
pacman -Sy uboot-env echo "/dev/mtd0 0xc0000 0x20000 0x20000">>/etc/fw_env.config
- Set ethaddr. replace XX:XX:XX:XX:XX with the MAC found on the bottom of your pogoplug
fw_setenv ethaddr "XX:XX:XX:XX:XX"
SECURE THE INSTALLATION
- Reboot the server so it will use the new static ip
reboot
- ssh back in using the new ip address
ssh -p 25000 root@192.168.1.252
- Change the root password. While logged in as root issue this command and enter the password twice.
passwd
- Add user cloudadmin for all installation apps that don't require root.
useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash cloudadmin # specify user password passwd cloudadmin
- Test the new user
# leave the current terminal open with root logged in # just in case something didn't go right you can change it. # open a new terminal and ssh in as the new user ssh cloudadmin@192.168.1.252
- If the login test in step 3 was successful then change the ssh settings to disallow root login.
# change to root su # enter password # edit the ssh daemon config file nano /etc/ssh/sshd_config # search for and change the following settings # Note: if accessing your pogoplug via ssh from outside # your network you must forward port 25000 inside # your router to ip address 192.168.1.252 Port 25000 PermitRootLogin no # CTRL+O to write your changes # CTRL+X to quit # restart ssh daemon systemctl restart sshd # exit root. exit # exit cloudadmin ssh session exit
- Test your new ssh settings
# leave the current terminal open with root logged in # just in case something didn't go right you can change it. # open a new terminal and ssh in as the new user. # Note: we are using the new port set in step 4. ssh -p 25000 cloudadmin@192.168.1.252
REFERENCES
http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray#qt-platform_tabs-ui-tabs2http://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.html
Thanks a lot for such a complete guide.
ReplyDeleteOne question: what's the difference between the u-boot loader you recommend and the one from archlinuxarm.com guide (http://archlinuxarm.org/os/armv5te/boot/pogo_e02/pogo_e02.sh)? Does it matter which one is used?
Also, how does the boot loader chooses which usb drive to boot from? If I happen to have two drives plugged in, both with OS installed, which one will it boot?
Thanks.
Sorry for the late reply. The difference in uboot loaders are the partitioning schemes for NAND as well as what the uboot has been configured to boot. Jeff's uboot comes with netconsole enabled and can also boot Arch Linux as well as Debian and the original Pogo Os. However, as of this writing Arch Linux uboot will also have netconsole enabled. The choice of which uboot to use really depends on what you will be doing with your Pogo-E02. Within uboot there are configuration parameters set to search for boot/configuration details on the respective usb connected devices. When it finds one it then loads this and passes it off to the Linux kernel. Since the load occurs in order, it will load the OS located on your first connected device. The pogo e02 has 4 usb ports. I'm not sure which one is considered device 0 but I'm guessing it's the front usb port although I have not reviewed the specs or tested to confirm this. Some say Jeff's uboot is more flexible than Arch's. I believe those people are the ones that switch between OSs (debian, arch, pogo) frequently and need the flexibility. There is also another uboot out there referred to as bodhi's but I haven't tried it myself. And if you're really a diehard you could download the original uboot source code and roll your own! I hope this helps!
Delete