Welcome! Log In Create A New Profile

Advanced

Unable to boot Debian on Pogoplug E02

Posted by BuckNaked 
Unable to boot Debian on Pogoplug E02
July 10, 2013 09:19PM
I'm trying to bring up Debian on a Pogoplug E02, and it refuses to boot. Normally I would continue troubleshooting hoping to avoid embarrassment ... but I am waiting for a CA42 and at present have no way to get in except SSH from Windows.

This Pogoplug is to host my bitcoin miner, which needs to come off the 600 watt PC and onto the Pogoplug. I would use Arch Linux ARM ... but there is no precompiled cgminer and I was unable to install the necessary development tools due to missing packages at the distro host.

The system reliably installs and boots ArchLinuxARM from http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray.

Hardware: Pogoplug E02 flashed with Rescue kernel

Drives: Ativa 4 GB USB flash, HP 4 GB USB flash, Travelstar 30 GB 2.5" through IDE-USB cable

Symptoms: Debian installs without issues. Lenny, squeeze and wheeze have been tried. Both USB flash drives and the 2.5" Travelstar have been tried. After installation, the Pogoplug does not reboot to Debian. Pushing the reset button does not boot. Powering down and restart does not boot. Failure symptoms are identical for USB and hard drive: The Pogoplug comes up, rattles the (hard) drive briefly, the network LEDs flicker, then a pause; the drive rattles a little bit, then no further activity. Waiting 10 minutes does not bring the system online. The router shows that the Pogoplug is not connected at any IP.

I'll be pleased to provide a modest Bitcoin or Terracoin tip to anyone who has a solution.

Here's a log of the installation:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2013.07.10 19:43:56 =~=~=~=~=~=~=~=~=~=~=~=
login as: root
root@192.168.0.13's password:
rescue:~# uname -a
Linux rescue 2.6.32.18-dockstar #1 Thu Feb 17 03:09:57 EST 2011 armv5tel GNU/Linux
rescue:~# fdisk /dev/sda

The number of cylinders for this disk is set to 3648.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 183 1469916 83 Linux
/dev/sda2 184 246 506047+ 82 Linux swap / Solaris

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-3648, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-183, default 183):
Using default value 183

Command (m for help): p

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 183 1469916 83 Linux
/dev/sda2 184 246 506047+ 82 Linux swap / Solaris

Command (m for help): 1 a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 183 1469916 83 Linux
/dev/sda2 184 246 506047+ 82 Linux swap / Solaris

Command (m for help): v
54653192 unallocated sectors

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
rescue:~# sync
rescue:~# sync
rescue:~# cd /tmp
rescue:/tmp# wget http://projects.doozan.com/debian/kirkwood.debian-wheezy.sh
Connecting to projects.doozan.com (50.116.34.13:80)
kirkwood.debian-whee 100% |*******************************| 11159 --:--:-- ETA
rescue:/tmp# chmod +x kirkwood.debian-wheezy.sh
rescue:/tmp# export PATH=$PATH:/usr/sbin:/sbin
rescue:/tmp# ./kirkwood.debian-wheezy.sh


!!!!!! DANGER DANGER DANGER DANGER DANGER DANGER !!!!!!

This script will replace the bootloader on /dev/mtd0.

If you lose power while the bootloader is being flashed,
your device could be left in an unusable state.


This script will configure your Dockstar to boot Debian
from a USB device. Before running this script, you should have
used fdisk to create the following partitions:

/dev/sda1 (Linux ext2, at least 400MB)
/dev/sda2 (Linux swap, recommended 256MB)


This script will DESTROY ALL EXISTING DATA on /dev/sda1
Please double check that the device on /dev/sda1 is the correct device.

By typing ok, you agree to assume all liabilities and risks
associated with running this installer.

If everything looks good, type 'ok' to continue: ok
Connecting to projects.doozan.com (50.116.34.13:80)

install_uboot_mtd0.s 0% | | 0 --:--:-- ETA
install_uboot_mtd0.s 100% |*******************************| 18406 00:00:00 ETA
Installing Bootloader
# checking for /usr/sbin/nandwrite...
# checking for /usr/sbin/nanddump...
# checking for /usr/sbin/flash_erase...
# checking for /usr/sbin/fw_printenv...
# checking for /etc/fw_env.config...

# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (50.116.34.13:80)
Connecting to projects.doozan.com (50.116.34.13:80)

valid-uboot.md5 0% | | 0 --:--:-- ETA
valid-uboot.md5 100% |*******************************| 1133 --:--:-- ETA
## Valid uBoot detected: [pinkpogo davygravy-2012-02-20-current]
## The newest uBoot is already installed on mtd0.

# uBoot installation has completed successfully.
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
91968 inodes, 367479 blocks
18373 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=377487360
12 block groups
32768 blocks per group, 32768 fragments per group
7664 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Writing inode tables: 0/12 1/12 2/12 3/12 4/12 5/12 6/12 7/12 8/12 9/1210/1211/12done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Setting up swapspace version 1, size = 518184 kB


# Starting debootstrap installation
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: insserv libbz2-1.0 libdb5.1 libsemanage-common libsemanage1 libslang2 libustr-1.0-1
I: Found additional base dependencies: adduser cpio debian-archive-keyring devio gnupg gpgv initramfs-tools klibc-utils libapt-pkg4.12 libbsd0 libedit2 libgcrypt11 libgnutls26 libgpg-error0 libgssapi-krb5-2 libidn11 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 libncursesw5 libp11-kit0 libprocps0 libreadline6 libssl1.0.0 libstdc++6 libtasn1-3 libudev0 libusb-0.1-4 libuuid-perl libwrap0 linux-base linux-image-3.2.0-4-kirkwood openssh-client procps readline-common vim-common
I: Checking component main on http://cdn.debian.net/debian...
I: Retrieving libacl1
<numerous successful lines removed>
I: Configuring e2fsprogs...
I: Unpacking the base system...
I: Unpacking adduser...
<numerous successful lines removed>
I: Unpacking wget...
I: Configuring the base system...
I: Configuring gpgv...
<numerous succcessful lines removed>
I: Configuring flash-kernel...
I: Base system installed successfully.

Installation complete

You can now reboot your device into Debian.
If your device does not start Debian after rebooting,
you may need to restart the device by disconnecting the power.

The new root password is 'root' Please change it immediately after
logging in.

Reboot now? [Y/n] Y
rescue:/tmp#
Re: Unable to boot Debian on Pogoplug E02
July 10, 2013 10:36PM
BuckNaked,

SSH into rescue system and print out
fw_printenv
And let's take a look at that.

Also, it's best to setup netconsole right after you have a successful Debian installation (in fact, a successful uBoot installation would be enough to setup netconsole).
http://forum.doozan.com/read.php?3,14

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 07/10/2013 10:37PM by bodhi.
Re: Unable to boot Debian on Pogoplug E02
July 10, 2013 11:34PM
Bodhi, thanks for your reply. I will set up netconsole as soon as I get Debian up.

fw_printenv reports:

rescue:/# fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:25:31:04:B9:A0
arcNumber=2998
rescue_installed=1
usb_rootfstype=ext3


Additional information, /etc/fstab on the Debian drive:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/root / ext2 noatime,errors=remount-ro 0 1
/dev/sda2 none swap sw 0 0



Edited 1 time(s). Last edit at 07/10/2013 11:56PM by BuckNaked.
Re: Unable to boot Debian on Pogoplug E02
July 11, 2013 12:48AM
BuckNaked,

Try these possible solutions in this order. If one did not work, try the next.

1. Take the USB Debian stick to another Linux box and change it to Ext3 if it was Ext2. Your uBoot env rootfstype is set to ext3.
(assuming the stick is mounted as sdb1):
tune2fs -O ^has_journal /dev/sdb1

then reboot with the USB stick. If it did not work try the next step.

2. ssh into rescue system, and change arcNumber to 2097:
fw_setenv arcNumber 2097
then reboot with the USB stick (keep it as ext3)

If it did not work, try the next step.

3. Keep arcNumber set to 2097, and the stick as ext3. arcNumber 2097 is the Marvell Reference Board number so it should boot with the basic kirkwood rootfs. 2998 is the Dockstar archNumber, not the Pogo E02 anyway.
.
On another Linux box again, label the USB stick as rootfs (assuming the stick is mounted as sdb1):
tune2fs -L rootfs /dev/sdb1

Boot back into rescue system, set rootfs label
fw_setenv usb_init 'run usb_scan; setenv usb_root LABEL=rootfs'

then reboot witht the USB stick.

If even this did not work :) try the next step.

4. Keep everything you've done in step 1 to 3 as they are. And try this rootfs (see Update 19 June 2013 section):
http://forum.doozan.com/read.php?2,12096

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Unable to boot Debian on Pogoplug E02
July 11, 2013 01:16AM
Will do. I don't have a Linux system or a system drive ready to go ... I shipped my Neoware thin clients out as web servers ... so I'll need to download a live distro to do the ext3 conversion. I tried using tune2fs on the rescue system, and the necessary commands don't seem to be present.

It's going on 1 AM here so I'll need to do this tomorrow. I'll update as soon as I've done the conversion. Thanks for your help.
Re: Unable to boot Debian on Pogoplug E02
July 11, 2013 05:57PM
Bodhi, thanks for your help with this problem. I tried the ext2 to ext3 conversion offline several different ways and none worked. After thinking about it a while, I modified the kirkwood.debian-wheezy.sh file to use mkfs.ext3, which was unsuccessful. Eventually I found a solution:

From rescue, manually create the /dev/sda1 filesystem using mkfs.ext3

Edit the /kirkwood.debian-wheezy.sh to remove the section creating the /dev/sda1 filesystem.

Run the shell script.

When prompted to reboot, answer no. The Debian system fstab must be modified before reboot.
cd /tmp
mkdir usb
mount /dev/sda1 usb
cd usb
cd etc
vi fstab.
Change the ext2 in the line for /dev/sda1 to ext3.

Reboot.

This was successful first time around. The problem should probably be described in a FAQ.

Let me know your Bitcoin or Terracoin receiving address; it would have taken far longer to resolve this without your help.
Re: Unable to boot Debian on Pogoplug E02
July 12, 2013 12:41AM
Congrats!

Evidently you're pretty well verse in Linux so solving this problem is not that difficult :) I'm merely suggesting clues, can't really take credit for real solution! but if you'd like, please direct any contribution to the site, i.e. it'd cost Jeff something to host this site for us, I'm sure.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Unable to boot Debian on Pogoplug E02
July 12, 2013 02:09AM
I will do that.

I wrote up the procedure for posterity and it can be seen at http://www.miim.com/thebside/pogoplug/index.html. I will be glad to have any feedback or suggestions on that.

Anyone with a Pogoplug V2 and Butterfly Labs ASIC miner who wants to avoid compiling cgminer, let me know and I will be glad to provide a copy of the one I compiled. It was not difficult to compile, just exacting in finding the missing prerequisite packages.



Edited 1 time(s). Last edit at 07/12/2013 09:01AM by BuckNaked.
Dock
Re: Unable to boot Debian on Pogoplug E02
August 11, 2013 03:44AM
I'm trying to compile cgminer for a seagate dockstar and I think it has the same processor. Would like to read your guide, but your website seems to be offline :(
Re: Unable to boot Debian on Pogoplug E02
August 19, 2013 05:26PM
BuckNaked,

Could you provide a copy of the cgminer compiled code? I have a Pogoplug E02 (Debian installed already) and ASICMiner Block Erupters USB (Sapphire). I would like to use cgminer with my setup.

Thx
Re: Unable to boot Debian on Pogoplug E02
August 19, 2013 06:08PM
No problem. The source kit (as modified by make for the Pogoplug configuration) and the executable will be found in the .tar.bz2 at the following link:

http://www.tempfiles.net/download/201308/315874/cgminer.html

This is a short-term link and will probably only last a few weeks. Unfortunately the file is too large to attach to this post even after bzipping -9.
ch
Re: Unable to boot Debian on Pogoplug E02
January 17, 2014 11:20AM
I have a pogoplug E02, i installed Archlinux ARM and didnt know what to do as Pogoplud~ was coming after SSH, so I plugged a different usb and tried something which made my pogoplug not accessible, green light flashes. Can you please tell me how to install on the USB and load the Pogoplug so that I can atleast SSH.

Other than the seriel connection , I tried everything nothing worked, by the way I am newbie for linux, still searched online and tried connecting, can any of you help me to get back to the SSH and install pogoplug software or debian.
Re: Unable to boot Debian on Pogoplug E02
January 17, 2014 12:57PM
ch,

I am no E02 series expert but it sounds like the rescue kernel has been made non-functional somehow.

If you have the serial console, I would reload the Doozan rescue kit using the serial console, and then proceed from there using the procedure at the web page above.

bodhi can probably give better advice on this situation.
Re: Unable to boot Debian on Pogoplug E02
January 17, 2014 06:18PM
ch,

Other than using serial console, you can try to boot with my latest rootfs (in my signature). See instruction to put it on a USB thumb. After you've booted into Debian, SSH in and then you could fix your stick, or put a fresh Arch Linux ARM rootfs on it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: