Friday, December 20, 2013

PogoPlug E02 - Install Debian

I got myself another cheap PogoPlug E02 from Adorama . It is sold as a model P21, but I actually got the E02, which is nicer (better processor, more RAM).

Steps to install Debian Linux on the PogoPlug

0. start up the PogoPlug, no drives attached

1. SSH into the PogoPlug (default password: ceadmin)

2. Disable the PogoPlug Service
    killall hbwd

3. install newer UBOOT as per instructions here: http://projects.doozan.com/uboot/
    - select to disable the PogoPlug service
    - set the arcNumber to 3542 as per here: http://archlinuxarm.org/forum/viewtopic.php?t=2780
     /usr/sbin/fw_setenv arcNumber 3542

4. plug in USB drive

5. partition the USB drive with fdisk
  - if fdisk gives "command not found" execute directly from /usr/sbin (this might also be in /sbin)
    cd /usr/sbin
    ./fdisk /dev/sda

- fdisk usage
  • p to show your current partitions
  • d 1 to delete your first partition, and if necessary d 2, d 3, and so on
  • p again to make sure there are no partitions left
  • n for new partition, p for primary, 1 for partition 1, enter to accept the default starting point, and then +(size)M to size it. I used a 2 GB drive, so I put +1536M for 1.5 GB
  • n, p, 2, enter, enter to create a swap partition out of the rest. Ideally you won't need a swap partition at all (we're going to try to avoid it), but better safe than sorry.
  • t to change filesystem types, 2 for the second partition, and 82 for swap. 
  • a, 1 to set partition 1 as active/bootable
  • p one last time to make sure everything looks okay. Once again, fdisk hasn't done anything to the drive yet, so if you see a mistake, you can either start over or fix it if you know what needs to be done.
  • And finally, w to write the partition table to disk and exit.

6. DOES NOT WORK: Install Debian Wheezy (7.0)

- Follow instructions from Jeff Doozan's site: http://projects.doozan.com/debian/ use Debian 7.0 (Wheezy)

  cd /tmp
  wget http://projects.doozan.com/debian/kirkwood.debian-wheezy.sh
  chmod +x kirkwood.debian-wheezy.sh
  export PATH=$PATH:/usr/sbin:/sbin
  ./kirkwood.debian-wheezy.sh

wait ...... (this may take some time)

Major Complications: I ran into the following error:
FATAL: Kernel too old in debootstrap

- tried to install rescue system, but you cannot install that from the device itself, needs to be booted from USB
- created USB boot drive with rescue system 3.0 (http://forum.doozan.com/read.php?4,8277) .. BUT from there you CANNOT seem to install the rescue system V2 into NAND - it says uBoot is outdated even though it's the latest version


After a lot of unsuccessful attempts went the following route:

1. install Debian Squeeze
Follow the instructions here: https://sites.google.com/site/leiqincwru/pogoplus/install-debian-squeeze-on-pogoplug-e02
(The regular instructions are here, but the above link has additional commands to be executed for the PogoPlug).


This is important for PogoPlug:
./mkimage -A arm -O linux -T kernel  -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.32-5-kirkwood -d ../../boot/vmlinuz-2.6.32-5-kirkwood ../../boot/uImage

./mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-2.6.32-5-kirkwood -d ../../boot/initrd.img-2.6.32-5-kirkwood ../../boot/uInitrd


2. install rescue system 2.8.2
  * link: http://forum.doozan.com/read.php?4,7915
  * copied files to the debian system installed under #1
  * install mtd-utils if flash_eraseall is not found (apt-get install mtd-utils)
  * manual install
flash_eraseall /dev/mtd1
nandwrite /dev/mtd1 uImage-mtd1.img


flash_eraseall /dev/mtd2
ubiformat /dev/mtd2 -s 512 -f rootfs-mtd2.img -y


fw_setenv set_bootargs_rescue 'setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts'
fw_setenv bootcmd_rescue 'run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
fw_setenv bootcmd_pogo 'run bootcmd_rescue'
fw_setenv rescue_installed 1

3. upgrade from Squeeze to Wheezy - described here (http://blog.vinnymac.org/?p=11)

Finally. Success.

4. Optional:
  * update to a newer 3.x kernel from the following link: http://forum.doozan.com/read.php?2,12096
 


Note: apt-get upgrade might complain about half-installed packages because we manually installed the new kernel. In that case manually edit /var/lib/dpkg/status file and change "half-configured" to "installed". See here: http://ubuntuforums.org/showthread.php?t=1547998

Note2: after that there was still an error message about a "Configured-Version for package with inappropriate Status" - there was a line in the status file called "Config-Version". After it deleted that line the error went away.

5. Change the sources to the proper wheezy sources

vim /etc/apt/sources.list

add these lines, comment the others:

deb http://http.debian.net/debian wheezy main contrib non-free
deb http://http.debian.net/debian wheezy-updates main contrib non-free


6. Update your system
  apt-get update
  apt-get upgrade

7. Configure timezone

dpkg-reconfigure tzdata



No comments: