Welcome! Log In Create A New Profile

Advanced

PogoProReallyBrickedNow......

Posted by hacksome 
PogoProReallyBrickedNow......
December 05, 2019 08:40AM
First I would like to thank all people like Bodhi en many more to provide means to keep legacy hardware up and running.

Unfortunately to keep it running is something more challenging.

After a lot of fiddling en trying I managed to have a working PogoplugPro (oxnas) booting from USB.
I had it installed with U-Boot 2013.10-tld-5 and Debian running.

In an attempt to update the uboot to 2015.10 I managed to really brick the pogo.
What went wrong?

I had ssh ´d into debian on the pogo and created some directories to manage the files. Copied uboot.2015.10-tld-2.ox820.bodhi.tar to it with scp from my desktop system. (I could not download it directly from dropbox with wget)

untarred it etc and entered the command to erase the MTD0 device (I assumed this is the SPL aera, but it does not matter anyway)
I got this output:

root@debian:/home/pogobackup/tmp# /usr/sbin/flash_erase /dev/mtd0 0x0 6
Erasing 128 Kibyte @ 7f623f5c00000064 --  6 % complete

Because the result did not show values that I would expect (...@0x and 100%) and because the memory area seemed way beyond 0x000000 I made the assumption that a reboot could be an option. ( I know Bodhi advised otherwise...)

How wrong appeared that assumption to be...................

There was no reboot. Only a dead Pogoplug. No Led, no serial, no nothing.

I am out of options now.

The only hope I have is that I may be able to boot from sata. Is that an option?

Or maybe revival using JTAG ?

Or should I accept that I really killed the device beyond revival......

The sata way is more or less described here: https://forum.doozan.com/read.php?2,32994
however I am lost at:

8b.) Run Sata uboot SCRIPT
./disk_create_shv

But before I will attempt all this I would like to know if the sata boot procedure, if implemented properly, would make a revival of the box possible.

I have been working with single board computers and electronics way long ago, so assume I could manage a JTAG recovery. However I have found no information about that with reference to the PogoPro system. Only de V4. And I assume that this procedure cannot be used as is for the PogoPro. And it is already bricked, no need to repeat it ;)

I have also noticed the mentioning of kwboot. But have no idea of that could do the job.

Hoping for the best.

hacksome

Edit 1:

I have tried kwboot with the standard serial interface but got an error message because of image format incompatibility.
root@john-NUC6CAYH:/home/kwboot/kwboot-tool# ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.spl.2013.10.ox820.850mhz.mtd0.img -p
uboot.spl.2013.10.ox820.850mhz.mtd0.img: Invalid image.

I assumed that the -p option would take care of the adjustment when using a standard image. But that assumption appeared to be false as well I guess.

At openwrt.org I read : https://openwrt.org/_export/xhtml/docs/techref/hardware/soc/soc.oxnas
 ..... kwboot-like serial recovery yet needs to be found…

So using kwboot to revive or program Oxnas devices seems undiscovered territory.

I have no idea of the detailed inner workings of kwboot. I have used X,Y and Z-modem protocols ages ago, know about hex S records for serial transfer to load ROM images to targets but that does not help me much now.
Maybe there is more needed then simple adjusting offset and is a more intelligent conversion needed from .img to .kwb format. More information is welcome.

Some further investigation about JTAG options seems to run into a dead end as well.

I have found general information about the chip used: NAS7820. The description matches the PogoPro functions and the information states that JTAG functionality is available on the chip.

I have scrutinized the PCB and found various scattered TPxx points on it but have no clue which function they have or where they are connect with.

The missing link appears to be how to connect a JTAG probe to the board. If that is even possible.... I also read that not all vendors have made JTAG functionality available. So it could be possible that JTAG support on the PogoPro ( I confirmed it is a Pro, because it has a miniPCI card for wireless) is not physically accessible. Or at best: not easy to find.

So my only hope left now is the sata boot. But before I try that I would like confirmation that it is a viable option.

hacksome


Edit 2:
I found some info about JTAG and PogoPro:
looking at the PCB I saw a none installed header with 14 pins labeled HD5. A search for this :
https://archlinuxarm.org/forum/viewtopic.php?t=1640

2 things: the HD5 seems to be the JTAG header, but info about the pin layout is not available.....

The other thing is that it is indicated in the thread that sata boot might work.........
The latter however is not verified as far as I know.

to be continued?

I would gladly want to figure out the JTAG route. Even if that is more complicated.
So any info about the actual JTAG pinout would be appreciated.

hacksome



Edited 2 time(s). Last edit at 12/05/2019 03:57PM by hacksome.
Re: PogoProReallyBrickedNow......
December 05, 2019 06:25PM
hacksome,

It's a long post so let me know if I have not addressed any of your question!


> root@debian:/home/pogobackup/tmp#
> /usr/sbin/flash_erase /dev/mtd0 0x0 6
> Erasing 128 Kibyte @ 7f623f5c00000064 --  6 %
> complete

This 6% is OK. The output was misleading on the latest flash_erase binary. It actually was successful.

You should have stopped here and post question :)

> The only hope I have is that I may be able to boot
> from sata. Is that an option?

This box does not have kwboot capability. JTAG might be possible.

SATA is the sure way to unbrick this box. That's what make this box almost unbrickable. You don't even need NAND run it.

So try SATA and post the log of the session where you got stuck, or not sure about something.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 06, 2019 11:03AM
Hello Bodhi,

thanks for your reply.

Quote

You should have stopped here and post question :)

I now know ;)

I succesfully managed to revive the box using this procedure: https://forum.doozan.com/read.php?2,32994

I had to modify some things and have manually ¨created¨ the disk with only the perl part of the script and manually:
dd if=/home/sataboot/boot/u-boot-spl.bin of=/dev/sdb bs=512 seek=34

and I used: Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2 instead the version because the version in the example is not available anymore.
I did not let it really boot into the disk and have interrupted the boot from the serial console

The first part boot showed:

U-Boot SPL 2013.10-g3a0f380-dirty (Jul 26 2014 - 14:31:34)
  Boot device: SATA
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1
U-Boot SPL 2013.10-g3a0f380-dirty (Jul 26 2014 - 14:31:34)
  Boot device: SATA
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set
Bus 0: OK 
  Device 0: 
** File not found /boot/bootargs.bin **


U-Boot 2013.10-g3a0f380-dirty (Jul 26 2014 - 10:18:57) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK 
  Device 0: Model: SINTECHI HighSpeed SD to CF Adapter V1.0 Firm: Rev 1.2  Ser#: DC5F53C8
            Type: Hard Disk
            Capacity: 30528.0 MB = 29.8 GB (62521344 x 512)
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   
Led:	GREEN
mii0
Main Loop
Hit any key to stop autoboot:  3  2  1  0 
PLLA Set
Bus 0: OK 
  Device 0: 
** File not found /boot/bootargs.bin **


U-Boot 2013.10-g3a0f380-dirty (Jul 26 2014 - 10:18:57) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK 
  Device 0: Model: SINTECHI HighSpeed SD to CF Adapter V1.0 Firm: Rev 1.2  Ser#: DC5F53C8
            Type: Hard Disk
            Capacity: 30528.0 MB = 29.8 GB (62521344 x 512)
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   
Led:	GREEN
mii0
Main Loop
Hit any key to stop autoboot:  3  2  1  0

I stopped the boot and printenv gave me this:

OX820 # printenv
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run dt_bootcmd_ide
bootdelay=3
console=console=ttyS0,115200n8
dt_bootcmd_ide=ide start; run dt_ide_bootcmd; ide stop; reset
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_ide_boot=run dt_ide_load_uimage; run dt_ide_load_initrd; run dt_ide_load_dtb; run dt_bootm
dt_ide_bootcmd=run ide_set_bootargs; run dt_sata_boot
dt_ide_load_dtb=ext2load ide 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_ide_load_initrd=ext2load ide 0:1 $uinitrd_addr /boot/uInitrd
dt_ide_load_uimage=ext2load ide 0:1 $uimage_addr /boot/uImage
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_sata_boot=ext2load ide 0:1 $uimage_addr /boot/uImage_2.6.31.14_OX820_1.2_shv.Pro; bootm $uimage_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
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:25:31:01:C6:76
ide_set_bootargs=setenv bootargs root=/dev/sda2 rootfstype=ext3 console=ttyS0,115200 mem=128M
if_netconsole=ping $serverip
ipaddr=192.168.0.100
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=run if_netconsole start_netconsole
sata_bootcmd=run usb_set_bootargs; run sata_boot
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
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

after a reset command and booting the disk it gets stuck:

Output on serial console:

U-Boot 2013.10-g3a0f380-dirty (Jul 26 2014 - 10:18:57) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK 
  Device 0: Model: SINTECHI HighSpeed SD to CF Adapter V1.0 Firm: Rev 1.2  Ser#: DC5F53C8
            Type: Hard Disk
            Capacity: 30528.0 MB = 29.8 GB (62521344 x 512)
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   
Led:	GREEN
mii0
Main Loop
Hit any key to stop autoboot:  0 
ide - IDE sub-system

Usage:
ide reset - reset IDE controller
ide info  - show available IDE devices
ide device [dev] - show or set current device
ide part [dev] - print partition table of one or all IDE devices
ide read  addr blk# cnt
ide write addr blk# cnt - read/write `cnt' blocks starting at block `blk#'
    to/from memory address `addr'
2212156 bytes read in 1197 ms (1.8 MiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-2.6.31.14_OX820_1.2_shv
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2212092 Bytes = 2.1 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Led:	GREEN

Starting kernel ...

Uncompressing Linux....................................................................................................................................... done, booting the kernel.
[    0.000000] Linux version 2.6.31.14_OX820_1.2_shv (root@plug2) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Fri Oct 4 11:38:10 CEST 2013
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root=/dev/sda2 rootfstype=ext3 console=ttyS0,115200 mem=128M
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB = 128MB total
[    0.000000] Memory: 125368KB available (3816K code, 304K data, 132K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:96
[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
[    0.010000] Console: colour dummy device 80x30
[    0.010000] console [ttyS0] enabled
[    0.020000] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.230000] Security Framework initialized
[    0.230000] Mount-cache hash table entries: 512
[    0.240000] CPU: Testing write buffer coherency: ok
[    0.240000] Calibrating local timer... 424.49MHz.
[    0.310000] CPU1: Booted secondary processor
[    0.410000] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.620000] Brought up 2 CPUs
[    0.630000] SMP: Total of 2 processors activated (678.29 BogoMIPS).
[    0.640000] NET: Registered protocol family 16
[    0.640000] Number of DMA channels = 4, version = 4
[    0.650000] Reserving a DMA channel for DirectRAID
[    0.650000] Allocating 389 SRAM generic DMA descriptors
[    1.160000] PCIeA version/deviceID 082510b5
[    1.160000] PCIeB version/deviceID 082510b5
[    4.190000] ox820_pci_preinit() PCIEB link up timeout (00001814)
[    4.190000] ox820_pcie_setup_resources() Enabling PCIe Pre-Emphasis
[    4.200000] ox820_pciea_setup_resources() resource c7853f80
[    4.200000] ox820_pciea_setup_resources()    io:      0x4be00000 - 0x4befffff
[    4.210000] ox820_pciea_setup_resources()    non-pre: 0x48000000 - 0x49ffffff
[    4.220000] ox820_pciea_setup_resources()    pre:     0x4a000000 - 0x4bdfffff
[    4.220000] PCI: bus0: Fast back to back transfers disabled
[    4.230000] PCI: bus1: Fast back to back transfers enabled
[    4.250000] bio: create slab <bio-0> at 0
[    4.250000] SCSI subsystem initialized
[    4.260000] usbcore: registered new interface driver usbfs
[    4.260000] usbcore: registered new interface driver hub
[    4.270000] usbcore: registered new device driver usb
[    4.310000] NET: Registered protocol family 2
[    4.310000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    4.320000] Switched to NOHz mode on CPU #0
[    4.320000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    4.320000] Switched to NOHz mode on CPU #1
[    4.330000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    4.340000] TCP: Hash tables configured (established 4096 bind 4096)
[    4.340000] TCP reno registered
[    4.350000] NET: Registered protocol family 1
[    4.350000] Create fragment cache
[    4.360000] fuse init (API version 7.12)
[    4.360000] msgmni has been set to 245
[    4.370000] alg: No test for stdrng (krng)
[    4.370000] io scheduler noop registered
[    4.380000] io scheduler anticipatory registered (default)
[    4.380000] io scheduler deadline registered
[    4.390000] io scheduler cfq registered
[    4.390000] ox820_gpio: initialized
[    4.410000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.420000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    4.430000] brd: module loaded
[    4.440000] loop: module loaded
[    4.440000] ox820sata: OX820 sata core.
[    4.450000] scsi0 : oxnassata
[    4.450000] scsi1 : oxnassata
[    4.460000] ata1: SATA max UDMA/133 irq 50
[    4.460000] ata2: SATA max UDMA/133 irq 50
[    4.460000] ox820sata: reseting SATA core
[    4.990000] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    5.000000] ata1.00: CFA: SINTECHI HighSpeed SD to CF Adapter V1.0, Rev 1.2, max UDMA/100
[    5.000000] ata1.00: 62521344 sectors, multi 1: LBA 
[    5.010000] ata1.00: configured for UDMA/100
[    5.020000] ox820sata: reseting SATA core
[    5.730000] ata2: SATA link down (SStatus 0 SControl 300)
[    5.730000] scsi 0:0:0:0: Direct-Access     ATA      SINTECHI HighSpe Rev  PQ: 0 ANSI: 5
[    5.740000] sd 0:0:0:0: [sda] 62521344 512-byte logical blocks: (32.0 GB/29.8 GiB)
[    5.750000] sd 0:0:0:0: [sda] Write Protect is off
[    5.750000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    5.760000] NAND: Page read time 40ms
[    5.760000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    5.760000] Scanning device for bad blocks
[    5.760000] Bad eraseblock 33 at 0x000000420000
[    5.780000] Bad eraseblock 336 at 0x000002a00000
[    5.790000] Bad eraseblock 496 at 0x000003e00000
[    5.800000] Bad eraseblock 629 at 0x000004ea0000
[    5.830000] Bad eraseblock 1015 at 0x000007ee0000
[    5.840000]  sda:
[    5.840000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    5.850000] 0x000000000000-0x000000e00000 : "boot"
[    5.850000]  sda1
[    5.850000] 0x000000e00000-0x000008000000 : "rootfs"
[    5.860000] sd 0:0:0:0: [sda] Attached SCSI disk
[    5.860000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.870000] Start USB clocks
[    5.870000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
[    5.880000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
[    5.920000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
[    5.940000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
[    5.940000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    5.950000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.950000] usb usb1: Product: OXNAS EHCI Host Controller
[    5.960000] usb usb1: Manufacturer: Linux 2.6.31.14_OX820_1.2_shv ehci_hcd
[    5.970000] usb usb1: SerialNumber: usb
[    5.970000] usb usb1: configuration #1 chosen from 1 choice
[    5.980000] hub 1-0:1.0: USB hub found
[    5.980000] hub 1-0:1.0: 2 ports detected
[    5.990000] Initializing USB Mass Storage driver...
[    5.990000] usbcore: registered new interface driver usb-storage
[    6.000000] USB Mass Storage support registered.
[    6.000000] usbcore: registered new interface driver libusual
[    6.010000] mice: PS/2 mouse device common for all mice
[    6.010000] TCP cubic registered
[    6.020000] NET: Registered protocol family 10
[    6.020000] NET: Registered protocol family 17
[    6.030000] RPC: Registered udp transport module.
[    6.030000] RPC: Registered tcp transport module.
[    6.040000] registered taskstats version 1
[    6.040000] VFS: Cannot open root device "sda2" or unknown-block(8,2)
[    6.050000] Please append a correct "root=" boot option; here are the available partitions:
[    6.060000] 0800        31260672 sda driver: sd
[    6.060000]   0801         2097152 sda1
[    6.070000] 1f00          131072 mtdblock0 (driver?)
[    6.070000] 1f01           14336 mtdblock1 (driver?)
[    6.080000] 1f02          116736 mtdblock2 (driver?)
[    6.080000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)
[    6.090000] CPU0: stopping
[    6.090000] [<c002f4c4>] (unwind_backtrace+0x0/0xe8) from [<c0029340>] (do_IPI+0xe4/0x148)
[    6.090000] [<c0029340>] (do_IPI+0xe4/0x148) from [<c0029c18>] (__irq_svc+0x38/0xc0)
[    6.090000] Exception stack(0xc03f9f58 to 0xc03f9fa0)
[    6.090000] 9f40:                                                       028cba36 00000000 
[    6.120000] 9f60: c03f9fa0 00000000 c03f8000 c0421464 c03fe1bc c055a000 c042f484 000011a0 
[    6.130000] 9f80: c03fdf00 c04211e0 ffff8d34 c03f9fa0 c002ab80 c002ab84 60000013 ffffffff 
[    6.130000] [<c0029c18>] (__irq_svc+0x38/0xc0) from [<c002ab84>] (default_idle+0x24/0x28)
[    6.150000] [<c002ab84>] (default_idle+0x24/0x28) from [<c002b080>] (cpu_idle+0x64/0x98)
[    6.150000] [<c002b080>] (cpu_idle+0x64/0x98) from [<c0008b50>] (start_kernel+0x330/0x398)
[    6.160000] [<c0008b50>] (start_kernel+0x330/0x398) from [<60008084>] (0x60008084)

It does no continue from here.

I guess I have to modify , add, delete some value´s with printenv.

But I have one question: I see consistently a leading bogus character in the first line printed from printenv.
It is not visible in the text on the forum.
It is this first line only, but maybe it has to do with the serial interface. However I have seen it before in earlier experiments and then it lead to error messages. ( I think) i have no idea how to erase it.


I tried tot rewrite the variable with: setenv dt_bootm bootm $uimage_addr $uinitrd_addr $dtb_addr<INTERRUP>
I did this because that text was literally shown on the serial terminal screen with printenv:

However that appeared false and is was not saved. A retry gave me this:

OX820 # setenv dt_bootm bootm $uimage_addr $uinitrd_addr $dtb_addr
OX820 # saveenv
Saving Environment to EXT4...
File System is consistent
file found deleting
update journal finished
File System is consistent
update journal finished
done
OX820 #

Then a reset again:

no change of variables with printenv still the bogus character appears on the first line and bootin does not continue.

But I am glad the box seems to be alive again. But I for now I take a break for a little while. It was a stupid mistake, to reboot after the nanderase.....

Maybe you have any suggestion where to find a proper example of env settings.

hacksome

Edit 1:
I coud not stand sitting idle without trying anything....
So i tried a few things:

I managed to change the environment after interrupting the boot:
I changes these settings:

dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot
ide_set_bootargs=setenv bootargs root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200 mem=128M

Now it boots in some kind of kernel initramfs.
see log:
Led:	GREEN

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.12.13-oxnas-tld-5 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #3 SMP PREEMPT Mon May 12 17:42:03 PDT 2014
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: PLXTECH NAS782X SoC (Flattened Device Tree), model: Pogoplug Pro
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] Start Ox820 platform
[    0.000000] PERCPU: Embedded 7 pages/cpu @c0826000 s6656 r8192 d13824 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200 mem=128M
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 120492K/131072K available (5186K kernel code, 234K rwdata, 1460K rodata, 158K init, 223K bss, 10580K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0685b90   (6647 kB)
[    0.000000]       .init : 0xc0686000 - 0xc06ada00   ( 159 kB)
[    0.000000]       .data : 0xc06ae000 - 0xc06e8aa0   ( 235 kB)
[    0.000000]        .bss : 0xc06e8aac - 0xc0720868   ( 224 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:160
[    0.000000] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 42949ms
[    0.000000] Console: colour dummy device 80x30
[    0.000189] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.050014] pid_max: default: 32768 minimum: 301
[    0.050234] Mount-cache hash table entries: 512
[    0.052784] CPU: Testing write buffer coherency: ok
[    0.053189] Setting up static identity map for 0xc04ee9e8 - 0xc04eea20
[    0.110359] CPU1: Booted secondary processor
[    0.170165] Brought up 2 CPUs
[    0.170191] SMP: Total of 2 processors activated.
[    0.171284] devtmpfs: initialized
[    0.174876] pinctrl core: initialized pinctrl subsystem
[    0.175252] NET: Registered protocol family 16
[    0.175744] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.178764] gpio-oxnas 44000000.gpio: at address c8846000
[    0.178977] gpio-oxnas 44100000.gpio: at address c8848000
[    0.179489] pinctrl-oxnas pinctrl.5: initialized OX820 pinctrl driver
[    0.186168] bio: create slab <bio-0> at 0
[    0.296952] oxnas-pcie 47c0: PCIe version/deviceID 0x82510b5
[    0.297070] oxnas-pcie 47c0: link up
[    0.297259] oxnas-pcie 47c0: PCI host bridge to bus 0000:00
[    0.297282] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    0.297300] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pref]
[    0.297318] pci_bus 0000:00: root bus resource [io  0x4be00000-0x4befffff]
[    0.297336] pci_bus 0000:00: root bus resource [bus 00-7f]
[    0.297689] PCI: bus0: Fast back to back transfers disabled
[    0.297758] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff]
[    0.298086] vgaarb: loaded
[    0.298465] SCSI subsystem initialized
[    0.299133] usbcore: registered new interface driver usbfs
[    0.299212] usbcore: registered new interface driver hub
[    0.299389] usbcore: registered new device driver usb
[    0.299476] pps_core: LinuxPPS API ver. 1 registered
[    0.299489] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.299522] PTP clock support registered
[    0.300587] cfg80211: Calling CRDA to update world regulatory domain
[    0.301757] Switched to clocksource rps_clocksource_timer
[    0.313249] NET: Registered protocol family 2
[    0.313996] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.314048] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.314083] TCP: Hash tables configured (established 1024 bind 1024)
[    0.314168] TCP: reno registered
[    0.314193] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.314237] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.314577] NET: Registered protocol family 1
[    0.315038] RPC: Registered named UNIX socket transport module.
[    0.315059] RPC: Registered udp transport module.
[    0.315069] RPC: Registered tcp transport module.
[    0.315082] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.315379] Unpacking initramfs...
[    0.527749] Freeing initrd memory: 2052K (c7c27000 - c7e28000)
[    0.541721] NFS: Registering the id_resolver key type
[    0.541793] Key type id_resolver registered
[    0.541808] Key type id_legacy registered
[    0.541834] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.542492] fuse init (API version 7.22)
[    0.543436] msgmni has been set to 239
[    0.607774] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.607797] io scheduler noop registered
[    0.607810] io scheduler deadline registered
[    0.608074] io scheduler cfq registered (default)
[    0.608481] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.609579] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 55, base_baud = 390625) is a 16550A
[    1.124044] console [ttyS0] enabled
[    1.128949] scsi0 : sata_oxnas
[    1.132272] ata1: SATA max UDMA/133 irq 50
[    1.136455] ox820sata: reseting SATA core
[    1.137717] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    1.137735] Scanning device for bad blocks
[    1.140490] Bad eraseblock 33 at 0x000000420000
[    1.164789] Bad eraseblock 336 at 0x000002a00000
[    1.182103] Bad eraseblock 496 at 0x000003e00000
[    1.197255] Bad eraseblock 629 at 0x000004ea0000
[    1.232558] Bad eraseblock 1015 at 0x000007ee0000
[    1.237898] 2 ofpart partitions found on MTD device 41000000.nand
[    1.243985] Creating 2 MTD partitions on "41000000.nand":
[    1.249367] 0x000000000000-0x000000e00000 : "boot"
[    1.255367] 0x000000e00000-0x000008000000 : "data"
[    1.261747] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    1.266775]  Ring mode enabled
[    1.269808]  DMA HW capability register supported
[    1.274337]  Enhanced/Alternate descriptors
[    1.278666] 	Enabled extended descriptors
[    1.282667]  RX Checksum Offload Engine supported (type 2)
[    1.288122]  TX Checksum insertion supported
[    1.292377]  Wake-Up On Lan supported
[    1.296017]  Enable RX Mitigation via HW Watchdog Timer
[    1.318809] libphy: stmmac: probed
[    1.322234] eth0: PHY ID 001cc914 at 0 IRQ 0 (stmmac-0:00) active
[    1.328302] eth0: PHY ID 001cc914 at 3 IRQ 0 (stmmac-0:03)
[    1.333918] PCI: enabling device 0000:00:00.0 (0140 -> 0142)
[    1.339709] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3090, rev 3213 detected
[    1.350901] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[    1.359206] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.365739] ehci-pci: EHCI PCI platform driver
[    1.370480] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    1.375969] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus number 1
[    1.383726] oxnas-ehci 40200100.ehci: irq 39, io mem 0x40200100
[    1.400445] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    1.406673] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.413460] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.420659] usb usb1: Product: EHCI Host Controller
[    1.425515] usb usb1: Manufacturer: Linux 3.12.13-oxnas-tld-5 ehci_hcd
[    1.432023] usb usb1: SerialNumber: 40200100.ehci
[    1.437370] hub 1-0:1.0: USB hub found
[    1.441226] hub 1-0:1.0: 2 ports detected
[    1.445752] usbcore: registered new interface driver usb-storage
[    1.452026] mousedev: PS/2 mouse device common for all mice
[    1.458380] usbcore: registered new interface driver usbhid
[    1.463976] usbhid: USB HID core driver
[    1.468075] TCP: cubic registered
[    1.472419] NET: Registered protocol family 10
[    1.478218] sit: IPv6 over IPv4 tunneling driver
[    1.483678] NET: Registered protocol family 17
[    1.488238] Key type dns_resolver registered
[    1.679992] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    1.690503] ata1.00: CFA: SINTECHI HighSpeed SD to CF Adapter V1.0, Rev 1.2, max UDMA/100
[    1.698675] ata1.00: 62521344 sectors, multi 1: LBA 
[    1.708288] ata1.00: configured for UDMA/100
[    1.730447] scsi 0:0:0:0: Direct-Access     ATA      SINTECHI HighSpe Rev  PQ: 0 ANSI: 5
[    1.739358] sd 0:0:0:0: [sda] 62521344 512-byte logical blocks: (32.0 GB/29.8 GiB)
[    1.747392] sd 0:0:0:0: [sda] Write Protect is off
[    1.752391] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    1.761607] usb 1-1: new high-speed USB device number 2 using oxnas-ehci
[    1.770990]  sda: sda1
[    1.774914] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.779742] Freeing unused kernel memory: 156K (c0686000 - c06ad000)
Loading, please wait...
[    1.911946] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    1.918627] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.930042] usb 1-1: Product: USB2.0 Hub
[    1.935362] udev[73]: starting version 164
[    1.943045] hub 1-1:1.0: USB hub found
[    1.947494] hub 1-1:1.0: 4 ports detected
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[    2.462561] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 0 failed (64904!=0)
[    2.470991] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 1 failed (27197!=0)
[    2.479232] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 2 failed (33051!=0)
[    2.487531] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 3 failed (14511!=0)
[    2.495825] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 4 failed (54377!=0)
[    2.504089] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 5 failed (22562!=0)
[    2.512340] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 6 failed (42161!=0)
[    2.520601] EXT4-fs (sda1): ext4_check_descriptors: Checksum for group 7 failed (25897!=0)
[    2.538027] JBD2: Unrecognised features on journal
[    2.542860] EXT4-fs (sda1): error loading journal
mount: mounting /dev/sda1 on /root failed: Invalid argument
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
done.
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.


BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs)

I have a shell here but I have no clue what I can do with it. I have not found how to change environment.

BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) uname -a
Linux (none) 3.12.13-oxnas-tld-5 #3 SMP PREEMPT Mon May 12 17:42:03 PDT 2014 armv6l GNU/Linux
(initramfs) lsblk
/bin/sh: lsblk: not found
(initramfs) help
Built-in commands:
------------------
	. : [ [[ alias bg break cd chdir command continue echo eval exec
	exit export false fg getopts hash help jobs kill let local printf
	pwd read readonly return set shift source test times trap true
	type ulimit umask unalias unset wait [ [[ adjtimex arping ash
	awk basename blockdev brctl bunzip2 bzcat bzip2 cal cat chgrp
	chmod chown chroot chvt clear cmp cp cpio cut date dc dd deallocvt
	df dirname dmesg dnsdomainname dos2unix du dumpkmap dumpleases
	echo egrep env expr false fgrep find fold free ftpget ftpput
	getopt grep gunzip gzip head hexdump hostid hostname httpd id
	ifconfig ionice ip ipcalc kill killall klogd last length ln loadfont
	loadkmap logger logname logread losetup ls lzcat lzma md5sum
	mkdir mkfifo mknod mktemp more mount mt mv nameif nc netstat
	nslookup od openvt patch pidof ping ping6 printf ps pwd rdate
	readlink realpath renice reset rev rm rmdir route rpm rpm2cpio
	run-parts sed setkeycodes sh sha1sum sha256sum sha512sum sleep
	sort start-stop-daemon strings stty swapoff swapon sync sysctl
	syslogd tac tail tar tee telnet test tftp time top touch tr traceroute
	traceroute6 true tty udhcpc udhcpd umount uname uncompress uniq
	unix2dos unlzma unxz unzip uptime usleep uudecode uuencode vi
	watch watchdog wc wget which who whoami xargs xz xzcat yes zcat


(initramfs)

I also tried to find out about weird characters in the first line preceding dt_bootm=... in the u-boot.env file in the \boot directory of the disk.
With a hex editor I saw a 5 byte header with the following hex bytes:
00000000 C1 CA 9D B8 16 64 74 5F 62 6F 74 6D 3D 62 6F 6F 74 6D .....dt_bootm

I was wondering if this is a corrupted file or maybe are those bytes there because of a specific file format of the u-boot.env file.

Also I am not sure if the 2 changes in the env setting I made had any influence because before I did that I also somtimes ended in the initram shell.

I assume that I have a mismatch between env settings and what images are to be loaded.

Unfortunately I have no clue what is related to what.

Maybe you can shine some light over it....

hacksome

I forgot this information: when I take the disk (it is an SD card in a sata adapter) to another computer the disk is dirty and will not mount. When I fsck the disk all seems ok.



Edited 2 time(s). Last edit at 12/06/2019 03:59PM by hacksome.
Re: PogoProReallyBrickedNow......
December 06, 2019 05:28PM
hacksome,

> U-Boot SPL 2013.10-g3a0f380-dirty (Jul 26 2014 -
> 14:31:34)

> U-Boot 2013.10-g3a0f380-dirty (Jul 26 2014 -
> 10:18:57) for OXNAS

> Hit any key to stop autoboot: 3  2  1  0

OK cool! as long as you got here, it's totally unbricked.


> 2.6.31.14_OX820_1.2_shv (root@plug2) (gcc version
> 4.4.5 (Debian 4.4.5-8) ) #1 SMP Fri Oct 4 11:38:10
> CEST 2013

It boots the kernel on the HDD.

> [ 6.080000] Kernel panic - not syncing: VFS:
> Unable to mount root fs on unknown-block(8,2)

This is just the rootfs was not mounted properly.

> no change of variables with printenv still the
> bogus character appears on the first line and
> bootin does not continue.

It's OK. From now we actually dont care about tthe current envs. We can load a latest set of envs and then boot directly into Debian rootfs.

> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 3.12.13-oxnas-tld-5
> (root@tldDebian) (gcc version 4.6.3 (Debian
> 4.6.3-14) ) #3 SMP PREEMPT Mon May 12 17:42:03 PDT
> 2014

That's still an old kernel.

> I also tried to find out about weird characters in
> the first line preceding dt_bootm=... in the
> u-boot.env file in the \boot directory of the
> disk.
> With a hex editor I saw a 5 byte header with the
> following hex bytes:
>
> 00000000 C1
> CA 9D B8 16 64 74 5F 62 6F 74 6D 3D 62 6F
> 6F 74 6D .....dt_bootm
>
>
> I was wondering if this is a corrupted file or
> maybe are those bytes there because of a specific
> file format of the u-boot.env file.

All images in u-boot format has a header with checksum. In this case the envs image is read by u-boot and verified using this header.

> I forgot this information: when I take the disk
> (it is an SD card in a sata adapter) to another
> computer the disk is dirty and will not mount.
> When I fsck the disk all seems ok.

That's normal. The HDD spare sector was written with the magic sequence. That might have caused some filesystem driver to assume that it is dirty.

========

Ok let me find the post with the envs script and show you how to populate the envs with a new set of values and then boot into a USB rootfs, or if you want, boot into the existing HDD rootfs that you have created.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 06, 2019 05:43PM
hacksome,

I've realized that the script was a bit old. So let's modify the current envs so you can boot to Debian.

1. Debian rootfs

If you like not to touch the HDD so it can be used as a rescue mechanism, use a USB thunb drive to create the rootfs Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2. Follow the instruction very closely (being root, single Ext3 partition, label it rootfs).

If you prefer to boot into the HDD rootfs you already created, then make sure that also was created properly ( (being root, label it rootfs).

And let me know that you are using which drive for rootfs.

2. At u-boot countdown, interrupt it and list your current envs

printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 07, 2019 01:53AM
Hello Bodhi,

thanks for clearing up my questions, so I can focus on rebuilding the Pogo!

My current envs now are:

OX820 # printenv
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run dt_bootcmd_ide
bootdelay=3
console=console=ttyS0,115200n8
dt_bootcmd_ide=ide start; run dt_ide_bootcmd; ide stop; reset
dt_bootcmd_usb=usb start; run dt_usb_bootcmd; usb stop; reset
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr
dt_ide_boot=run dt_ide_load_uimage; run dt_ide_load_initrd; run dt_ide_load_dtb; run dt_bootm
dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot
dt_ide_load_dtb=ext2load ide 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_ide_load_initrd=ext2load ide 0:1 $uinitrd_addr /boot/uInitrd
dt_ide_load_uimage=ext2load ide 0:1 $uimage_addr /boot/uImage
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_sata_boot=ext2load ide 0:1 $uimage_addr /boot/uImage_2.6.31.14_OX820_1.2_shv.Pro; bootm $uimage_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
dtb_addr=0x62c00000
ethact=mii0
ethaddr=00:25:31:01:C6:76
ide_set_bootargs=setenv bootargs root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200 mem=128M
if_netconsole=ping $serverip
ipaddr=192.168.0.100
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=run if_netconsole start_netconsole
sata_bootcmd=run usb_set_bootargs; run sata_boot
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
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

I don´t know if it is relevant but originally I had:
dt_ide_bootcmd=run ide_set_bootargs; run dt_sata_boot
ide_set_bootargs=setenv bootargs root=/dev/sda2 rootfstype=ext3 console=ttyS0,115200 mem=128M
BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
but in an attempt to improve things I changed them.

I have a thumb disk I used as boot drive. When I remember it correct it meets your requirements:
label : rootfs
single Ext3 partition.
I am not 100% sure if it is Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2. but I have onle a few other Debian archives downloaded on my system and I have not used the other ones. So it must be that version.
I inserted it in the front USB slot, (as I did before I bricked the box) but I have no indication that is was being accessed when I let the Pogo continue to boot. I ended up in the Busybox shell again.

BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)

It looks as if nothing is mounted or not properly.

My intentions are to be able to boot from the thumb drive as before. I was in the process to prepare the system to reliably boot, had updated the Debian version (apt- update etc) and was thinking about to try to install OMV on it. But then things went awry.

I agree that having a rescue disk available is crucial. Maybe later I can decide I will use a sata drive as primary disk.
From what I read so far I assumed that with the latest Uboot version I can have all options:
Boot from sata when connected or boot from usb when connected. But I did not come that far:)
So at the moment my focus is: booting properly from the thumb drive again and then to configure the options I prefer.

By the way, I was also trying to establish netconsole communication but did nod succeed. I ended with the conclusion that the netconsole.ko module was not activated in the kernel of my desktop (ubuntu 18.04) . But then I put it aside for later because I have a serial link availble.
But that may be a thing to figure out when all is well again and booting and running properly......

Many thanks for your active assistance!

hacksome
Re: PogoProReallyBrickedNow......
December 07, 2019 04:23AM
hacksome,

Bring the SATA drive to another Linux box and change the partition label for the SATA rootfs to something other than rootfs (if it is currently rootfs). And then,

Boot with SATA like you did before, interrupt the u-boot countdown and

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10'
setenv bootcmd 'run dt_bootcmd_usb'
boot

And once it completes booting, you can see the Debian prompt. Log in with root/rootf credential and then you can flash new u-boot to NAND again permanently.


Remember that later, if you plug in this specially prepared HDD, it will boot into that system, always. Therefore, to attach an HDD, it must be a normal formatted one so it will not short circuit the USB rootfs booting.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 12/07/2019 04:28AM by bodhi.
Re: PogoProReallyBrickedNow......
December 07, 2019 09:51AM
Perfect!

Even the warning about the specially prepared disk. Initially I did not notice your warning properly.
I booted as you suggested. It did boot the kernel from the thumb drive. I SSH´d into the box. I flashed the new uboot (piece of cake because all the files were already on the thumb drive).

Then, without detaching the sata drive it rebooted but got stuck in a similar way (busybox shell) as before. Then I reread your warning.

Removed the rescue sata drive and it booted perfectly.

Thanks a bunch!

Maybe I can help fellow owners of this type of Pogoplug when I make a log if what I had done in order to ¨unbrick¨ a PogoPro.
I can also try to summarize how to start from a stock Pogopro (that was were I started) and then build one with the latest versions of u-boot etc.

I have spent much time figuring things out reading on this an other fora. With hindsight it is not that difficult at all. Of course there are many things in life that are similar, but when one´s goal is to use a Pogoplug (or similar) hardware for other purposes there is a rather steep trial and error curve involved if things described in various fora that are changed/updated now or not available anymore.

I don´t know why the created sata rescue disk on it´s own does not provide a usable kernel that makes flashing the nand possible. Maybe I can figure out a version that has those abilities.

I know that I need some assistance for that because I do not know (yet?) how the various env settings point to booting specific images and/or kernels etc.

But creating a basic SATA rescue with all tooling for nand management disk should not be that complicated I would assume. Only the proper env settings and the matching bootloaders etc?

Initially I will just describe what I have done so far. Even a slightly complicated way of working ( 2 stages) is better than nothing.

Anyway, many many thanks for your help!
It is nice to now that perfectly operating hardware can relatively easy get a life extension long after the commercial (read wasteful) suppliers have dropped support.

Keep up the good work! When and where I can I will try to add my part, as little as it is, but I suppose that is exactly the essence of how a community functions.

Thanks again,

hacksome
Re: PogoProReallyBrickedNow......
December 07, 2019 04:58PM
hacksome,

You're welcome!

Quote

Maybe I can help fellow owners of this type of Pogoplug when I make a log if what I had done in order to ¨unbrick¨ a PogoPro.
I can also try to summarize how to start from a stock Pogopro (that was were I started) and then build one with the latest versions of u-boot etc.

It would be great to have. As your experience with this Pogo V3 unbricking told, we had enough instruction to do that from youxiaojie's thread. It could be improved (reorganized and some additions).

So please do that and I'll add yours (this) and youxiaojie's threads to the Wiki.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 07, 2019 05:03PM
Quote

But creating a basic SATA rescue with all tooling for nand management disk should not be that complicated I would assume. Only the proper env settings and the matching bootloaders etc?

2 issues during your unbricking: the envs and the SATA rootfs. The envs need to boot the rootfs (2nd partition) on the rescue disk. The current envs out of the tarball by shv should be ok. But some how the rootfs was not mounted.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 11, 2019 03:46PM
I was kind of trying to enhance (and understand the details) of youxiaojie's thread.
I was also wondering why the SATA disk did not boot properly.
And I think I found the problem, or at least part of it:

Also with the current (restored) Uboot in NAND when the the SATA disk (with the special code in the first sectors) is installed it will not boot properly. The log shows these lines:

[    2.489336] JBD2: Unrecognised features on journal
[    2.494179] EXT4-fs (sda1): error loading journal
mount: mounting /dev/sda1 on /root failed: Invalid argument
So I assume it does not mount because something is amiss with the features of the EXT4 filesystem. I disabled the feature using:

tune2fs -O ^has_journal /dev/sdb1

end then it booted properly from the SATA disk!

I am not sure if this behavior is caused by accident in creating or using the disk. Earlier logs showed automatic runs and repairs of the disk with fsck (sometimes using ext3, but also ext3).

Anyway, disabling the specific EXT4 feature resulted in a proper boot.
I wonder if using the EXT4 filesystem for a SATA rescue disk has advantages or might just cause troubles when things are not working smoothly. Maybe it is better to just use EXT3.
Is that correct?

Another minor thing: a relabeled the SATA disk to ¨rescue¨ because I also used a thumb drive labeled ¨rootfs¨ and at first boot from that kernel on the thumb drive I could restore the Uboot area.

But when the SATA drive boots properly there is no need for a thumb drive anymore.
When I interpret the logs I have from this configuration it even boots from a SATA drive not labeled ¨rootfs¨. There is only this complaint:

findfs: unable to resolve 'LABEL=rootfs'

But the systems boots into a maintenance kernel that can be used normally.
I have not verified if the maintenance kernel has all tools available for flashing NAND etc.

I am not quite sure if I interpret all information correct. But based upon this behavior I would say:
do not use EXT4 but stay with EXT3 filesystem.

I will still try to update youxiaojie's thread, but will also try to test some specific configurations for proper functioning. That may take additional time, but I hope that it will prevent others to get stuck.

Hacksome
Re: PogoProReallyBrickedNow......
December 11, 2019 05:29PM
Hacksome,

Yes, always use Ext3. The instructionn is quite old, and Ext4 file system behavior has been revised quite bit (e.g.lazy init,...) since then.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 19, 2019 05:23AM
I have refreshed the procedure how to create a sata rescue disk. I have checked it only using an sata-SD adapter. It works with a Samsung EVO 32GB Sd and a 16Gb Kingston SD.

Steps to follow to create a sata rescue disk for a Pogo Pro or Pogo Classic.

You need a sata disk. All data on it will be destroyed.
A sata disk can be:
- regular sata disk 2.5 inch or 3.5 inch. However for the 3.5 inch disk you must have both 5 and 12V external power. For 2.5 inch disk you need only 5V.
- CF card or uSD card sata adapter: Both can be bought cheep at Aliexpress or ebay. (less then 10$)
- There are some drawbacks. Permanent use of SD card or CF card may be heavy for the memory card. But for a rescue disk it will be OK. No need for additional 12V power. 5V only is sufficient and can be taken from one of the USB ports of the Pogoplug if needed.
You can DIY this or buy an adapter cable (Aliexpress/Ebay)

Connect the sata disk to a linux box. You also can use your pogoplug as linux box.
If you do not have a direct sata connection available at your current linux box then a USB/sata adapter is very convenient. (Ali/Ebay...)

Open a root(!) terminal on your linux box: ( e.g. when in ubuntu ctrl+alt+t, then sudo -i and enter your password)
Mind that being root you can destroy your system when your command is wrong. (e.g. writing to the wrong drive or overwriting your existing system structures...)

If you connect the sata disk to your computer unmount it if it was automatically mounted when it was connected. (On my ubuntu box every time the drive is connected it became automatically mounted. Some operations described in the next part will not work on a mounted drive and will report an error. Other operations work without problem. Keep this in mind.)

Remove all existing partitions and create new ones using the fdisk command:
Fdisk commands/options:
i- show partition information
d- delete partitions
o- create a dos compatible empty partition table
p- create a new (p) primary partition (n) 1 starting at 2048 and specify a size with +2G (or larger)
w- write all changes to the disk
q- exit without writing the changes

Then format the disk (/dev/sdb1) as ext3 (ext4 is not recommended and may cause problems. ext3 is sufficient for a rescue disk)
Command: mkfs.ext3 /dev/sdb1
Optionally you can specify a label: immediately with the command: mkfs.ext3 -L rootfs /dev/sdb1

or separately modify the disk label with: tune2fs -L "rootfs" /dev/sdb1

Mount the drive with:
mount /dev/sdb1 /media/john/rootfs (on my system the drive is automatically mounted when inserted, so I use the names generated by the system)

Create a working directory: (mind! still all as root user!)
For example: /home/rescue
Extract ox820-sata-uboot.tar.gz to /home/rescue
You can do this in various ways:
- cd into /home/rescue and then tar -xvf /path_to_archive/ox820-sata-uboot.tar.gz .
- or from where the archive is: tar -xvf ox820-sata-uboot.tar.gz /home/rescue/
- or from somewhere else: tar -xvf /path_to_archive/ox820-sata-uboot.tar.gz /home/rescue/

After this a ./boot directory will be created in /home/rescue with the following content:

ls -l /home/rescue/boot
total 8380
drwxr-xr-x 2 root root    4096 aug  3  2014 dts
-rwxr-xr-x 1 root root   16384 jan  1  1970 u-boot.env
-rw-r--r-- 1 root root  525880 aug  3  2014 u-boot.img
-rwxr-xr-x 1 root root   32120 aug  3  2014 u-boot-spl.bin
-rw-r--r-- 1 root root 3676848 aug  3  2014 uImage
-rw-r--r-- 1 root root 2212156 aug  3  2014 uImage_2.6.31.14_OX820_1.2_shv.Pro
-rw-r--r-- 1 root root 2103272 aug  3  2014 uInitrd

Only if you have a pogo classic navigate to ./boot/dts and:
mv ox820-pogoplug-pro.dtb ox820-pogoplug-pro.dtb.ori
cp ox820-pogoplug-classic.dtb ox820-pogoplug-pro.dtb

Where can you find a ¨ox820-pogoplug-classic.dtb¨?
I found a ¨ox820-pogoplug-classic.dtb¨ in ¨linux-3.18.5-oxnas-tld-1.bodhi.tar.bz2¨archive. (I could not check the proper working because I have no Pogo Classic)

Skip all this when you have a PogoPro ( with miniPCI card equipped with wireless).

Copy the ./boot directory to the mounted disk.
cp -r ./boot /media/john/rootfs

To be able to boot from the SATA rescue disk it must be prepared in some special way:

First some special (¨magic¨) code must be written to the first physical sectors of the disk.
After that the SPL (Secondary Program Loader) u-boot-spl.bin is written to the disk.

This can be done with the following script:
¨disk_create.sh¨

#!/bin/sh

# uncomment line below and set to the correct disk
disk=/dev/sdb
#pay attention to fit yourself.this is  my situation

if [ -z "${disk}" ] ; then
   echo "You must uncomment/set the 'disk' variable"
   exit -1
fi

workarea=.

stage1File=$workarea/boot/u-boot-spl.bin

perl <<EOF | dd of="$disk" bs=512
    print "\x00" x 0x1a4;
    print "\x00\x5f\x01\x00";
    print "\x00\xdf\x00\x00";
    print "\x00\x80\x00\x00";
    print "\x00" x (0x1b0 -0x1a4 -12 );
    print "\x22\x80\x00\x00";
    print "\x22\x00\x00\x00";
    print "\x00\x80\x00\x00";
EOF

if [ -f $stage1File ];then
        echo "Writing stage 1"
        dd if=$stage1File    of="$disk" bs=512 seek=34
fi

You have to change the script to contain the correct variables such as the proper device name: most times it will be /dev/sdb
Also you have to execute the script from the directory you are in where the ¨u-boot-spl.bin¨ file is to be found or modify the line stage1File= so it will find the file.
To be able to have the script executed you have to chmod +x ¨script¨.

If you prefer you can partly do it manually:
Make a small script for only writing the ¨magic¨ code. (only the perl <<EOF .....EOF) part and manually execute:
dd if=./u-boot-spl.bin of=/dev/sdb bs=512 seek=34

After this preparation of the boot area of the disk you have to write the linux file system to the SATA drive:

I have used the current latest version for this: Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2

Unpack the archive to a temporary directory on your system (all this still logged in as root (sudo -i)) to a working directory:

I have created a ´sataboot´ directory in my home directory with: mkdir /home/sataboot

cd /home/sataboot
tar -xjf /PathToArchive/Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2

Then copy all files extracted form the archive to the mounted drive labeled ´rootfs´ directory, but DO NOT COPY the newly created ./boot directory!
Because then the sata boot images will be overwritten.....
You can manually copy all other directories one by one like this:

still from within /home/sataboot or cd to it:

cp -r ./xxx /media/john/rootfs
Where xxx is substituted with bin, usr, home, dev etc. but skip! the ./boot directory.

You can also move the ./boot directory elswhere, e.g. mv ./boot /home/tempboot/ and after that and from within the /home/sataboot directory copy al directories and files to the ´rootfs´ labeled sata drive with:
cp -r . /media/john/rootfs/


Then sync or unmount the drive
Connect it to your Pogoplug and boot it.
If no mistakes were made your Pogoplug should boot with Debian ( ssh password: root)

You can check the debian version after login with the uname -a command.

Have fun with you Pogoplug!

hacksome



Edited 2 time(s). Last edit at 12/27/2019 02:51PM by hacksome.
Re: PogoProReallyBrickedNow......
December 19, 2019 05:15PM
hacksome,,

Good work :) There are a lot details in your writeup. Especially the part about how we would populate the rootfs.

If you don't mind, I will edit your post to organize the instruction a bit to make it easier to follow?

And I have a suggestion for a minor part that I will post later.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 25, 2019 10:17PM
Up in the Wiki

https://forum.doozan.com/read.php?2,23630,23630#msg-23630

Quote

Booting Debian on Pogoplug

How to set up U-Boot for booting in multiple drives configuration
Backup and Restore NAND mtds
UART Booting HowTo for Selected Kirkwood Devices
Migrating from Arch to Debian?
How to boot new Debian rootfs using stock u-boot tftp - Pogo E02
How to boot new Debian rootfs on USB using stock u-boot - NSA325
How to boot Debian rootfs on a GPT HDD with stock u-boot (kernel files stored in HDD raw sector), 2nd HowTo post
How to boot Pogo V3 from SATA (to unbrick), 2nd How to Post

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 12/25/2019 10:18PM by bodhi.
Re: PogoProReallyBrickedNow......
December 26, 2019 01:01AM
Quote

Unpack the archive to a temporary directory on your system with:

cd ????
tar -xjf Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2

Then copy all directories created to the drive root directory, but DO NOT COPY the newly created ./boot directory!
Because then the sata boot images will be overwritten
So manually copy all directories like this:

cd ????
cp -r ./xxx /media/john/rootfs
Where xxx is substituted with bin, usr, home, dev etc. but skip the ./boot directory.

You may also move the ./boot directory elswhere and then:

cd ????
cp -r ./DirWithAllDebianDirectoriesExeptBoot/. /media/john/rootfs/


This section is not clear enough! see above addition in bold. Basically, there should be a cd command to change directory where that tar should be executed. Likewise for the other 2 commands below. Don't describe them in text, if you could show exactly what commands to run.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: PogoProReallyBrickedNow......
December 27, 2019 02:53PM
Edited the original.

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