Welcome! Log In Create A New Profile

Advanced

First try woes: Debian on the PogoPlug Pro

Posted by cdlenfert 
First try woes: Debian on the PogoPlug Pro
May 21, 2017 04:51PM
Hoping to run Debian on a PogoPlug pro

I can no longer access my Pogo via SSH and I’m guessing it may be due to using a cheap USB drive.

Followed Qii Hong’s guide here: http://blog.qnology.com/2015/04/hacking-pogoplug-v3oxnas-proclassic.html
• I had to look around the web, archives, doozan forum, etc for all of the required files.
• I realize this will put me on an old version of debian, but I figured I could upgrade uBoot and Debian later, for now I needed more step by step instructions

Installed rootfs from here: https://www.dropbox.com/s/shk6b7klgyuu48p/Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

Installed uBoot from here: https://www.dropbox.com/s/17vrdq07thcx9hj/uboot.2013.10-tld-4.ox820.bodhi.tar

Initially I started working through the guide connected via SSH over the PogoPro’s wifi, after I started getting errors trying to do fw_setenv steps related to the ethaddr steps. I was able to do those successfully after connecting the PogoPro to my router via ethernet.

Everything seemed to go as expected otherwise. The only odd part was that I was not able to get the USB to show up in a list using df -h and in order to format it I had to use the command fdisk -l to see that my usb was located at dev/sdc so I proceeded to use sdc(1) instead of sda(1) in the formatting steps.

Here is the output of my fw_printenv.txt file:
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file

I also entered all the commands to configure netconsole, but am not sure how to make the actual connection to get the boot log info.

The PogoPro starts up, gets a solid green light, and appears to be getting an IP address, but that’s all I can do for now. I do have a serial device but would like to take advantage of netconsole since it’s there, or figure out how (if it is the USB drive at fault) I can clone or format another usb to test that as the problem. I do have a Raspberry Pi running debian, so could I just use the formatting and debian install steps with a USB device connected to the Pi?

Thanks for any points in the right direction.
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 12:49AM
cdlenfert ,

> Everything seemed to go as expected otherwise. The
> only odd part was that I was not able to get the U
> SB to show up in a list using df -h and in order t
> o format it I had to use the command fdisk -l to s
> ee that my usb was located at dev/sdc so I proceed
> ed to use sdc(1) instead of sda(1) in the formatti
> ng steps.

This is odd. If the USB is the only storage device plugged in then it should have been sda1. It is perhaps something to do with your USB drive brand and/or model (i.e. bad hardware).

> Here is the output of my fw_printenv.txt file:
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serverip
> }:${gatewayip}:${netmask}:${hostname}::off; bootm
> bootdelay=5
> baudrate=115200
> ethaddr=00:25:31:00:f7:fd
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
>

Your u-boot envs are incomplete. So it means you have not installed the u-boot default envs image (u-boot installation always needs 2 images, the u-boot image and the u-boot default env image).


> I also entered all the commands to configure netco
> nsole, but am not sure how to make the actual conn
> ection to get the boot log info.

With the above u-boot envs, you have no netconsole.

> The PogoPro starts up, gets a solid green light, a
> nd appears to be getting an IP address, but that’s
> all I can do for now. I do have a serial device

Now it's time to connect the serial console. It will help making everything so much easier. After you have recovered from this wrong installation, then you can setup netconsole and use that permanently instead of serial console.

> bu
> t would like to take advantage of netconsole since
> it’s there, or figure out how (if it is the USB dr
> ive at fault) I can clone or format another usb to
> test that as the problem. I do have a Raspberry Pi
> running debian, so could I just use the formatting
> and debian install steps with a USB device connect
> ed to the Pi?
>

As I mentioned, you'll need serial console to make fixing this u-boot installation problem easier.

There is another possible path to receover, (booting SATA), but that is a lot more work than just connecting serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 10:23AM
Thanks bodhi I'm not sure where I botched the u-boot install, but glad to know which direction to go to fix it.

Quote
bodhi
Your u-boot envs are incomplete. So it means you have not installed the u-boot default envs image (u-boot installation always needs 2 images, the u-boot image and the u-boot default env image).

If I work through these steps again while connected via serial console will that fix the u-boot envs and netconsole?

#setup fw_env.config for oxnas
echo "/dev/mtd0 0x00100000 0x20000 0x20000">/etc/fw_env.config

#save original envs
/usr/local/cloudengines/bin/blparam > /blparam.txt

#Download and flash new uBoot
wget http://download.qnology.com/pogoplug/oxnas/uboot.2013.10-tld-4.ox820.bodhi.tar
wget http://download.qnology.com/pogoplug/oxnas/uboot.2013.10-tld-4.ox820.bodhi.tar.md5

#check md5sum
md5sum -c uboot.2013.10-tld-4.ox820.bodhi.tar.md5

#extract uBoot files
tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar

#BE EXTRA CAREFUL WITH THE THESE COMMANDS.
#NO TYPOS! CUT AND PASTE.
#Erase and flash uboot on mtd0
#Flash encoded spl stage1 to 0x0
/tmp/flash_erase /dev/mtd0 0x0 6
/tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img

#Flash uboot to 0x40000
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
#Flash uboot environment
#Erase 1 block starting 0x00100000
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img

#Set MAC Address
/tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"

#default to pogoplug classic dtb
/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'
/tmp/fw_setenv dt_load_dtb 'ext2load usb 0:1 $dtb_addr $fdt_file'

#double check the MAC Address matches with
#what is on the bottom of your Pogoplug
/tmp/fw_printenv ethaddr

#print out all uboot environment parameters
#make sure there are no errors
/tmp/fw_printenv > /fw_printenv.txt
/tmp/fw_printenv


Setup Netconsole
More info here - http://forum.doozan.com/read.php?3,14,14


#Update IP Addresses as appropriate
#ipaddr = Pogoplug IP
/tmp/fw_setenv preboot 'run preboot_nc'
/tmp/fw_setenv ipaddr '192.168.1.10'
/tmp/fw_setenv serverip '192.168.1.100'
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 11:00AM
Yes, it will fix the errors.

Perform all the steps above. And then do this additional step:

/tmp/fw_printenv > /fw_printenv.txt
/tmp/fw_printenv

Please the entire log of what you did before rebooting.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 11:51AM
Sounds good. I'll post back soon. Thanks again.

One question since I'm kind of starting over, would it be possible to do the steps above but substitute the old u-boot tar file and debian tar for the latest version in your related threads.

For example replace
#extract uBoot files
tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar
with
#extract uBoot files
tar -xf uboot.2015.10-tld-1.ox820.bodhi.tar

and
#Flash uboot to 0x40000
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
with
#Flash uboot to 0x40000
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2015.10-tld-1.ox820.mtd0.img

and
#Flash uboot environment
#Erase 1 block starting 0x00100000
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img
with
#Flash uboot environment
#Erase 1 block starting 0x00100000
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 uboot.2013.10-tld-5.ox820.environment.img

and this one I'm guessing at since I have the pro model
#default to pogoplug classic dtb
/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'
with
#default to pogoplug pro dtb
/tmp/fw_setenv fdt_file 'ox820-pogoplug-pro.dtb'

And finally wget the latest rootfs tar and replace:
#extract
tar -xvjf Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

#cleanup
rm Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2*
with
tar -xvjf Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar

#cleanup
rm Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar*

Then will I be on the latest and greatest? If so I'll also plan do do that ethernet fix
ethtool -A eth0 rx off tx off

Thanks again!
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 12:51PM
cdlenfert,

What you list above is all correct. Except these 2 items:

1. Netconsole does not start automatically using the latest version, as stated in the uboot release thrread:
http://forum.doozan.com/read.php?3,16017

Quote

I've uploaded the uboot.2015.10-tld-1 u-Boot image for Pogoplug V3 Oxnas.

Warning: netconsole does not start automatically in this version. If you don't have serial console and therefore need netconsole to see the boot progress, please use previous u-boot version (uboot.2013.10-tld-3.ox820.bodhi.tar - Updated 16 May 2014). And follow the instruction in that section.

So if you need netconsole, then use the version you have
uboot.2013.10-tld-4.ox820.mtd0.img

If you can use serial console to troubleshoot booting problem in the future, then use uboot.2015.10-tld-1.


2. Latest Pogo V3 rootfs is

Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 01:31PM
Ahh yes, same rootfs in both versions. Thanks for pointing that out and confirming. Since I have serial, I don't think I'll really need netconsole, so I should be able to skip the netconsloe steps, right (since it won't work anyway).

One more question :)
I noticed later on in Qui's guide that he makes this change in order to configure the wifi card in the PogoPro. If I do this out of the gate, will ethernet still work after a reboot? Ideally I'd like to have the wifi card be functional with the option to also hook up via ethernet.

Quote
cdlenfert
and this one I'm guessing at since I have the pro model
#default to pogoplug classic dtb
/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'

with
#default to pogoplug pro dtb
/tmp/fw_setenv fdt_file 'ox820-pogoplug-pro.dtb'
Re: First try woes: Debian on the PogoPlug Pro
May 22, 2017 01:42PM
cdlenfert,

This is the correct setting for Pogo Pro.

>
> #default to pogoplug pro dtb
> /tmp/fw_setenv fdt_file 'ox820-pogoplug-pro.dtb'
>

ox820-pogoplug-classic.dtb is wrong for Pogo Pro. Qui used the classic version for all cases, which is not a very good choice (it would cause some confusion when you see wifi is not working). When people installing u-boot, I would expect they know which Pogo V3 box they have, and can follow instruction to choose between 2 hardware versions.

Ethernet always works if you have the cable connected. Wifi is a different story. You will need to do further set up to have both ethernet and Wifi co-exists and working, and when you unplug one or the other.

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



Edited 1 time(s). Last edit at 05/22/2017 01:45PM by bodhi.
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 10:45AM
After getting the serial connection working I'm able to see the boot process in action. If I don't interrupt it, it just keeps retrying.

Here is the boot data
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)                               
  Boot device: NAND                                                             
Attempting to set PLLA to 850 MHz ...                                           
  plla_ctrl0 : 0000020a                                                         
  plla_ctrl1 : 00330000                                                         
  plla_ctrl2 : 0065008b                                                         
  plla_ctrl3 : 000000f1                                                         
                                                                                
PLLA Set                                                                        
                                                                                
                                                                                
U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for OXNAS                         
                                                                                
DRAM:  128 MiB                                                                  
NAND:  128 MiB                                                                  
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Net:                                                                            
Led:    GREEN                                                                   
mii0                                                                            
Main Loop                                                                       
## Error: "preboot_nc" not defined                                              
Hit any key to stop autoboot:  0                                                
Waiting for PHY auto negotiation to complete... done                            
ENET Speed is 1000 Mbps - FULL duplex connection                                
BOOTP broadcast 1                                                               
DHCP client bound to address 192.168.2.4                                        
*** Warning: no boot file name; using 'C0A80204.img'                            
Using mii0 device                                                               
TFTP from server 192.168.2.1; our IP address is 192.168.2.4                     
Filename 'C0A80204.img'.                                                        
Load address: 0x60000000                                                        
Loading: T T T T

After that it goes into a loop
Retry count exceeded; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.2.4
*** Warning: no boot file name; using 'C0A80204.img'
Using mii0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.4
Filename 'C0A80204.img'.
Load address: 0x60000000
Loading: T T T T T T T T T

If I interrupt by pressing a key before boot, I get a command not found for any basic commands like 'ls' or 'cd', basically when I hit the first 'wget' while trying to re-do the flash u-boot steps above, I'm stuck. Any ideas how to proceed?

I do see these commands as available when I do 'help'.
?       - alias for 'help'
askenv  - get environment variables from stdin
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootmenu- ANSI terminal bootmenu
bootp   - boot image via network using BOOTP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
bootz   - boot Linux zImage image from memory
chpart  - change active partition
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
date    - get/set/reset date & time
dhcp    - boot image via network using DHCP/TFTP protocol
diskboot- boot from IDE device
dns     - lookup the IP of a hostname
echo    - echo args to console
editenv - edit environment variable
env     - environment handling commands
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
ext4load- load binary file from a Ext4 filesystem
ext4ls  - list files in a directory (default /)
ext4write- create a file in the root directory
false   - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatwrite- write file into a dos filesystem
fdt     - flattened device tree utility commands
fsls    - list files in a directory (default /)
gettime - get timer val elapsed,

go      - start application at address 'addr'
grepenv - search environment variables
hash    - compute hash message digest
help    - print command description/usage
ide     - IDE sub-system
iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ini     - parse an ini file in memory and merge the specified section into the env
itest   - return true/false on integer compare
load    - load binary file from a filesystem
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
md5sum  - compute MD5 message digest
mdio    - MDIO utility commands
mii     - MII utility commands
mm      - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
pxe     - commands to get and boot from pxe files
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
setexpr - set environment variable as the result of eval expression
showvar - print local hushshell variables
sleep   - delay execution for some time
sntp    - synchronize RTC via network
source  - run script from memory
sysboot - command to get and boot from syslinux files
terminal- start terminal emulator
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
time    - run commands and summarize execution time
true    - do nothing, successfully
ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
unzip   - unzip a memory region
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
zip     - zip a memory region
OX820> usb
usb - USB sub-system



Edited 1 time(s). Last edit at 05/23/2017 12:14PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 11:00AM
running some of the USB commands I'm able to get info on the connected USB (which would have some if not all of the original executable files).
OX820> usb start
(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
OX820> usb dev

USB device 0: Vendor: Verbatim Rev:      Prod: Store n Go Drive
            Type: Removable Hard Disk
            Capacity: 3750.0 MB = 3.6 GB (7680000 x 512)
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 01:24PM
cdlenfert,

> U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
> Boot device: NAND
> Attempting to set PLLA to 850 MHz ...
> plla_ctrl0 : 0000020a
> plla_ctrl1 : 00330000
> plla_ctrl2 : 0065008b
> plla_ctrl3 : 000000f1
>
> PLLA Set
>
>
> U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for
> OXNAS
>
> DRAM: 128 MiB
> NAND: 128 MiB
> In: serial
> Out: serial
> Err: serial
> Net:
> Led: GREEN
> mii0
> Main Loop
> ## Error: "preboot_nc" not defined
> Hit any key to stop autoboot: 0

So far so good.


> Waiting for PHY auto negotiation to complete... do
> ne
> ENET Speed is 1000 Mbps - FULL duplex connection
> BOOTP broadcast 1
> DHCP client bound to address 192.168.2.4
> *** Warning: no boot file name; using 'C0A80204.im
> g'

> Using mii0 device
> TFTP from server 192.168.2.1; our IP address is 19
> 2.168.2.4
> Filename 'C0A80204.img'.
> Load address: 0x60000000
> Loading: T T T T
> [/code]
>

The above errors should not occur if you have installed the u-boot default envs image (ctually they are not part of the default envs so you would not see them executing).

> If I interrupt by pressing a key before boot, I ge
> t a command not found for any basic commands like
> 'ls' or 'cd', basically when I hit the first 'wget
> ' while trying to re-do the flash u-boot steps abo
> ve, I'm stuck. Any ideas how to proceed?

The commands you tried are Linux shell commands. They are not available in u-boot console.

> ? - alias for 'help'
> askenv - get environment variables from stdin
> base - print or set address offset
> bdinfo - print Board Info structure
> boot - boot default, i.e., run 'bootcmd'
> bootd - boot default, i.e., run 'bootcmd'
> bootelf - Boot from an ELF image in memory
> bootm - boot application image from memory
> bootmenu- ANSI terminal bootmenu
> bootp - boot image via network using BOOTP/TFTP
> protocol
> bootvx - Boot vxWorks from an ELF image
> bootz - boot Linux zImage image from memory
> chpart - change active partition
> cmp - memory compare
> coninfo - print console devices and information
> cp - memory copy
> crc32 - checksum calculation
> date - get/set/reset date & time
> dhcp - boot image via network using DHCP/TFTP p
> rotocol
> diskboot- boot from IDE device
> dns - lookup the IP of a hostname
> echo - echo args to console
> editenv - edit environment variable
> env - environment handling commands
> exit - exit script
> ext2load- load binary file from a Ext2 filesystem
> ext2ls - list files in a directory (default /)
> ext4load- load binary file from a Ext4 filesystem
> ext4ls - list files in a directory (default /)
> ext4write- create a file in the root directory
> false - do nothing, unsuccessfully
> fatinfo - print information about filesystem
> fatload - load binary file from a dos filesystem
> fatls - list files in a directory (default /)
> fatwrite- write file into a dos filesystem
> fdt - flattened device tree utility commands
> fsls - list files in a directory (default /)
> gettime - get timer val elapsed,
>
> go - start application at address 'addr'
> grepenv - search environment variables
> hash - compute hash message digest
> help - print command description/usage
> ide - IDE sub-system
> iminfo - print header information for application
> image
> imxtract- extract a part of a multi-image
> ini - parse an ini file in memory and merge th
> e specified section into the env
> itest - return true/false on integer compare
> load - load binary file from a filesystem
> loadb - load binary file over serial line (kermi
> t mode)
> loads - load S-Record file over serial line
> loadx - load binary file over serial line (xmode
> m mode)
> loady - load binary file over serial line (ymode
> m mode)
> loop - infinite loop on address range
> md - memory display
> md5sum - compute MD5 message digest
> mdio - MDIO utility commands
> mii - MII utility commands
> mm - memory modify (auto-incrementing address
> )
> mtdparts- define flash/nand partitions
> mw - memory write (fill)
> nand - NAND sub-system
> nboot - boot from NAND device
> nfs - boot image via network using NFS protoco
> l
> nm - memory modify (constant address)
> ping - send ICMP ECHO_REQUEST to network host
> printenv- print environment variables
> pxe - commands to get and boot from pxe files
> reset - Perform RESET of the CPU
> run - run commands in an environment variable
> saveenv - save environment variables to persistent
> storage
> setenv - set environment variables
> setexpr - set environment variable as the result o
> f eval expression
> showvar - print local hushshell variables
> sleep - delay execution for some time
> sntp - synchronize RTC via network
> source - run script from memory
> sysboot - command to get and boot from syslinux fi
> les
> terminal- start terminal emulator
> test - minimal test like /bin/sh
> tftpboot- boot image via network using TFTP protoc
> ol
> time - run commands and summarize execution tim
> e
> true - do nothing, successfully
> ubi - ubi commands
> ubifsload- load file from an UBIFS filesystem
> ubifsls - list files in a directory
> ubifsmount- mount UBIFS volume
> ubifsumount- unmount UBIFS volume
> unzip - unzip a memory region
> usb - USB sub-system
> usbboot - boot from USB device
> version - print monitor, compiler and linker versi
> on
> zip - zip a memory region
> OX820> usb
> usb - USB sub-system

The above commands are u-boot commands.

---

Look at your u-boot installation log. You must have missed flashing the default envs image.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 23, 2017 01:52PM
Not sure what I'm missing here :/

Qui’s Guide
/tmp/flash_erase /dev/mtd0 0x0 6
/tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
/tmp/flash_erase /dev/mtd0 0x00100000 1
/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img

My Log
[root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd0 0x0 6
Erasing 128 Kibyte @ a0000 -- 100 % complete 
[root@PogoplugPro /tmp]# /tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Writing data to block 0 at offset 0x0
[root@PogoplugPro /tmp]# /tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
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
[root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd0 0x00100000 1
Erasing 128 Kibyte @ 100000 -- 100 % complete 
[root@PogoplugPro /tmp]# /tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img
Writing data to block 8 at offset 0x100000

And this was the result of 'fw_printenv'
[root@PogoplugPro /root]# /tmp/fw_printenv
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file

Any way to come back from this aside from a sata drive boot? Can I reconfigure with the u-boot commands, get the PogoPro to boot from the recognized USB, revert to stock OS boot?

Thanks again very much for your feedback and help so far.
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 02:38AM
cdlenfert Wrote:
-------------------------------------------------------
> Not sure what I'm missing here :/
>
> Qui’s Guide
>
> /tmp/flash_erase /dev/mtd0 0x0 6
> /tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.8
> 50mhz.mtd0.img
> /tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-t
> ld-4.ox820.mtd0.img
> /tmp/flash_erase /dev/mtd0 0x00100000 1
> /tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_
> env.img
>
>
> My Log
>
> [root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd
> 0 0x0 6
> Erasing 128 Kibyte @ a0000 -- 100 % complete
> [root@PogoplugPro /tmp]# /tmp/nandwrite /dev/mtd0
> uboot.spl.2013.10.ox820.850mhz.mtd0.img
> Writing data to block 0 at offset 0x0
> [root@PogoplugPro /tmp]# /tmp/nandwrite -s 262144
> /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img
> 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
> [root@PogoplugPro /tmp]# /tmp/flash_erase /dev/mtd
> 0 0x00100000 1
> Erasing 128 Kibyte @ 100000 -- 100 % complete
> [root@PogoplugPro /tmp]# /tmp/nandwrite -s 1048576
> /dev/mtd0 pogopro_uboot_env.img
> Writing data to block 8 at offset 0x100000
>
>
> And this was the result of 'fw_printenv'
>
> [root@PogoplugPro /root]# /tmp/fw_printenv
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serverip
> }:${gatewayip}:${netmask}:${hostname}::off; bootm
> bootdelay=5
> baudrate=115200
> ethaddr=00:25:31:00:f7:fd
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
>
>

At this point,

cat /etc/fw_env.config
cat /proc/mtd

Please post the output here.

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



Edited 1 time(s). Last edit at 05/24/2017 06:11AM by bodhi.
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 07:16AM
Unknown command 'cat'

I'm doing this after stopping auto-boot
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 10:08AM
Can I use setenv to update my u-boot envs to match the following and get the PogoPro to boot from my USB? Would changes be necessary to since I set up an older version using Qui's guide? I was looking at this thread which made me hopefully (I realize it's for a different hardware, but hoping the process could work) - http://forum.doozan.com/read.php?3,16129

My printenv
baudrate=115200
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serm
bootdelay=5
dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
ethact=mii0
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
ipaddr=192.168.0.54
preboot=run preboot_nc
serverip=192.168.0.32
stderr=serial
stdin=serial
stdout=serial

Environment size: 444/131068 bytes

And modify it to mach your fw_printenv from - http://forum.doozan.com/read.php?3,16017
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=5e:2b:15:71:ec:b6
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 12:24PM
cdlenfert,


At this point, meaning right after you execute fw_printenv in the instruction:

[root@PogoplugPro /root]# /tmp/fw_printenv


Run these 2 commands, so I can see why the fw_printenv did not print correct values:

cat /etc/fw_env.config
cat /proc/mtd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 24, 2017 01:25PM
I don't think I can work through the instructions (at least I'm not sure how I would) because I'm only able to access the u-boot console when connected via serial/UART. When I try anything like fw_printenv the result is an unknown command. Is there some other way I should be connecting or getting additional capabilities outside of the u-boot console?
OX820> /tmp/fw_printenv
Unknown command '/tmp/fw_printenv' - try 'help'
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 12:42AM
cdlenfert,

> Can I use setenv to update my u-boot envs to match
> the following and get the PogoPro to boot from my
> USB? Would changes be necessary to since I set up
> an older version using Qui's guide? I was looking
> at this thread which made me hopefully (I realize
> it's for a different hardware, but hoping the proc
> ess could work) - http://forum.doozan.com/read.php
> ?3,16129
>
> My printenv
>
> baudrate=115200
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serm
> bootdelay=5
> dt_load_dtb=ext2load usb 0:1 $dtb_addr $fdt_file
> ethact=mii0
> ethaddr=00:25:31:00:f7:fd
> fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
> ipaddr=192.168.0.54
> preboot=run preboot_nc
> serverip=192.168.0.32
> stderr=serial
> stdin=serial
> stdout=serial
> 
> Environment size: 444/131068 bytes
>
>
> And modify it to mach your fw_printenv from - http
> ://forum.doozan.com/read.php?3,16017
>
> autoload=no
> baudrate=115200
> bootargs=console=ttyS0,115200n8
> bootdelay=10
> console=console=ttyS0,115200n8
> ethact=mii0
> ethaddr=5e:2b:15:71:ec:b6
> ipaddr=192.168.0.222
> mtdids=nand0=41000000.nand
> mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
> serverip=192.168.0.220
> stderr=serial
> stdin=serial
> stdout=serial
> usb_device=0:1
> if_netconsole=ping $serverip
> preboot_nc=run if_netconsole start_netconsole
> start_netconsole=setenv ncip $serverip; setenv boo
> tdelay 10; setenv stdin nc; setenv stdout nc; sete
> nv stderr nc; version
> usb_set_bootargs=setenv bootargs console=ttyS0,115
> 200 root=/dev/sda1 rootdelay=10
> uinitrd_addr=0x60e00000
> uimage_addr=0x60500000
> dtb_addr=0x62c00000
> dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/o
> x820-pogoplug-pro.dtb
> dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boo
> t/uInitrd
> dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot
> /uImage
> dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_add
> r
> dt_usb_boot=run dt_load_uimage; run dt_load_initrd
> ; run dt_load_dtb; run dt_bootm
> dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_bo
> ot
> dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb
> stop; reset
> bootcmd=run dt_bootcmd_usb
>

Yes, this is the right approach. Since you mentioned above you can only do this in u-boot console. So you could use setenv in u-boot console to set each one of these

autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=5e:2b:15:71:ec:b6
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb

For example,

setenv bootcmd 'run dt_bootcmd_usb'
setenv mtdparts 'mtdparts=41000000.nand:14m(boot),-(data)'

Note that I used a single quote before and after the string so that the embedded spaces and embedded = sign are literals.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 11:07AM
Edit: Please skip this post, I got the PogoPro to boot into Debian on the USB by re-entering the u-boot setenv commands. The only difference in getting it to work was updating the pogo IP in the envs settings, and the server IP, and then I did a 'saveenv" so I wouldn't have to put in all these commands again. I've got root access on debian. My question now is, will it boot successfully again after I unplug and re-attach to my router? Doing so will change the pogo's IP address. The reason why it changed in the first place was because I needed the pogo to be close to my mac to connect serial, which would be more difficult in the location where the router is easily accessible.
_____

Thanks Bodhi, here's my results including my printenv after setting the variables and the result of sending a 'reset' command to trigger the boot process. Unfortunately I wasn't able to boot into debian on the usb. Should I have to do 'savenv' after entering these commands in u-boot console? checking 'printenv' after the failed boot, they've reverted back to my old env settings. Could I have put in the wrong new env settings considering I'm trying to boot an older version of debian? Thanks again for your direction, I'm enjoying learning about this stuff, but obviously still have a long way to go.
##**NewEnvs**##

autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run dt_bootcmd_usb
bootdelay=5
console=console=ttyS0,115200n8
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:25:31:00:f7:fd
fdt_file=/boot/dts/ox820-pogoplug-classic.dtb
if_netconsole=ping $serverip
ipaddr=192.168.0.54
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot=run preboot_nc
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.0.32
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc;n
stderr=serial
stdin=serial
stdout=serial
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
usb_device=0:1
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10

Environment size: 1086/131068 bytes

##***Boot Log**##

resetting ...

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for OXNAS

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   
Led:    GREEN
mii0
Main Loop
## Error: "preboot_nc" not defined
Hit any key to stop autoboot:  0 
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection
BOOTP broadcast 1
DHCP client bound to address 192.168.2.4
*** Warning: no boot file name; using 'C0A80204.img'
Using mii0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.4
Filename 'C0A80204.img'.
Load address: 0x60000000
Loading: T T T T T T T T T T 
Retry count exceeded; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.2.4
*** Warning: no boot file name; using 'C0A80204.img'
Using mii0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.4
Filename 'C0A80204.img'.
Load address: 0x60000000
Loading: T 
Abort

Led:    ORANGE (Failed)
Wrong Image Format for bootm command

Led:    ORANGE (Failed)
ERROR: can't get kernel image!



Edited 1 time(s). Last edit at 05/25/2017 11:39AM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 12:12PM
cdlenfert,

>Please skip this post, I got the PogoPro to
> boot into Debian on the USB by re-entering the u-b
> oot setenv commands. The only difference in gettin
> g it to work was updating the pogo IP in the envs
> settings, and the server IP, and then I did a 'sav
> eenv" so I wouldn't have to put in all these comma
> nds again. I've got root access on debian.

Cool!


> My question now is, will it boot successfully again after
> I unplug and re-attach to my router?

Yes.

> Doing so will
> change the pogo's IP address. The reason why it ch
> anged in the first place was because I needed the
> pogo to be close to my mac to connect serial, whic
> h would be more difficult in the location where th
> e router is easily accessible.

The IP won't change if you use static IP (in /etc/netowrk/interfaces).

And when you use dynamic IP (it is default setting in the rootfs), you can always use its name (debian.local) to login. For example,

ssh root@debian.local

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 06:16PM
Well I greatly appreciate all the help getting the boot botch sorted out.

Edit: Please ignore the stuff below. The reason I couldn't SSH into the Pogo was that I hooked up another external drive and I'm guessing it didn't know where to look for rootfs. I'll have to see how to remedy that later. For now, all is good with the wifi connection. I am still curious if I need to change the u-boot envs that specify the ethernet IP address, or was that just for netconsole use?

Here's where I'm currently at.

After updating and configuring Debian (including wifi configuration), I was able to reboot with the same ethernet connection and ehternet and wifi were able to connect and get valid IPs.

However after disconnecting the ethernet and booting, the wifi failed to connect to my network.

Is this because of the manual ethernet IP I designated in the u-boot envs while the pogo was tethered to my mac?

How do I get this thing to boot and connect to my network solely on wifi?



Edited 1 time(s). Last edit at 05/25/2017 09:25PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
May 25, 2017 09:53PM
cdlenfert,

This wifi/ethernet is a common problem with the Pogo Pro. I'll find the post where you can follow to set it up correctly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
August 11, 2017 12:31PM
Hey Bodhi, it's me again!

I decided I wanted to install Debian again (on a different Pogo Pro) and this time get on the latest kernel, uBoot, and rootfs. However midway through I LOST POWER!!!!!!. So it’s back to the serial console for me, and hopefully I can restore again. My main concern is that I was missing something in my approach because when I did a fw_printenv I did not see the output I was expecting. Here’s how it all went down. Any tips on where things went wrong (and if it should be possible to recover) would be greatly appreciated.

## Checked my hardware info
[root@PogoplugPro /root]# cat /proc/cpuinfo | grep Hardware
Hardware	: Oxsemi NAS


## Downloaded all of the required binaries (made executable) and uBoot image
[root@PogoplugPro /tmp]# ls
current_envs.txt
flash_erase
fw_env.config
fw_printenv
fw_setenv
hbplug.log
index.html
nanddump
nandwrite
resolv.conf
uboot.2013.10-tld-5.ox820.environment
uboot.2013.10-tld-5.ox820.environment.img
uboot.2015.10-tld-1.ox820.bodhi.tar
uboot.2015.10-tld-1.ox820.mtd0.img
uboot.spl.2013.10.ox820.850mhz.mtd0.img
var


## Original envs
[root@PogoplugPro /tmp]# cat /blparam.txt
bootcmd=run boot_nand
bootdelay=2
baudrate=115200
autoload=n
netmask=255.255.0.0
bootfile="uImage"
kernflmode=s
load_nand=nboot 60500000 0 200000
load_nand2=nboot 60500000 0 800000
boot=bootm 60500000
boot_nand=run load_nand boot || run load_nand2 boot
stdin=serial
stdout=serial
stderr=serial
bootargs=root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
ethaddr=00:25:31:00:F3:4D
cesvcid=P38LFT6AXYZMS7LZZ6LY5RAXKS
ceboardver=PPRO1
serverip=192.168.33.2
ipaddr=192.168.33.195


## Result of nand bad block scan
[root@PogoplugPro /tmp]# dmesg | grep -i 'bad'
<6>[    5.230000] Scanning device for bad blocks
<4>[    5.270000] Bad eraseblock 434 at 0x000003640000
<5>[    5.790000] UBI: number of bad PEBs:         1
<5>[    5.820000] UBI: number of PEBs reserved for bad PEB handling: 9


## Flashing steps
[root@PogoplugPro /tmp]# /usr/sbin/flash_erase /dev/mtd0 0x0 6
Erase Total 6 Units
Performing Flash Erase of length 131072 at offset 0xa0000 done

[root@PogoplugPro /tmp]# /usr/sbin/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Writing data to block 0 at offset 0x0

[root@PogoplugPro /tmp]# /usr/sbin/nandwrite -s 262144 /dev/mtd0 uboot.2015.10-tld-1.ox820.mtd0.img
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

[root@PogoplugPro /tmp]# /usr/sbin/flash_erase /dev/mtd0 0x00100000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0x100000 done

[root@PogoplugPro /tmp]# /usr/sbin/nandwrite -s 1048576 /dev/mtd0 uboot.2013.10-tld-5.ox820.environment.img
Writing data to block 8 at offset 0x100000


## Result of fw_printenv (note: ethaddr and fdt_file are only there because I manually set them
[[root@PogoplugPro /tmp]# /tmp/fw_printenv
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
ethaddr=00:25:31:00:f3:4d
fdt_file=ox820-pogoplug-pro.dtb


## Result of cat /proc/mtd - it was my understanding that this did not need to be changed
[root@PogoplugPro /tmp]# cat /proc/mad
dev:    size   erasesize  name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

I thought maybe there were steps in the rootfs install process (which I was planning to do next) that might set some of the new env variables. However when I plugged in my USB, the power plug for the Pogo must have loosened slightly and I lost my SSH connection. I’ll connect to serial (sigh) and try to work through restoring things to get up and running again.

I do see where I missed a note about not erasing 1 block in /dev/mtd0, and not flashing pogopro_uboot_env.img in steps 9 and 10 if on a non-FDT (old) kernel. As you can see above I did those steps and posted the results. To be fair, those instructions were in the second set of old instructions from May 2014 and the latest instructions say “This u-boot and the default envs image supports both modern FDT and non-FDT kernel. It will not work with stock kernel. So do not install this u-boot if you plan to run stock kernel.”. I didn't plan to run stock kernel, but hadn't yet got to the point of creating the rootfs USB with the latest kernel. Is this why my env variables were incomplete?

I'm thinking I'll have to create a rootfs drive on another PogoPlug, as well as manually set the uBoot envs in order to recover from this. Should I use these envs for the latest uBoot, or something else?

autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=00:25:31:00:F3:4D
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb

Thanks
Re: First try woes: Debian on the PogoPlug Pro
August 11, 2017 04:49PM
cdlenfert,

You've done this successfully and see no error. You are OK even loosing power.
## Flashing steps
[root@PogoplugPro /tmp]# /usr/sbin/flash_erase /dev/mtd0 0x0 6
Erase Total 6 Units
Performing Flash Erase of length 131072 at offset 0xa0000 done

[root@PogoplugPro /tmp]# /usr/sbin/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Writing data to block 0 at offset 0x0

[root@PogoplugPro /tmp]# /usr/sbin/nandwrite -s 262144 /dev/mtd0 uboot.2015.10-tld-1.ox820.mtd0.img
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

[root@PogoplugPro /tmp]# /usr/sbin/flash_erase /dev/mtd0 0x00100000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0x100000 done

[root@PogoplugPro /tmp]# /usr/sbin/nandwrite -s 1048576 /dev/mtd0 uboot.2013.10-tld-5.ox820.environment.img
Writing data to block 8 at offset 0x100000

At this point, all you need to do is to create a new rootfs using the latest rootfs:

Quote

Updated 02 Aug 2017:

Rootfs Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2 was uploaded.

Basic Debian stretch Oxnas rootfs for Popo Pro/Classic V3 plug:

Remember to skip step 4 (you are running the latest u-boot).

Quote

4. Create uImage with embedded DTB for booting with stock u-boot. Skip this step if you have installed the latest released uboot for OXNAS, or are installing this u-boot at the same time.

That's it! the latest u-boot and its default env image that you have installed will automatically boot the new rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
August 11, 2017 05:30PM
Cool! I'll give it a shot. My only linux system is another PogoPlug, so I'll set up rootfs once I can get access to the other Pogo.

Any idea why my fw_printenv output was so short?
## Result of fw_printenv (note: ethaddr and fdt_file are only there because I manually set them
[[root@PogoplugPro /tmp]# /tmp/fw_printenv
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
ethaddr=00:25:31:00:f3:4d
fdt_file=ox820-pogoplug-pro.dtb

I was expecting something more like:
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootdelay=10
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=00:25:31:00:F3:4D
ipaddr=192.168.0.222
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
serverip=192.168.0.220
stderr=serial
stdin=serial
stdout=serial
usb_device=0:1
if_netconsole=ping $serverip
preboot_nc=run if_netconsole start_netconsole
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
uinitrd_addr=0x60e00000
uimage_addr=0x60500000
dtb_addr=0x62c00000
dt_load_dtb=ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_load_initrd=ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 $uimage_addr /boot/uImage
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_usb_boot=run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
dt_usb_bootcmd=run usb_set_bootargs; run dt_usb_boot
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
bootcmd=run dt_bootcmd_usb
Re: First try woes: Debian on the PogoPlug Pro
August 11, 2017 11:59PM
Here were my steps in creating the new rootfs. Unfortunately I wasn't able to boot off it with the PogoPro with new uBoot.

root@DebianPlugPro:~# fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               2    15265791     7632895    b  W95 FAT32

root@DebianPlugPro:~# mkfs.ext4 -L "EMTEC8GB" /dev/sdc1
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=EMTEC8GB
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
477664 inodes, 1908223 blocks
95411 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1954545664
59 block groups
32768 blocks per group, 32768 fragments per group
8096 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 


root@DebianPlugPro:~# fdisk /dev/sdc

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p

Disk /dev/sdc: 7816 MB, 7816085504 bytes
255 heads, 63 sectors/track, 950 cylinders, total 15265792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               2    15265791     7632895    b  W95 FAT32

Command (m for help): i
i: unknown command

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx         
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data    
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility   
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt         
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access     
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O        
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor      
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs        
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT            
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor      
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary  
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS    
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT            
1e  Hidden W95 FAT1 80  Old Minix      


Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83
Changed system type of partition 1 to 83 (Linux)

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

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
root@DebianPlugPro:~# fdisk -l /dev/sdc

Disk /dev/sdc: 7816 MB, 7816085504 bytes
255 heads, 63 sectors/track, 950 cylinders, total 15265792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               2    15265791     7632895   83  Linux


root@DebianPlugPro:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          3.6G  1.4G  2.0G  42% /
udev             10M     0   10M   0% /dev
tmpfs            12M  488K   12M   5% /run
/dev/sda1       3.6G  1.4G  2.0G  42% /
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            24M  4.0K   24M   1% /run/shm
tmpfs            60M     0   60M   0% /tmp
/dev/sdb1       473M  424M   20M  96% /media/usb0
/dev/sdc1       7.1G   17M  6.7G   1% /media/usb1


root@DebianPlugPro:/# cd /media/usb1
root@DebianPlugPro:/media/usb1# wget http://domain.com/pogo/bodhi-pro-debian/uboot.2015.10-tld-1.ox820.bodhi.tar
--2017-08-11 20:46:17--  http://www.domain.com/pogo/bodhi-pro-debian/uboot.2015.10-tld-1.ox820.bodhi.tar
Resolving www.domain.com (www.domani.com)... ipaddress-here
Connecting to www.domain.com (www.domain.com)|ipaddress-here|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 798720 (780K) [application/x-tar]
Saving to: `uboot.2015.10-tld-1.ox820.bodhi.tar'

100%[======================================>] 798,720     71.5K/s   in 11s     

2017-08-11 20:46:29 (70.8 KB/s) - `uboot.2015.10-tld-1.ox820.bodhi.tar' saved [798720/798720]

root@DebianPlugPro:/media/usb1# rm uboot.2015.10-tld-1.ox820.bodhi.tar      
root@DebianPlugPro:/media/usb1# wget http://domain.com/pogo/bodhi-pro-debian/linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2
--2017-08-11 20:47:31--  http://domain.com/pogo/bodhi-pro-debian/linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2
Resolving www.domain.com (www.domain.com)... ipaddress-here
Connecting to www.domain.com (wwwdomain.com)ipaddress-here|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23672134 (23M) [application/x-bzip2]
Saving to: `linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2'

100%[======================================>] 23,672,134  66.4K/s   in 6m 3s   

2017-08-11 20:53:35 (63.6 KB/s) - `linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2' saved [23672134/23672134]

root@DebianPlugPro:/media/usb1# tar -xjf linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2
root@DebianPlugPro:/media/usb1# cd /
root@DebianPlugPro:/# umount /media/usb1

root@DebianPlugPro:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          3.6G  1.4G  2.0G  42% /
udev             10M     0   10M   0% /dev
tmpfs            12M  488K   12M   5% /run
/dev/sda1       3.6G  1.4G  2.0G  42% /
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            24M  4.0K   24M   1% /run/shm
tmpfs            60M     0   60M   0% /tmp
/dev/sdb1       473M  424M   20M  96% /media/usb0


Removed the drive,plugged it in the Pro with newest Uboot, but did not get an IP address and can't SSH.



Edited 1 time(s). Last edit at 08/12/2017 01:04PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
August 12, 2017 12:15AM
cdlenfert,

The instruction stated:

Quote

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest released uboot for OXNAS then you can use Ext4.

That's how the new u-boot env was scripted to find the rootfs. No matter how many drives/partitions are currently used in the box, the kernel will find the rootfs with this label.

So the command
root@DebianPlugPro:~# mkfs.ext4 -L "EMTEC8GB" /dev/sdc1
should have been
root@DebianPlugPro:~# mkfs.ext4 -L rootfs /dev/sdc1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: First try woes: Debian on the PogoPlug Pro
August 12, 2017 09:52AM
Forehead Palm ... Totally missed that label.

Went back and changed label using:

e2label /dev/sdc1 rootfs

Was able to confirm the change, but the system still will not boot.

root@DebianPlugPro:~# lsblk -o name,mountpoint,label,size     
NAME      MOUNTPOINT  LABEL       SIZE
sda                               3.7G
`-sda1    /           rootfs      3.7G
sdb                               497M
`-sdb1    /media/usb0 IOMEGA512   496M
sdc                               7.3G
`-sdc1    /media/usb1 rootfs      7.3G
mtdblock0                          14M
mtdblock1                         114M



Edited 1 time(s). Last edit at 08/12/2017 12:59PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
August 12, 2017 01:22PM
Tried again from scratch on the rootfs drive. Everything seems to go fine. The thing I didn't expect is the lack of the /media/usb1/etc/fstab file.

I created it and put the stuff from step 3 into it.

Quote
guide
Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.
LABEL=rootfs    /               ext4    noatime,errors=remount-ro 0 1

Still will not boot off new rootfs usb.

When I list out the contents of the new rootfs they are as follows:

root@DebianPlugPro:/media/usb1# ls
.                                       linux-4.4.79-oxnas-tld-1.patch                  lost+found
..                                      linux-dtb-4.4.79-oxnas-tld-1.tar                zImage-4.4.79-oxnas-tld-1
config-4.4.79-oxnas-tld-1               linux-headers-4.4.79-oxnas-tld-1_1.0_armel.deb
linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2  linux-image-4.4.79-oxnas-tld-1_1.0_armel.deb

Do I need to "unzip" the linux-dtb-4.4.79-oxnas-tld-1.tar" ? The contents of the older rootfs on my other PogoPro are as follows:

root@DebianPlugPro:/# ls /
.   bin   description-pak  etc   iomega512  lost+found  mnt  proc  run   selinux  sys  uEnv.txt  var
..  boot  dev              home  lib        media       opt  root  sbin  srv      tmp  usr

Maybe I should continue down to the instruciton from 12 Dec 2016 which do include extracting the oxnas-tld tarball and using dpkg on deb files etc. Step 5 in the top-most instructions posted 5 Aug 2017 makes it sound like you shouldn't need to complete any additional steps. "5. Done installation. Take this USB rootfs to your plug and cold start."



Edited 3 time(s). Last edit at 08/12/2017 02:23PM by cdlenfert.
Re: First try woes: Debian on the PogoPlug Pro
August 12, 2017 04:52PM
cdlenfert,

I did not notice before, that you were using the wrong tarball to create the rootfs!


Quote

root@DebianPlugPro:/media/usb1# tar -xjf linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2

That was the kernel tarball, not rootfs tarball.


The rootfs was in this section, like I posted before above:

Quote

At this point, all you need to do is to create a new rootfs using the latest rootfs:

Quote

Updated 02 Aug 2017:

Rootfs Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2 was uploaded.

Basic Debian stretch Oxnas rootfs for Popo Pro/Classic V3 plug:

Remember to skip step 4 (you are running the latest u-boot).


BTW, you did not read the first few lines in the first post :)

Quote

Latest released kernel: linux-4.4.79-oxnas-tld-1.bodhi.tar.bz2 (05 Aug 2017)
Latest released rootfs: Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2 (02 Aug 2017)

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



Edited 1 time(s). Last edit at 08/12/2017 04:55PM by bodhi.
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: