Pogoplug v2 doesn't show up on LAN after Archlinux install
January 23, 2015 02:32PM
Hello, I'm looking for some troubleshooting help for my Pogoplug (Pink E02) v2 which, from what I gather, may have a corrupted uBoot, but I'm not positive as I'm a noob in this area.

I tried to install Archlinix on it, which I was able to do successfully once in the past, but after reboot the front LED does not power on and the device doesn't show up as a network connected device in my router setup (no DHCP request sent I believe as only the green ethernet LED is on). I cannot ping its former IP address. There is access activity on the USB drive for a while when booting. If I try booting it up w/o a USB drive, it ends up in the same state. No other drives are attached to the unit.

I tried creating another USB stick with 'rootfs' per this post http://archlinuxarm.org/forum/viewtopic.php?p=19207&sid=9735a59351f36c508aa0596fac33952d#p19207
With just that USB drive in the pogoplug the front LED turned green but still no network activity...

I have a serial cable on-order but was hoping there is some other troubleshooting activity I can try. Otherwise, I'm hoping to get some pointers on what I need to do to revive the box once the serial cable arrives.

I have at my disposal, a box with Linux Mint (I'm a linux noob though), Win 7 x64, and another E02 Pogoplug, which I do not want to modify in any way, but perhaps it may be helpful for troubleshooting.

Thank you
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 23, 2015 11:08PM
Waynosan,

> With just that USB drive in the pogoplug the front
> LED turned green but still no network activity...

This is a good sign. It means your u-boot is not corrupted. The kernel has been loaded and it tried to mount rootfs. The problem remained is with the mounting rootfs. When you create Arch rootfs, make sure that:

- log in to Linux Mint as root user. During the preparation of the rootfs, you have to be root.
- untar the rootfs archive to a single Ext3 partition USB thumb drive.
- sync (repeat the sync comand a few times to be sure)
- take it to the Pogo V2 and power up.

If you can't boot with Arch rootfs, try my Debian rootfs (use the latest 3.16) from this kernel and rootfs thread. After you can boot into Debian, you can then mount the Arch stick and examine the content to see if it was OK.

If all failed, try using a different USB stick (Sandisk is among the best for booting).

PS. which installation procedure did you use to install Arch? when did you install? Did you keep the log of the installation (i.e. copy and paste to text file)?

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



Edited 3 time(s). Last edit at 01/24/2015 04:35AM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 24, 2015 12:45PM
Bodhi,
Thank you for taking the time to respond.

I tried Arch rootfs process again using 2 different USB drives and no dice. The PP never shows up on the network. I follwoed the steps in this post:
http://archlinuxarm.org/forum/viewtopic.php?p=19207&sid=9735a59351f36c508aa0596fac33952d#p19207

Next I went to the post you referenced to create the Debian rootfs. Looks like everything went OK with the USB disk creation as far as I can tell. When I plugged it into the PP and rebooted the effect was:

Ethernet green LED goes on for a short amount of time but then turns off (and stays off) and the orange LED turns on and blinks once in a while (but is almost exclusively solid). The front pogoplug LED never turns on. The USB drive gets accessed but for a very short period of time (~1 second) versus much long when the Arch rootfs was installed on it. Tried 3 different port on the PP and two different drives.

ARghhhhh.

Unfortunately I didn't keep a log of the installation but I followed the process here:
http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray

The only difference is that I had to use tar instead of the bsdtar command as it was hanging on that step. I noticed that there were others with this problem in the forums so I'm not sure why they don't correct that step in the procedure. What I failed to do was sync after running the tar command so I'm not certain if all the files were written onto the USB drive.

Is there any kind of logging that's done to the rootfs USB stick that I could try to take a look at?

Here's the log from the Debian rootfs creation (at least as much as was available on the screen):
zbyszko-EX58-UD4P rootfs # cd boot
zbyszko-EX58-UD4P boot # ls
config-3.17.0-kirkwood-tld-1      uImage
dts                               uInitrd
initrd.img-3.17.0-kirkwood-tld-1  vmlinuz-3.17.0-kirkwood-tld-1
System.map-3.17.0-kirkwood-tld-1  zImage-3.17.0-kirkwood-tld-1
zbyszko-EX58-UD4P boot # cp -a zImage-3.17.0-kirkwood-tld-1  zImage.fdt
zbyszko-EX58-UD4P boot # cat dts/kirkwood-pogo_e02.dtb >> zImage.fdt
zbyszko-EX58-UD4P boot # mv uImage uImage.orig
zbyszko-EX58-UD4P boot # mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.17.0-kirkwood-tld-1 -d /media/zbyszko/rootfs/boot/zImage.fdt /media/zbyszko/rootfs/boot/uImage
The program 'mkimage' is currently not installed. You can install it by typing:
apt-get install u-boot-tools
zbyszko-EX58-UD4P boot # apt-get install u-boot-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  u-boot-tools
0 upgraded, 1 newly installed, 0 to remove and 101 not upgraded.
Need to get 64.1 kB of archives.
After this operation, 208 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main u-boot-tools amd64 2013.10-3 [64.1 kB]
Fetched 64.1 kB in 0s (287 kB/s)      
Selecting previously unselected package u-boot-tools.
(Reading database ... 191698 files and directories currently installed.)
Preparing to unpack .../u-boot-tools_2013.10-3_amd64.deb ...
Unpacking u-boot-tools (2013.10-3) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up u-boot-tools (2013.10-3) ...
zbyszko-EX58-UD4P boot # mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.17.0-kirkwood-tld-1 -d /media/zbyszko/rootfs/boot/zImage.fdt /media/zbyszko/rootfs/boot/uImage
Image Name:   Linux-3.17.0-kirkwood-tld-1
Created:      Sat Jan 24 13:26:45 2015
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2832396 Bytes = 2766.01 kB = 2.70 MB
Load Address: 00008000
Entry Point:  00008000
zbyszko-EX58-UD4P boot # sync
zbyszko-EX58-UD4P boot # cd /
zbyszko-EX58-UD4P / # sync
zbyszko-EX58-UD4P / # umount media/zbyszko/rootfs



Edited 1 time(s). Last edit at 01/24/2015 12:48PM by Waynosan.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 24, 2015 02:06PM
Waynosan,

Quote

What I failed to do was sync after running the tar command so I'm not certain if all the files were written onto the USB drive.

This could be the only reason you had problem booting with Arch rootfs.

Quote

Unfortunately I didn't keep a log of the installation but I followed the process here:
http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray

If you ran this recently, this procedure installed the Arch new u-boot. It was setup to load uImage only, and won't try to detect uInitrd (which Debian rootfs needs). So that was probably why you could not boot with Debian rootfs. Question: did you see the Pogo front green LED flashing upon power up?

Quote

Is there any kind of logging that's done to the rootfs USB stick that I could try to take a look at?

No, since you have not got to the point where the kernel mounted rootfs, there is no log on USB.

Summary:

Since you have booted Arch rootfs successfully until the kernel has loaded, as you have stated above (i.e. LED turned green but still no network activity), and your current u-boot was setup to boot Arch. I would suggest to go through the creation of the Arch rootfs again on Linux Mint. Make sure you go through it again:

- with a good USB stick (e.g. Sandisk)
- log in to Linux Mint as root user (During the preparation of the rootfs, you have to be root)
- untar the rootfs archive to a single Ext3 partition USB thumb drive.
- sync (repeat the sync command a few times to be sure)
- take it to the Pogo V2 and power up.

If the above failed, we'll need the serial console to see clearly what failed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 24, 2015 08:04PM
The front LED does turn on when I boot with the Arch rootfs USB stick but not with the Debian rootfs.

The serial-USB cable came in earlier than expected so I hooked it up and this is what I get when I run Arch rootfs:


U-Boot 2014.04.R3-1 (May 26 2014 - 19:45:55) Arch Linux ARM
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7825408         00057ae5-01     83
Attempting to boot from usb 0:1...
** File not found /boot/uEnv.txt **
Checking if uenvcmd is set ...
Running default loadzimage ...
** File not found /boot/zImage **
Running default loaduimage ...
3124168 bytes read in 437 ms (6.8 MiB/s)
Booting from 0 ...
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux-3.1.10-34-ARCH
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3124104 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[   14.998111] rtc-mv rtc-mv: internal RTC not ticking
[   15.005906] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   15.953080] sd 0:0:0:0: [sda] No Caching mode page present
[   15.958644] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   15.967206] sd 0:0:0:0: [sda] No Caching mode page present
[   15.972878] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   16.305582] sd 0:0:0:0: [sda] No Caching mode page present
[   16.311130] sd 0:0:0:0: [sda] Assuming drive cache: write through


U-Boot 2014.04.R3-1 (May 26 2014 - 19:45:55) Arch Linux ARM
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7825408         00057ae5-01     83
Attempting to boot from usb 0:1...
** File not found /boot/uEnv.txt **
Checking if uenvcmd is set ...
Running default loadzimage ...
** File not found /boot/zImage **
Running default loaduimage ...
3124168 bytes read in 451 ms (6.6 MiB/s)
Booting from 0 ...
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux-3.1.10-34-ARCH
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3124104 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[   15.087249] rtc-mv rtc-mv: internal RTC not ticking
[   15.095048] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   16.042221] sd 0:0:0:0: [sda] No Caching mode page present
[   16.047780] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   16.056221] sd 0:0:0:0: [sda] No Caching mode page present
[   16.061901] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   16.292222] sd 0:0:0:0: [sda] No Caching mode page present
[   16.297773] sd 0:0:0:0: [sda] Assuming drive cache: write through

Welcome to Arch Linux ARM!

[  OK  ] Created slice Root Slice.
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Created slice User and Session Slice.
         Expecting device dev-ttyS0.device...
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Listening on LVM2 metadata daemon socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Created slice System Slice.
         Starting Setup Virtual Console...
[  OK  ] Reached target Slices.
         Starting Create list of required st... nodes for the current kernel...
         Mounting Temporary Directory...
         Mounting POSIX Message Queue File System...
[  OK  ] Created slice system-getty.slice.
         Starting Apply Kernel Variables...
         Starting Journal Service...
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on udev Kernel Socket.
         Starting udev Coldplug all Devices...
         Starting Remount Root and Kernel File Systems...
         Mounting Debug File System...
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Set up automount Arbitrary Executab...ats File System Automount Point.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Temporary Directory.
[  OK  ] Started Setup Virtual Console.
[  OK  ] Started Create list of required sta...ce nodes for the current kernel.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Journal Service.
[  OK  ] Started udev Coldplug all Devices.
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save Random Seed...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[FAILED] Failed to start Network Time Synchronization.
See "systemctl status systemd-timesyncd.service" for details.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[FAILED] Failed to start Network Time Synchronization.
See "systemctl status systemd-timesyncd.service" for details.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[FAILED] Failed to start Network Time Synchronization.
See "systemctl status systemd-timesyncd.service" for details.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[FAILED] Failed to start Network Time Synchronization.
See "systemctl status systemd-timesyncd.service" for details.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[FAILED] Failed to start Network Time Synchronization.
See "systemctl status systemd-timesyncd.service" for details.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[FAILED] Failed to start Network Time Synchronization.
See "systemctl status systemd-timesyncd.service" for details.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
         Starting Entropy Harvesting Daemon...
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
         Starting Network Service...
         Starting Permit User Sessions...
[  OK  ] Reached target Timers.
[FAILED] Failed to start Login Service.
See "systemctl status systemd-logind.service" for details.
[  OK  ] Started Entropy Harvesting Daemon.
[  OK  ] Started Permit User Sessions.
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
         Stopping Login Service...
[  OK  ] Stopped Login Service.
         Starting Login Service...
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
         Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
[  OK  ] Started Login Service.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
[  OK  ] Reached target Network.
         Starting OpenSSH Daemon...
[  OK  ] Started OpenSSH Daemon.
         Starting Network Name Resolution...

Arch Linux 3.1.10-34-ARCH (ttyS0)

alarm login:

As suspected, something is messed up with the network setup. Not sure what I need to do next to proceed....
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 24, 2015 11:19PM
Waynosan,

> As suspected, something is messed up with the
> network setup. Not sure what I need to do next to
> proceed....

Excellent! and you're right. This systemd problem should be solvable, but Arch rootfs specific. I'd suggest you post this boot log at Arch site, someone there will know what needs to be done.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 25, 2015 01:40AM
OK, so this is not a uboot problem then? Just not sure why it doesn't boot when there are no USB drives connected...
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 25, 2015 02:04AM
Correct. Your u-boot is fine. And everything looks great, except systemd network service.

Arch u-boot installation does not allow booting back to Pogo OS. That's why you cannot boot without USB.

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



Edited 1 time(s). Last edit at 01/25/2015 02:06AM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 25, 2015 11:47AM
I see. Is there a way to re-flash the original boot code back onto the device and start over? I think it will be quicker that me trying to fumble around and troubleshoot it with my total lack of kung-fu in this area.

Thanks for your continued support!
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 25, 2015 12:00PM
Waynosan,

> I see. Is there a way to re-flash the original
> boot code back onto the device and start over? I
> think it will be quicker that me trying to fumble
> around and troubleshoot it with my total lack of
> kung-fu in this area.
>
> Thanks for your continued support!

Yes there is. But it is even more prone to new problem!. I think you should resolve the Arch systemd network service, if you intend to use Arch. You are so close to getting the system working. And you have serial console, which makes trouble shooting network problem much easier. And even if you restart from scratch, you are likely to see this network problem again. ALARM developers should be able to help you solve it.

With that said, you can also boot Debian rootfs with some change in u-boot envs, which you can do in serial console (but I'm not suggesting that you should go with Debian :) just pointing out the facts so you know there is a temporary way to boot into Linux.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 26, 2015 06:36AM
Waynosan,

I've noticed you said:

Quote

I have at my disposal, a box with Linux Mint (I'm a linux noob though), Win 7 x64, and another E02 Pogoplug, which I do not want to modify in any way, but perhaps it may be helpful for troubleshooting.

You could restore your modded Pogo E02 to factory using the other virgin Pogo E02 mtd0. Let me know once you decide one way or the other. Would not be too difficult since you have 2 Pogo E02s (no need to find the original mtds).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 26, 2015 05:31PM
Yes, if you can help walk me through it it would be great. So far, I've not gotten much help in the other forum regarding fixing the systemd service so this could be my saving option. Assuming this entails "backup up" the virgin PP and "restoring" it on the one with the issues and them changing the MAC address? Would this require having to open up the virgin PP to get access to the serial port or is that not needed? If I need to open it up then I might want to wait a little longer...
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 26, 2015 11:22PM
Waynosan,

See this thread to see what needs to be done. Note that the instruction to backup NAND from Pogo POS is slightly different than from inside Debian or Arch. But it should give you some idea about the technical details (this instruction can not be used as is in your case). And, you don't need to connect serial console to the virgin E02 to do it.

However, I'd say that you should not be discouraged about Arch. I think you should look at Arch Wiki page about systemd journal, and systemd network service. You should be able to figure this out after reading the Wiki. After that, if you can't resolve it, you can get better help at Arch forum. The developers there expected users to at least spend sometime reading the manual and try to figure out the problem. In my observation, once you have done that, they are always very helpful.

OTOH, the reason I alway assist users in u-boot and booting related stuff is because it is so easy to brick the boxes. And booting problem is hard to figure out even for seasoned Linux users. But I am usually not doing that for Debian related issues, because there are many users in this forum can.

PS.

If you decide just to restore back to Pogo OS booting then post back and I'll help you in modifying the linked instruction to restore the modded Pogo E02 using the virgin one.

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



Edited 4 time(s). Last edit at 01/27/2015 01:12PM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
January 27, 2015 09:47PM
Thank you so much again for your help. I'll take a look and see if I can make sense of the wiki first... then let you know. It may not be until next week since I'm taking a trip this weekend.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 04, 2015 07:08PM
Hello bodhi,
I'm back home and would like to revert the unit to stock and start over. If you're still offering to help I would appreciate your continued guidance. Thanks.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 05, 2015 01:16AM
Waynosan,

Boot the stock Pogo E02, ssh in and download NAND tools as instructed in section A of the u-boot thread:


Quote

A. Flashing Instruction:

.....

Also, if you are running stock kernel or older Debian/Arch kernel, which do not provide mtd-utils and uboot-tools tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.

After you download NAND tools, try to mount an EXT2 or EXT3 USB stick (I recalled there might be difficulty in mounting a USB stick in stock OS). Try this and let me know if you can.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 06, 2015 05:02PM
OK, I downloaded the NAND tools and made them executable. Embarasingly, I do not know how to mount the USB drive. I tried a few things to figure out its location but commands like 'fdisk -l' and 'lsblk' do not work, and neither does the /dev/sda1 location. I have my HD and a ext3 USB stick plugged into the Pogoplug. See my thrashing below:

-bash-4.3# cd /tmp
-bash-4.3# wget http://download.doozan.com/uboot/nanddump
Connecting to download.doozan.com (50.116.34.13:80)
nanddump             100% |*******************************| 21286  --:--:-- ETA
-bash-4.3# wget http://download.doozan.com/uboot/nandwrite
Connecting to download.doozan.com (50.116.34.13:80)
nandwrite            100% |*******************************| 11500  --:--:-- ETA
-bash-4.3# wget http://download.doozan.com/uboot/flash_erase
Connecting to download.doozan.com (50.116.34.13:80)
flash_erase          100% |*******************************| 12819  --:--:-- ETA
-bash-4.3# wget http://download.doozan.com/uboot/fw_printenv
Connecting to download.doozan.com (50.116.34.13:80)
fw_printenv          100% |*******************************|   652k 00:00:00 ETA
-bash-4.3# wget http://download.doozan.com/uboot/fw_env.config
Connecting to download.doozan.com (50.116.34.13:80)
fw_env.config        100% |*******************************|   329  --:--:-- ETA
<load.doozan.com/uboot/files/environment/uboot.environment
Connecting to download.doozan.com (50.116.34.13:80)
uboot.environment    100% |*******************************|   128k --:--:-- ETA
-bash-4.3# chmod
BusyBox v1.7.0 (2008-02-26 19:25:17 IST) multi-call binary

Usage: chmod [-R] MODE[,MODE]... FILE...

Each MODE is one or more of the letters ugoa, one of the
symbols +-= and one or more of the letters rwxst

Options:
        -R      Recurse directories

-bash-4.3# dir
-bash: dir: command not found
-bash-4.3# ls
flash_erase        hbplug.log         resolv.conf        xcehbplug
fw_env.config      nanddump           uboot.environment
fw_printenv        nandwrite          var
-bash-4.3# chmod +x nanddump
-bash-4.3# chmod +x nandwrite
-bash-4.3# chmod +x flash_erase
-bash-4.3# chmod +x fw_printenv
-bash-4.3# chmod +x fw_env.config
-bash-4.3# chmod +x uboot.environment
-bash-4.3# ls
flash_erase        hbplug.log         resolv.conf        xcehbplug
fw_env.config      nanddump           uboot.environment
fw_printenv        nandwrite          var
-bash-4.3# mount /dev/sda1
mount: can't find /dev/sda1 in /etc/fstab
-bash-4.3# fdisk -l
-bash: fdisk: command not found
-bash-4.3# fdisk -l
-bash: fdisk: command not found
-bash-4.3# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (ro)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /tmp type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)
/tmp/.cemnt/sda2 on /tmp/.cemnt/mnt_sda2 type ufsd (rw,nosuid,nodev,noexec,noati
me,nls=utf8,uid=0,gid=0,fmask=22,dmask=22,nocase,sparse,force)
/tmp/.cemnt/sdb1 on /tmp/.cemnt/mnt_sdb1 type ext3 (rw,nosuid,nodev,noexec,noati
me,data=ordered)
-bash-4.3# lsblk
-bash: lsblk: command not found
-bash-4.3# mkdir test1
-bash-4.3# mount /dev/sda1 test1
mount: mounting /dev/sda1 on test1 failed: Invalid argument
-bash-4.3#
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 06, 2015 05:47PM
Waynosan Wrote:
-------------------------------------------------------
> OK, I downloaded the NAND tools and made them
> executable. Embarasingly, I do not know how to
> mount the USB drive. I tried a few things to
> figure out its location but commands like 'fdisk
> -l' and 'lsblk' do not work, and neither does the
> /dev/sda1 location. I have my HD and a ext3 USB
> stick plugged into the Pogoplug. See my thrashing
> below:
>
>
> -bash-4.3# cd /tmp
> -bash-4.3# wget
> http://download.doozan.com/uboot/nanddump
> Connecting to download.doozan.com
> (50.116.34.13:80)
> nanddump             100%
> |*******************************| 21286  --:--:--
> ETA
> -bash-4.3# wget
> http://download.doozan.com/uboot/nandwrite
> Connecting to download.doozan.com
> (50.116.34.13:80)
> nandwrite            100%
> |*******************************| 11500  --:--:--
> ETA
> -bash-4.3# wget
> http://download.doozan.com/uboot/flash_erase
> Connecting to download.doozan.com
> (50.116.34.13:80)
> flash_erase          100%
> |*******************************| 12819  --:--:--
> ETA
> -bash-4.3# wget
> http://download.doozan.com/uboot/fw_printenv
> Connecting to download.doozan.com
> (50.116.34.13:80)
> fw_printenv          100%
> |*******************************|   652k 00:00:00
> ETA
> -bash-4.3# wget
> http://download.doozan.com/uboot/fw_env.config
> Connecting to download.doozan.com
> (50.116.34.13:80)
> fw_env.config        100%
> |*******************************|   329  --:--:--
> ETA
> <load.doozan.com/uboot/files/environment/uboot.env
> ironment
> Connecting to download.doozan.com
> (50.116.34.13:80)
> uboot.environment    100%
> |*******************************|   128k --:--:--
> ETA
> -bash-4.3# chmod
> BusyBox v1.7.0 (2008-02-26 19:25:17 IST)
> multi-call binary
> 
> Usage: chmod [-R] MODE[,MODE]... FILE...
> 
> Each MODE is one or more of the letters ugoa, one
> of the
> symbols +-= and one or more of the letters rwxst
> 
> Options:
>         -R      Recurse directories
> 
> -bash-4.3# dir
> -bash: dir: command not found
> -bash-4.3# ls
> flash_erase        hbplug.log         resolv.conf 
>       xcehbplug
> fw_env.config      nanddump          
> uboot.environment
> fw_printenv        nandwrite          var
> -bash-4.3# chmod +x nanddump
> -bash-4.3# chmod +x nandwrite
> -bash-4.3# chmod +x flash_erase
> -bash-4.3# chmod +x fw_printenv
> -bash-4.3# chmod +x fw_env.config
> -bash-4.3# chmod +x uboot.environment
> -bash-4.3# ls
> flash_erase        hbplug.log         resolv.conf 
>       xcehbplug
> fw_env.config      nanddump          
> uboot.environment
> fw_printenv        nandwrite          var
> -bash-4.3# mount /dev/sda1
> mount: can't find /dev/sda1 in /etc/fstab
> -bash-4.3# fdisk -l
> -bash: fdisk: command not found
> -bash-4.3# fdisk -l
> -bash: fdisk: command not found
> -bash-4.3# mount
> rootfs on / type rootfs (rw)
> /dev/root on / type jffs2 (ro)
> none on /proc type proc (rw)
> none on /sys type sysfs (rw)
> none on /dev/pts type devpts (rw)
> none on /tmp type tmpfs (rw)
> none on /proc/bus/usb type usbfs (rw)
> /tmp/.cemnt/sda2 on /tmp/.cemnt/mnt_sda2 type ufsd
> (rw,nosuid,nodev,noexec,noati
> me,nls=utf8,uid=0,gid=0,fmask=22,dmask=22,nocase,s
> parse,force)
> /tmp/.cemnt/sdb1 on /tmp/.cemnt/mnt_sdb1 type ext3
> (rw,nosuid,nodev,noexec,noati
> me,data=ordered)
> -bash-4.3# lsblk
> -bash: lsblk: command not found
> -bash-4.3# mkdir test1
> -bash-4.3# mount /dev/sda1 test1
> mount: mounting /dev/sda1 on test1 failed: Invalid
> argument
> -bash-4.3#
>

I do remember that Pogo OS is a p.o.s :) very difficult to use due to a lot of useful commands such as fdisk are not available. I don't remember much else, since I could not wait to flash Jeff's u-boot and install Debian Squeeze the first time I logged in.

However since you see this from mount:
/tmp/.cemnt/sda2 on /tmp/.cemnt/mnt_sda2 type ufsd (rw,nosuid,nodev,noexec,noatime,nls=utf8,uid=0,gid=0,fmask=22,dmask=22,nocase,sparse,force)
/tmp/.cemnt/sdb1 on /tmp/.cemnt/mnt_sdb1 type ext3 (rw,nosuid,nodev,noexec,noatime,data=ordered)

See if you can tell which one is the USB stick and which is the USB HDD drive by using these:
lsusb
df -h

And try
cd /tmp/.cemnt/mnt_sdb1
ls -l
cd /tmp/.cemnt/sda2 on /tmp/.cemnt/mnt_sda2 
ls -l

Once you can identify the drive, then you can nanddump and copy the mtd0 to it.

Further thought: If this is too much trouble, perhaps we can look for the orginal pogo e02 mtd0 dump uploaded by someone and use it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 11:43AM
OK, the USB stick is sbd1. I backed up the mtd partitions (all 4) to the USB stick, using the process here:
http://ahsoftware.de/dockstar/

Here is what I have:
-bash-4.3# ls -l
-rw-r--r--    1 root     root      1048576 Feb  8 17:19 mtd0.img
-rw-r--r--    1 root     root           51 Feb  8 17:19 mtd0.img.sha1
-rw-r--r--    1 root     root      4194304 Feb  8 17:19 mtd1.img
-rw-r--r--    1 root     root           51 Feb  8 17:20 mtd1.img.sha1
-rw-r--r--    1 root     root     33554432 Feb  8 17:20 mtd2.img
-rw-r--r--    1 root     root           51 Feb  8 17:20 mtd2.img.sha1
-rw-r--r--    1 root     root     95420416 Feb  8 17:22 mtd3.img
-rw-r--r--    1 root     root           51 Feb  8 17:23 mtd3.img.sha1
-bash-4.3#

So now I'm on your step one (still with the USB stick in the good Pogoplug) but am getting this... the file is right there in the same directory so not sure why it can't find it. Any other permissions I need to change?

-bash-4.3# fw_printenv /tmp/.cemnt/mnt_sdb1/mtd0
-bash: fw_printenv: command not found
-bash-4.3# ls
flash_erase        hbplug.log         resolv.conf        var
fw_env.config      nanddump           test1              xcehbplug
fw_printenv        nandwrite          uboot.environment
-bash-4.3# fw_printenv
-bash: fw_printenv: command not found
-bash-4.3# ls -l
-rwxr-xr-x    1 root     root        12819 Feb  6 22:47 flash_erase
-rwxr-xr-x    1 root     root          329 Feb  6 22:47 fw_env.config
-rwxr-xr-x    1 root     root       668497 Feb  6 22:47 fw_printenv
-rw-r--r--    1 root     root          432 Jan  1  2000 hbplug.log
-rwxr-xr-x    1 root     root        21286 Feb  6 22:46 nanddump
-rwxr-xr-x    1 root     root        11500 Feb  6 22:46 nandwrite
-rw-r--r--    1 root     root           29 Feb  8 11:20 resolv.conf
drwxr-xr-x    2 root     root           40 Feb  6 22:58 test1
-rwxr-xr-x    1 root     root       131072 Feb  6 22:47 uboot.environment
drwxr-xr-x    2 root     root           60 Feb  6 21:04 var
srwxr-xr-x    1 root     root            0 Jan  1  2000 xcehbplug
-bash-4.3# fw_printenv
-bash: fw_printenv: command not found
-bash-4.3#

I'm assuming I need to copy all of these nandtools to the USB stick so they are available after I put the USB stick into the second Pogoplug, correct?

I will need to restore through the serial console since the second PP is not connecting to the network.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 02:17PM
@Waynosan,

Quote

OK, the USB stick is sbd1. I backed up the mtd partitions (all 4) to the USB stick, using the process here:
http://ahsoftware.de/dockstar/

I think this will work. But I would have used nanddump to back up instead of dd. Most of the time dd is OK. But in some abnormal cases dd will also copy the errors on the mtds. So just for reference: I don't recommend using the dd approach. The proper tool for this is nanddump.

Quote

-rw-r--r-- 1 root root 1048576 Feb 8 17:19 mtd0.img

This seems fine.

Quote

-bash-4.3# fw_printenv /tmp/.cemnt/mnt_sdb1/mtd0
-bash: fw_printenv: command not found

The error is just that fw_printenv was not installed, so it is not on the execution path. You have to execute with
./fw_printenv

But any way, on stock Pogo OS, fw_printenv will not work. We have to use blparam to list the env. Look for blparam in cloudengines folder, then use that to list u-boot envs. It's good to have the original envs so you can adjust the modded Pogo if needed. I forgot the exact location, it could be in /usr/bin or /usr/local/bin, or /usr/local/cloudengines/bin.
cd /usr/local/cloudengines/bin 
./blparam

Quote

> I'm assuming I need to copy all of these nandtools
> to the USB stick so they are available after I put
> the USB stick into the second Pogoplug, correct?

Yes, copy all nand tools and mtd backup files to the USB stick.

Quote

> I will need to restore through the serial console
> since the second PP is not connecting to the
> network.

OK. Let's connect serial console, boot up, interrupt u-boot and at the prompt, list envs. And then we'll continue from there.

printenv

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



Edited 1 time(s). Last edit at 02/08/2015 02:27PM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 04:41PM
OK, I went back and used nanddump to back up mtd0. It lists as a filesize of 1081344. I wasn't sure how to perform this step though:

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg)

I have the contents of the blparam from PP1.

I started up PP2 and aborted the bootup. Here is the output of "printenv":

PogoE02> printenv
baudrate=115200
bootcmd=usb start; setenv letter 9;for type in usb; do for disk in 0 1 2 3; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;
bootdelay=3
bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr};
bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr};
console=ttyS0
ethact=egiga0
ethaddr=XX:XX:XX:XX:XX:XX
fdt_addr=0x800000
fdt_file=/boot/dtbs/kirkwood-pogo_e02.dtb
importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize
load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loadzimage ...;if run loadzimage; then run loadfdt;run bootz;fi;echo Running default loaduimage ...;if run loaduimage; then run bootm;fi;
loadaddr=0x810000
loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt
loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file}
loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage}
loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage}
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}
uimage=/boot/uImage
zimage=/boot/zImage

Environment size: 1423/131068 bytes
PogoE02>

I hid the MAC address as I hear it's not good to post this type of info on the internet...
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 05:32PM
Waynosan,

> OK, I went back and used nanddump to back up mtd0.
> It lists as a filesize of 1081344.

What was the nandump command that you used? please post the log of this command and output. Since you are going to use it to flash the other Pogo in serial console, it best that the mtd has no OOB data. This size indicates that there is OOB data (If the dump give you exactly 1M then it has no OOB data)

> 4. Be sure there is no bad block in the first 1M
> of your NAND (check dmesg)

Do this in serial console to check bad block:
nand bad

Or check the Arch kernel boot log with dmesg (if you've saved the log). Or boot into Arch and
dmesg | grep -i bad



Food for thougth: if you boot in to Arch, every step in this the process is much easier. Are you sure you don't want to do this inside Arch Linux?

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



Edited 1 time(s). Last edit at 02/08/2015 05:37PM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 05:47PM
bodhi Wrote:
-------------------------------------------------------
> Waynosan,
>
> > OK, I went back and used nanddump to back up
> mtd0.
> > It lists as a filesize of 1081344.
>
> What was the nandump command that you used? please
> post the log of this command and output.

I used this command: nanddump -nf mtd0 /dev/mtd0 while in the backup directory on the USB drive. I do not have the output as it's no longer in the command window buffer. I can go back and re-do it if necessary.


> Since you
> are going to use it to flash the other Pogo in
> serial console, it best that the mtd has no
> OOB data. This size indicates that there is OOB
> data (If the dump give you exactly 1M then it has
> no OOB data)
>

Have no idea what OOB data is... I want to cry.

> > 4. Be sure there is no bad block in the first
> 1M
> > of your NAND (check dmesg)
>
> Do this in serial console to check bad block:
>
> nand bad
>
>

0 bad blocks reported in PP2. "nand bad" does not work on PP1 (as expected).

> Or check the Arch kernel boot log with dmesg (if
> you've saved the log). Or boot into Arch and
>
> dmesg | grep -i bad
>
>
>
>
> Food for thougth: if you boot in to Arch, every
> step in this the process is much easier. Are you
> sure you don't want to do this inside Arch Linux?

We can be in Arch while using serial correct? That is, I would let Arch linux boot (with not networking). Seems like it... here are the last few lines from PP2 after I boot into the rootfs USB disk, which, coincidentally the disk I put the backups and NAND tools on....

  OK  ] Stopped Network Name Resolution.
         Starting Network Name Resolution...
[FAILED] Failed to start Network Name Resolution.
See "systemctl status systemd-resolved.service" for details.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.

Arch Linux 3.1.10-34-ARCH (ttyS0)

alarm login: root
Password:
Last login: Wed Dec 10 22:23:08 on ttyS0
[root@alarm ~]#
[root@alarm ~]#

Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 06:02PM
Waynosan,

> I used this command: nanddump -nf mtd0 /dev/mtd0
> while in the backup directory on the USB drive. I
> do not have the output as it's no longer in the
> command window buffer. I can go back and re-do it
> if necessary.

Please redo with
nanddump -nof mtd0 /dev/mtd0

> Have no idea what OOB data is... I want to cry.

It's OK not to know it :) It's too low level for desktop Linux users most of whom don't care about this stuff.

OOB stands for “out of band”, the area that hold error correction data and other stuff. So nanddump makes 1M+ of data instead of even 1M for mtd0.

> We can be in Arch while using serial correct?
> [root@alarm ~]#

Yes. You are in Arch, where the commands for flash_erase and nandwrite are more friendly.


PS.

Also, please list the mtds and check the commands while you are in Arch:

fw_printenv mtdparts
cat /proc/mtd
flash_erase --help
nandwrite --help

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



Edited 2 time(s). Last edit at 02/08/2015 06:08PM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 06:36PM
bodhi Wrote:
-------------------------------------------------------
> Waynosan,
>
> > I used this command: nanddump -nf mtd0
> /dev/mtd0
> > while in the backup directory on the USB drive.
> I
> > do not have the output as it's no longer in the
> > command window buffer. I can go back and re-do
> it
> > if necessary.
>
> Please redo with
>
> nanddump -nof mtd0 /dev/mtd0
>
>

I was afraid you were going to say that. Here it is:

-bash-4.3# ./nanddump -nof mtd0 /dev/mtd0
-bash: ./nanddump: Permission denied
-bash-4.3# /tmp/nanddump -nof mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00100000...
-bash-4.3# ls -la
drwxr-xr-x    2 root     root         4096 Feb  9 00:16 .
drwx------   20 1000     1000         4096 Feb  8 22:19 ..
-rwxr-xr-x    1 root     root        12819 Feb  8 22:06 flash_erase
-rwxr-xr-x    1 root     root          329 Feb  8 22:07 fw_env.config
-rwxr-xr-x    1 root     root       668497 Feb  8 22:07 fw_printenv
-rw-r--r--    1 root     root      1048576 Feb  9 00:17 mtd0
-rwxr-xr-x    1 root     root        21286 Feb  8 22:07 nanddump
-rwxr-xr-x    1 root     root        11500 Feb  8 22:07 nandwrite
-rwxr-xr-x    1 root     root       131072 Feb  8 22:07 uboot.environment
-bash-4.3#

Looks smaller so I guess OK...

> > Have no idea what OOB data is... I want to cry.
>
>
> It's OK not to know it :)
>

Thank you... there are just so many commands and acronyms, half of which have really weird names.

> > We can be in Arch while using serial correct?
> > [root@alarm ~]#
>
> Yes. You are in Arch, where the commands for
> flash_erase and nandwrite are more friendly.
>
>
> PS.
>
> Also, please list the mtds and check the commands
> while you are in Arch:
>
>
> fw_printenv mtdparts
> cat /proc/mtd
> flash_erase --help
> nandwrite --help
>

OK, so I popped the USB stick with the updated mtd0 backup back in to PP2 and rebooted. In the correct directory but it's not letting me run the "fw_printenv" command:

[root@alarm NAND]# ls -la
total 1884
drwxr-xr-x  2 root root    4096 Feb  9  2015 .
drwx------ 20 1000 1000    4096 Feb  8  2015 ..
-rwxr-xr-x  1 root root   12819 Feb  8  2015 flash_erase
-rwxr-xr-x  1 root root     329 Feb  8  2015 fw_env.config
-rwxr-xr-x  1 root root  668497 Feb  8  2015 fw_printenv
-rw-r--r--  1 root root 1048576 Feb  9  2015 mtd0
-rwxr-xr-x  1 root root   21286 Feb  8  2015 nanddump
-rwxr-xr-x  1 root root   11500 Feb  8  2015 nandwrite
-rwxr-xr-x  1 root root  131072 Feb  8  2015 uboot.environment
[root@alarm NAND]# ./fw_printenv mtdparts
Cannot parse config file: No such file or directory
[root@alarm NAND]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 07f00000 00020000 "rootfs"
[root@alarm NAND]# flash_erase --help
-bash: flash_erase: command not found
[root@alarm NAND]# ./flash_erase --help
Usage: flash_erase MTD-device [start] [cnt (# erase blocks)] [lock]
       flash_erase -h | --help
[root@alarm NAND]# ./nandwrite -help
./nandwrite: invalid option -- 'h'
./nandwrite: invalid option -- 'e'
./nandwrite: invalid option -- 'l'
Usage: nandwrite [OPTION] MTD_DEVICE [INPUTFILE|-]
Writes to the specified MTD device.

  -a, --autoplace         Use auto oob layout
  -j, --jffs2             Force jffs2 oob layout (legacy support)
  -y, --yaffs             Force yaffs oob layout (legacy support)
  -f, --forcelegacy       Force legacy support on autoplacement-enabled mtd
                          device
  -m, --markbad           Mark blocks bad if write fails
  -n, --noecc             Write without ecc
  -o, --oob               Image contains oob data
  -s addr, --start=addr   Set start address (default is 0)
  -p, --pad               Pad to page size
  -b, --blockalign=1|2|4  Set multiple of eraseblocks to align to
  -q, --quiet             Don't display progress messages
      --help              Display this help and exit
      --version           Output version information and exit
[root@alarm NAND]#

Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 06:54PM
Waynosan,

I think fw_printenv failed because you don't have this file: /etc/fw_env.config. It is not that important. Since we already know it's OK to flash mtd0 with this info:
[root@alarm NAND]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 07f00000 00020000 "rootfs"

But if you like, create this file any way with the content below and do fw_printenv again (to be extremely paranoid):
cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000


... I will be back. In the mean time, please look at this thread. It will be similar to your flashing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 08, 2015 08:27PM
OK, I created the file and here is the output:


[root@alarm NAND]# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size      Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

[root@alarm NAND]# ./fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
[root@alarm NAND]#

Step 1 output doesn't look exactly the same as per your thread.
Does the mtd0 file need any special permissions set before it can be flashed?

Right now it is:

[root@alarm NAND]# ls -la
total 1884
drwxr-xr-x  2 root root    4096 Feb  9  2015 .
drwx------ 20 1000 1000    4096 Feb  8  2015 ..
-rwxr-xr-x  1 root root   12819 Feb  8  2015 flash_erase
-rwxr-xr-x  1 root root     329 Feb  8  2015 fw_env.config
-rwxr-xr-x  1 root root  668497 Feb  8  2015 fw_printenv
-rw-r--r--  1 root root 1048576 Feb  9  2015 mtd0
-rwxr-xr-x  1 root root   21286 Feb  8  2015 nanddump
-rwxr-xr-x  1 root root   11500 Feb  8  2015 nandwrite
-rwxr-xr-x  1 root root  131072 Feb  8  2015 uboot.environment
[root@alarm NAND]#

Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 09, 2015 12:35AM
Waynosan,

Step 1 output is different because the mtd parts definition are different between the Pogo V4 and the Pogo E02.

And no special permission needed when you are root and root owns this mtd0 file.

Revised instruction:

Because mtd0 on the Pogo E02 is 1M, we need to erase 8 blocks, and write it without OOB data (as the back up does not contain OOB). In the same directory, execute steps 2, step 3, and step 4. Please capture the log of these 3 commands execution and the output and post it here.

2. Erase mtd0:
./flash_erase /dev/mtd0 0 8

3. Write mtd0 backup file back to NAND:
./nandwrite -n /dev/mtd0 mtd0

4. Find where blparam is and list the envs. Since you have flashed the stock u-boot back to mtd0, the envs must be listed with blparam. It's either in /usr/local/cloudengines/bin, /usr/bin, or /usr/local/bin. If it's in /usr/local/cloudengines/bin then:

/usr/local/cloudengines/bin/blparam

And don't reboot. Please post the log here.

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



Edited 1 time(s). Last edit at 02/09/2015 12:45AM by bodhi.
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 09, 2015 07:27PM
OK, I'm slightly tipsy right now but here goes.....

[root@alarm NAND]# ./flash_erase /dev/mtd0 0 8
Erase Total 8 Units
Performing Flash Erase of length 131072 at offset 0xe0000 done
[root@alarm NAND]# ./nandwrite -n /dev/mtd0 mtd0
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
[root@alarm NAND]#

Problem with item #4... remember that this is the PP2 (archlinux) without the "cloudengines" directory... I cannot find "blparam".... :(

[root@alarm bin]# ls bl*
blkdeactivate  blkdiscard  blkid  blockdev
[root@alarm bin]#  cd..
-bash: cd..: command not found
[root@alarm bin]# cd ..
[root@alarm usr]# ls
bin  include  lib  local  sbin  share  src
[root@alarm usr]# cd local
[root@alarm local]# ls
bin  etc  games  include  lib  man  sbin  share  src
[root@alarm local]# cd bin
[root@alarm bin]# ls bl*
ls: cannot access bl*: No such file or directory
[root@alarm bin]#


[root@alarm /]# find -iname "blparam"
[root@alarm /]#
Re: Pogoplug v2 doesn't show up on LAN after Archlinux install
February 09, 2015 10:27PM
Waynosan,

Looks great!

Here is the blparam binary.

-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: