Welcome! Log In Create A New Profile

Advanced

Pogoplug Mobile Debian Install

Posted by cdlenfert 
Re: Pogoplug Mobile Debian Install
September 08, 2018 08:58AM
So I have to mount my current USB rootfs on another box in order to create the tarball right? I can't do it on the box that's actively running the USB rootfs?

Or can I if I create a basic rootfs on the SD card, remove the USB, reboot (running off SD rootfs temporarily), then remount the USB rootfs and create the tarball, reboot again with USB rootfs, remount SD rootfs, and restore the backup to the SD?

Just curious, because I'll probably use another linux box to do this to save a step of creating a temporary basic rootfs on the SD.
Re: Pogoplug Mobile Debian Install
September 08, 2018 03:00PM
cdlenfert,

> So I have to mount my current USB rootfs on
> another box in order to create the tarball right?
> I can't do it on the box that's actively running
> the USB rootfs?

Yes. You don't want to run it on the running rootfs.

>
> Or can I if I create a basic rootfs on the SD
> card, remove the USB, reboot (running off SD
> rootfs temporarily), then remount the USB rootfs
> and create the tarball, reboot again with USB
> rootfs, remount SD rootfs, and restore the backup
> to the SD?

Yes. That would work.

>
> Just curious, because I'll probably use another
> linux box to do this to save a step of creating a
> temporary basic rootfs on the SD.

The idea is to back up your current good rootfs to a tarball as your own reference rootfs so it can be used to clone a new one when you need it. And serve as a rescue rootfs whenever your current running one going bad. I have many plugs running in the farm, and the one of them (off line, used for testing) has my latest and greatest installation. This is the one I back up very regularly to a tarball.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
September 08, 2018 11:35PM
Got it done! Nice to have the USB port free for my sound card as I'm using this as an Airplay receiver. Nice and tidy!!

Thank you
Re: Pogoplug Mobile Debian Install
September 17, 2018 06:13PM
Will the same chainloading approach (post 1 with updated boot command in this post) I did on the pogoplug mobile work for the pogoplug E-02 model? I'm ready to make the leap on that device over to Debian, but still want the stock OS as a fallback recovery system.

Thanks for any confirmation.
Re: Pogoplug Mobile Debian Install
September 17, 2018 06:50PM
cdlenfert Wrote:
-------------------------------------------------------
> Will the same chainloading approach
> (post
> 1
with updated boot command in
> this
> post
) I did on the pogoplug mobile work for
> the pogoplug E-02 model? I'm ready to make the
> leap on that device over to Debian, but still want
> the stock OS as a fallback recovery system.
>
> Thanks for any confirmation.

No, it would not work. The Pogo E02 stock rootfs is JFFS2, not UBIFS.

Let me find the set of envs from Jeff's old u-boot. Or if you found it please post here.

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



Edited 1 time(s). Last edit at 09/17/2018 06:51PM by bodhi.
Re: Pogoplug Mobile Debian Install
September 17, 2018 06:58PM
Here it is.

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

Try in serial console.

setenv pogo_bootcmd 'if fsload uboot-original-mtd0.kwb; then go 0x800200; fi'
run pogo_bootcmd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
September 19, 2018 09:50PM
Thanks for finding that. I'm not sure what to do with it however. My EO2 is running stock OS, so shouldn't these stock envs already be set? I don't have serial console hooked up (though I could if I had to, but would rather not disasemble if I don't need to). I'm not sure what next steps are given my current situation. Do I make some kind of image? Do a standard Debian install with new uboot then add the pogo_bootcmd env you gave above? I see that gets called in the bootcmd and rescue_bootcmd in the envs above. Should I use these envs vs what gets installed during the U-boot install/update thread?
Re: Pogoplug Mobile Debian Install
September 20, 2018 01:03AM
cdlenfert,

> Thanks for finding that. I'm not sure what to do
> with it however. My EO2 is running stock OS, so
> shouldn't these stock envs already be set?

No, these envs are from Jeff's old u-boot setup.

> I don't
> have serial console hooked up (though I could if I
> had to, but would rather not disasemble if I don't
> need to).
> I'm not sure what next steps are given
> my current situation.

When you try to set up the Pogo E02 by experimentally changing any envs, it is very risky. I would strongly discourage doing any of this without serial console. The Pogo E02 can not be rescued by kwboot.

So, the bottom line is for Pogo E02, don't set up to boot to stock without a well-tested procedure (from someone) that you can run in Linux shell.

Once you've connected serial console, you can experiment without worry about bricking.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
January 15, 2021 09:47PM
It's been a solid year or two since I've dusted off the Pogoplug V4 and when I tried to SSH into it, I was unable to do so. It would respond to pings at the reserved IP address I've got assigned, but no SSH. I thought perhaps the SD card I was using for the rootfs drive was going bad since I've seen this behavior in the past on failing drives.

I used the most recent Kirkwood Rootfs from August 5th 2019 - https://www.dropbox.com/s/pa2cbg93qgcnp8w/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 to create a new Rootfs drive. I did so with another SD card as well as a USB flash drive. I did this from a Pogoplug E02 (also Kirkwood). After formatting the drive as Ext3 and extracting the tarball to the root, I was unable to unmount the drive form the E02. I decided I'd simply run a systemctl poweroff command to shut it down. I accidentally powered the E02 back on before I had physically removed the new rootfs flash drive. I'm sort of glad that was the case because I was able to see that the drive worked and the new rootfs was used by the E02 just fine.

So I took the drive over to my Pogoplug V4 and tried to boot up. The V4 only went into recovery mode (stock-ish OS) and never booted off the USB. I tried the same thing with the SD card and no luck there either. It boots into the recovery OS every time.

I'm including anything I think might be relevant for someone more knowledgable than myself. Thanks for any ideas to get this little box running again.

[root@PogoplugMobile /etc]# ./fw_printenv 
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3960
machid=f78
usb_rootfstype=ext3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
ethaddr=00:25:31:03:49:49

[root@PogoplugMobile /root]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"

[root@PogoplugMobile /root]# cat /etc/fw_env.config 
/dev/mtd0 0xc0000 0x20000 0x20000

[root@PogoplugMobile /root]# dmesg | grep -i 'bad'
<6>[    0.960000] Scanning device for bad blocks
<4>[    0.970000] Bad eraseblock 32 at 0x000000400000
<5>[    1.340000] UBI: number of bad PEBs:         0
<5>[    1.370000] UBI: number of PEBs reserved for bad PEB handling: 8

* this is from the pogo os rescue system, so likely why it's so old. I believe newer kernel is loaded with the rootfs.
[root@PogoplugMobile /root]# cat /proc/version
Linux version 2.6.31.8 (afenn@kt) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #4 Tue Aug 23 13:00:50 PDT 2011

[root@PogoplugMobile /root]# dmesg
<5>[    0.000000] Linux version 2.6.31.8 (afenn@kt) (gcc version 4.3.2 (sdk3.3-ct-ng-1.4.1) ) #4 Tue Aug 23 13:00:50 PDT 2011
<4>[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
<4>[    0.000000] CPU: VIVT data cache, VIVT instruction cache
<4>[    0.000000] Machine: Feroceon-KW
<4>[    0.000000] Using UBoot passing parameters structure
<4>[    0.000000] Memory policy: ECC disabled, Data cache writeback
<7>[    0.000000] On node 0 totalpages: 32768
<7>[    0.000000] free_area_init_node: node 0, pgdat c0413670, node_mem_map c042d000
<7>[    0.000000]   Normal zone: 256 pages used for memmap
<7>[    0.000000]   Normal zone: 0 pages reserved
<7>[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
<4>[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 32512
<5>[    0.000000] Kernel command line: console=ttyS0,115200 root=ubi0:rootfs ubi.mtd=4,2048 rootfstype=ubifs
<4>[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
<6>[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>[    0.000000] Memory: 128MB = 128MB total
<5>[    0.000000] Memory: 118356KB available (3852K code, 261K data, 124K init, 0K highmem)
<6>[    0.000000] Hierarchical RCU implementation.
<6>[    0.000000] NR_IRQS:128
<4>[    0.000000] Console: colour dummy device 80x30
<6>[    0.000000] Calibrating delay loop... 799.53 BogoMIPS (lpj=3997696)
<4>[    0.230000] Mount-cache hash table entries: 512
<6>[    0.230000] CPU: Testing write buffer coherency: ok
<6>[    0.230000] NET: Registered protocol family 16
<6>[    0.230000] Feroceon L2: Enabling L2
<6>[    0.230000] Feroceon L2: Cache support initialised.
<4>[    0.230000] 
<4>[    0.230000] CPU Interface
<4>[    0.230000] -------------
<4>[    0.230000] SDRAM_CS0 ....base 00000000, size 128MB 
<4>[    0.230000] SDRAM_CS1 ....disable
<4>[    0.230000] SDRAM_CS2 ....disable
<4>[    0.230000] SDRAM_CS3 ....disable
<4>[    0.230000] PEX0_MEM ....base e0000000, size 128MB 
<4>[    0.230000] PEX0_IO ....base f2000000, size   1MB 
<4>[    0.230000] PEX1_MEM ....no such
<4>[    0.230000] PEX1_IO ....no such
<4>[    0.230000] INTER_REGS ....base f1000000, size   1MB 
<4>[    0.230000] NFLASH_CS ....base fa000000, size   2MB 
<4>[    0.230000] SPI_CS ....base f4000000, size  16MB 
<4>[    0.230000] BOOT_ROM_CS ....no such
<4>[    0.230000] DEV_BOOTCS ....no such
<4>[    0.230000] CRYPT_ENG ....base f0000000, size   2MB 
<4>[    0.230000] 
<4>[    0.230000]   Marvell Development Board (LSP Version KW_LSP_5.1.3_patch18)-- SHEEVA PLUG  Soc: 88F6192 A1 LE
<4>[    0.230000] 
<4>[    0.230000]  Detected Tclk 166666667 and SysClk 200000000 
<4>[    0.230000] Marvell USB EHCI Host controller #0: c403e740
<4>[    0.730000] PEX0 interface detected no Link.
<6>[    0.740000] PCI: bus0: Fast back to back transfers enabled
<4>[    0.740000] mvPexLocalBusNumSet: ERR. Invalid PEX interface 1
<4>[    0.750000] bio: create slab <bio-0> at 0
<5>[    0.750000] SCSI subsystem initialized
<6>[    0.750000] usbcore: registered new interface driver usbfs
<6>[    0.750000] usbcore: registered new interface driver hub
<6>[    0.750000] usbcore: registered new device driver usb
<6>[    0.750000] NET: Registered protocol family 2
<6>[    0.750000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>[    0.750000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
<6>[    0.750000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
<6>[    0.750000] TCP: Hash tables configured (established 4096 bind 4096)
<6>[    0.750000] TCP reno registered
<6>[    0.750000] NET: Registered protocol family 1
<6>[    0.750000] cpufreq: Init kirkwood cpufreq driver
<7>[    0.750000] cpufreq: High frequency: 800000KHz - Low frequency: 200000KHz
<7>[    0.750000] cpufreq: Setting CPU Frequency to 800000 KHz
<7>[    0.750000] cpufreq: Setting PowerSaveState to off
<6>[    0.760000] XOR registered 4 channels
<6>[    0.760000] XOR 2nd invalidate WA enabled
<4>[    0.760000] cesadev_init(c000d7fc)
<4>[    0.760000] mvCesaInit: sessions=640, queue=64, pSram=f0000000
<6>[    0.770000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
<6>[    0.770000] msgmni has been set to 231
<6>[    0.770000] alg: No test for cipher_null (cipher_null-generic)
<6>[    0.770000] alg: No test for ecb(cipher_null) (ecb-cipher_null)
<6>[    0.770000] alg: No test for digest_null (digest_null-generic)
<6>[    0.770000] alg: No test for compress_null (compress_null-generic)
<6>[    0.780000] alg: No test for stdrng (krng)
<6>[    0.780000] alg: No test for hmac(digest_null) (hmac(digest_null-generic))
<6>[    0.790000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
<6>[    0.790000] io scheduler noop registered
<6>[    0.790000] io scheduler anticipatory registered (default)
<4>[    0.790000] Initializing ths8200_init
<4>[    0.790000] Initializing dove_adi9889_init
<6>[    0.810000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
<6>[    0.810000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
<6>[    0.810000] console [ttyS0] enabled
<4>[    0.820000] 
<4>[    0.820000] Warning Sata is Powered Off
<4>[    0.820000] Loading Marvell Ethernet Driver:
<4>[    0.830000]   o Cached descriptors in DRAM
<4>[    0.830000]   o DRAM SW cache-coherency
<4>[    0.840000]   o 1 Giga ports supported
<4>[    0.840000]   o Single RX Queue support - ETH_DEF_RXQ=0
<4>[    0.840000]   o Single TX Queue support - ETH_DEF_TXQ=0
<4>[    0.850000]   o TCP segmentation offload (TSO) supported
<4>[    0.860000]   o Large Receive offload (LRO) supported
<4>[    0.860000]   o Receive checksum offload supported
<4>[    0.860000]   o Transmit checksum offload supported
<4>[    0.870000]   o Network Fast Processing (Routing) supported - (Disabled)
<4>[    0.880000]   o Driver ERROR statistics enabled
<4>[    0.880000]   o Proc tool API enabled
<4>[    0.880000]   o SKB Reuse supported - (Disabled)
<4>[    0.890000]   o SKB Recycle supported - (Disabled)
<4>[    0.890000]   o Rx descripors: q0=128
<4>[    0.900000]   o Tx descripors: q0=532
<4>[    0.900000]   o Loading network interface(s):
<4>[    0.910000]      o register under mv88fx_eth platform
<4>[    0.910000]      o eth0, ifindex = 2, GbE port = 0
<4>[    0.920000] 
<4>[    0.920000] mvFpRuleDb (c4327000): 1024 entries, 4096 bytes
<4>[    0.920000] Counter=0, opIdx=6, overhead=16
<4>[    0.930000] Counter=1, opIdx=2, overhead=0
<4>[    0.930000] Counter=2, opIdx=1, overhead=18
<4>[    0.940000] Counter=3, opIdx=2, overhead=0
<6>[    0.940000] tun: Universal TUN/TAP device driver, 1.6
<6>[    0.950000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
<6>[    0.950000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
<6>[    0.960000] Scanning device for bad blocks
<4>[    0.970000] Bad eraseblock 32 at 0x000000400000
<4>[    1.020000] Using static partition definition
<5>[    1.020000] Creating 5 MTD partitions on "nand_mtd":
<5>[    1.030000] 0x000000000000-0x000000200000 : "u-boot"
<5>[    1.030000] 0x000000200000-0x000000500000 : "uImage"
<5>[    1.040000] 0x000000500000-0x000000800000 : "uImage2"
<5>[    1.040000] 0x000000800000-0x000001000000 : "failsafe"
<5>[    1.050000] 0x000001000000-0x000008000000 : "root"
<5>[    1.060000] UBI: attaching mtd4 to ubi0
<5>[    1.060000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
<5>[    1.070000] UBI: logical eraseblock size:    126976 bytes
<5>[    1.070000] UBI: smallest flash I/O unit:    2048
<5>[    1.080000] UBI: sub-page size:              512
<5>[    1.080000] UBI: VID header offset:          2048 (aligned 2048)
<5>[    1.090000] UBI: data offset:                4096
<5>[    1.320000] UBI: attached mtd4 to ubi0
<5>[    1.320000] UBI: MTD device name:            "root"
<5>[    1.330000] UBI: MTD device size:            112 MiB
<5>[    1.330000] UBI: number of good PEBs:        896
<5>[    1.340000] UBI: number of bad PEBs:         0
<5>[    1.340000] UBI: max. allowed volumes:       128
<5>[    1.350000] UBI: wear-leveling threshold:    4096
<5>[    1.350000] UBI: number of internal volumes: 1
<5>[    1.360000] UBI: number of user volumes:     1
<5>[    1.360000] UBI: available PEBs:             0
<5>[    1.370000] UBI: total number of reserved PEBs: 896
<5>[    1.370000] UBI: number of PEBs reserved for bad PEB handling: 8
<5>[    1.380000] UBI: max/mean erase counter: 38/5
<5>[    1.380000] UBI: image sequence number: 0
<6>[    1.380000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>[    1.390000] ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
<6>[    1.400000] ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
<5>[    1.410000] UBI: background thread "ubi_bgt0d" started, PID 445
<6>[    1.440000] ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
<6>[    1.460000] ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00
<6>[    1.460000] usb usb1: configuration #1 chosen from 1 choice
<6>[    1.470000] hub 1-0:1.0: USB hub found
<6>[    1.470000] hub 1-0:1.0: 1 port detected
<6>[    1.480000] Initializing USB Mass Storage driver...
<6>[    1.480000] usbcore: registered new interface driver usb-storage
<6>[    1.490000] USB Mass Storage support registered.
<6>[    1.490000] usbcore: registered new interface driver ums-datafab
<6>[    1.500000] usbcore: registered new interface driver ums-freecom
<6>[    1.500000] usbcore: registered new interface driver ums-jumpshot
<6>[    1.510000] usbcore: registered new interface driver ums-sddr09
<6>[    1.520000] usbcore: registered new interface driver ums-sddr55
<6>[    1.520000] usbcore: registered new interface driver ums-usbat
<6>[    1.530000] mice: PS/2 mouse device common for all mice
<6>[    1.530000] i2c /dev entries driver
<7>[    1.540000] cpufreq: Setting CPU Frequency to 800000 KHz
<7>[    1.540000] cpufreq: Setting PowerSaveState to off
<6>[    1.550000] sdhci: Secure Digital Host Controller Interface driver
<6>[    1.550000] sdhci: Copyright(c) Pierre Ossman
<5>[    1.560000] mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
<6>[    1.570000] usbcore: registered new interface driver usbhid
<6>[    1.570000] usbhid: v2.6:USB HID core driver
<6>[    1.580000] TCP cubic registered
<6>[    1.580000] NET: Registered protocol family 17
<6>[    1.590000] RPC: Registered udp transport module.
<6>[    1.590000] RPC: Registered tcp transport module.
<4>[    1.600000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
<5>[    1.670000] UBIFS: recovery needed
<5>[    1.730000] UBIFS: recovery completed
<5>[    1.740000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
<5>[    1.740000] UBIFS: file system size:   110850048 bytes (108252 KiB, 105 MiB, 873 LEBs)
<5>[    1.750000] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
<5>[    1.760000] UBIFS: media format:       w4/r0 (latest is w4/r0)
<5>[    1.770000] UBIFS: default compressor: lzo
<5>[    1.770000] UBIFS: reserved for root:  0 bytes (0 KiB)
<4>[    1.780000] VFS: Mounted root (ubifs filesystem) on device 0:11.
<6>[    1.780000] Freeing init memory: 124K
<5>[    4.170000] eth0: link down
<5>[    4.170000] eth0: started
<5>[    5.860000] eth0: link up, full duplex, speed 1 Gbps
<4>[    8.010000] ufsd: module license 'Commercial product' taints kernel.
<4>[    8.020000] Disabling lock debugging due to kernel taint
<5>[    8.050000] ufsd: driver 8.5 (NTFS4LINUX_U85_017_S[2011-08-17-16:51:48]) LBD=ON with delayalloc with ioctl loaded at bf000000
<5>[    8.050000] NTFS support included
<5>[    8.050000] Hfs+/HfsX support included
<5>[    8.050000] For 'CloudEngines_PogoPlug_2011-08-03'
<4>[    8.390000] rtusb init rt2870 --->
<6>[    8.400000] usbcore: registered new interface driver rt2870
<4>[    8.420000] Cloud Engines XCE Init [Version: 3.1.99.12]
<6>[    8.430000] XCE: CPU MEMORY MAP:
<6>[    8.430000] XCE:   -- 0x00001000 - 0xbeffffff (3055 MB)  User Space Mappings
<6>[    8.440000] XCE:   -- 0xbf000000 - 0xbfffffff (  16 MB)  Kernel module space
<6>[    8.440000] XCE:   -- 0xc0000000 - 0xc7ffffff ( 128 MB)  Kernel direct-mapped ram
<6>[    8.450000] XCE:   -- 0xc8800000 - 0xe7ffffff ( 504 MB)  Kernel vmalloc space
<6>[    8.460000] XCE:   -- 0xe8000000 - 0xfeffffff ( 367 MB)  Kernel platform space
<6>[    8.470000] XCE: CPU FEATURES:
<6>[    8.470000] XCE:   -- I Cache:         enabled
<6>[    8.470000] XCE:   -- D Cache:         enabled
<6>[    8.480000] XCE:   -- Branch Predict:  enabled
<6>[    8.480000] XCE:   -- MMU:             enabled
<6>[    8.490000] XCE:   -- Alignment Abort: enabled
<6>[    8.500000] XCE: BLPARAMS:   -- Loading properties [c4a7befc].
<6>[    8.510000] XCE: BLPARAMS:   -- MTD @ [c4323000].
<6>[    8.510000] XCE: BLPARAMS: Locating parameter block...
<6>[    8.510000] XCE: BLPARAMS: reading 2048 bytes @ a0000
<6>[    8.520000] XCE: Loaded Property Size: 2048
<6>[    8.530000] XCE:    - 'cesvcid' -> 'QHDM8SUYPAQDRDRD9FDABNLHG2'
<6>[    8.530000] XCE:    - 'ceboardver' -> 'PPV4A1'
<6>[    8.540000] XCE:   -- ICache Prefetch: enabled
<6>[    8.540000] XCE:   -- DCache Prefetch: enabled
<6>[    8.550000] XCE:   -- L2 Cache:        enabled
<6>[    8.550000] XCE:   -- L2 Prefetch:     disabled
<6>[    8.550000] XCE:   -- L2 Writethrough: disabled
<6>[    8.560000] XCE:   -- Write Allocate:  disabled
<6>[    8.560000] XCE:   -- Streaming:       disabled
<6>[    8.570000] XCE: Current GPIO State:
<6>[    8.570000] XCE:  GPIO L OUT:    0x21400000
<6>[    8.580000] XCE:  GPIO L OE:     0x10000000
<6>[    8.580000] XCE:  GPIO L BLINK:  0x00000000
<6>[    8.580000] XCE:  GPIO L POL:    0x00000000
<6>[    8.590000] XCE:  GPIO L IN:     0x11400000
<6>[    8.590000] XCE:  GPIO H OUT:    0xfffc7fff
<6>[    8.600000] XCE:  GPIO H OE:     0x00000000
<6>[    8.600000] XCE:  GPIO H BLINK:  0x00004000
<6>[    8.610000] XCE:  GPIO H POL:    0x00000000
<6>[    8.610000] XCE:  GPIO H IN:     0x0000000f
<6>[    8.730000] XCE: BLPARAMS:   -- Loading properties [c49b9ecc].
<6>[    8.730000] XCE: BLPARAMS:   -- MTD @ [c4323000].
<6>[    8.740000] XCE: BLPARAMS: Locating parameter block...
<6>[    8.740000] XCE: BLPARAMS: reading 2048 bytes @ a0000
<6>[    8.750000] XCE: BLPARAMS: reading 2048 bytes @ a0800
<6>[    8.760000] XCE: BLPARAMS: reading 2048 bytes @ a1000
<6>[    8.760000] XCE: BLPARAMS: reading 2048 bytes @ a1800
<6>[   14.030000] XCE: XCE: LED -> DISCONNECTED
Re: Pogoplug Mobile Debian Install
January 15, 2021 10:17PM
cdlenfert,

Sounds like you don't have serial console, and you did not set up netconsole during new u-boot installation.

So it is not easy to see what's going on during boot.

Try: inside stock Pogo OS, set it to boot sysvinit

fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts'

And reboot.

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



Edited 1 time(s). Last edit at 01/15/2021 10:17PM by bodhi.
Re: Pogoplug Mobile Debian Install
January 16, 2021 12:49PM
Thanks @bodhi. I made the setting change to "set_bootargs" and confirmed it took. Booting from the SD card still failed, however booting from USB is now working. I formatted both the rootfs USB and SD the exact same way. Maybe the card isn't capable of running as the rootfs. I did notice while I was downloading the rootfs tarbal to the USB that it was much slower (I think probably hindered by the write speeds) on the USB vs. the SD card (really microSD in an adapter). So it seems like performance with this particular SD card should potentially be better than the USB. Hoever the USB is Lexar brand and the SD is a cheap 32gb card from China (but it's worked well enough with my Raspberry Pi's in the past).

Now that I've got USB booting into Debian, is there anything else I can try that I couldn't before to get more info on why the SD card won't boot?

I could still install Netconsole (reflash u-boot) I suppose if that would help. You're correct I didn't hardwire serial console into this Pogo. I actually rooted it initially just holding serial posts to the pads of the motherboard by hand and entering commands by computer with my other hand :)
Re: Pogoplug Mobile Debian Install
January 16, 2021 04:05PM
cdlenfert,

> I
> actually rooted it initially just holding serial
> posts to the pads of the motherboard by hand and
> entering commands by computer with my other hand
> :)

:) that will work. I did some of my Pogo Mobile in a similar way. But I used the shirt pins (in the old days they use these pins in a shirt box). The pins are small and sharp enough that it will hold on to the solder buttons if you push them hard. And I use the test clips to hold the pins (the tests clips wires are connected to the serial module converter).

> Now that I've got USB booting into Debian, is
> there anything else I can try that I couldn't
> before to get more info on why the SD card won't
> boot?

> I could still install Netconsole (reflash u-boot)
> I suppose if that would help.

Yes, but you don't need to reflash u-boot. Just set it up while in Debian

Quote
https://forum.doozan.com/read.php?3,12381

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 8 then activate netconsole with the following envs:

Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
January 16, 2021 07:16PM
I applied the following commands and confirmed they were set as expected via fw_printenv
fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.2'
fw_setenv serverip '192.168.0.15'
ipaddr is my pogo v4 and serverip is my macbook.

However I'm now unable to SSH or ping the pogo and can't ssh into it. After setting the new envs I did a reboot via terminal. When I checked the pogo's light it was ended on Red color. I hard rebooted and the Pogo now ends on green color but still no ability to ping/ssh.

Any idea why this didn't work and is seemingly breaking boot altogether? Can I undo the new envs via uEnv.txt? And if so, can you give me some idea how to unset an env? Thanks again!
Re: Pogoplug Mobile Debian Install
January 16, 2021 10:01PM
cdlenfert Wrote:
-------------------------------------------------------
> I applied the following commands and confirmed
> they were set as expected via fw_printenv
>
> fw_setenv preboot_nc 'setenv nc_ready 0; for
> pingstat in 1 2 3 4 5; do; sleep 1; if run
> if_netconsole; then setenv nc_ready 1; fi; done;
> if test $nc_ready -eq 1; then run
> start_netconsole; fi'
> fw_setenv preboot 'run preboot_nc'
> fw_setenv ipaddr    '192.168.0.2'
> fw_setenv serverip '192.168.0.15'
>
> ipaddr is my pogo v4 and serverip is my macbook.
>

Do you have Linux box where you can run netconsole server?

nc -lup 6666 192.168.0.2 6666

serverip is the IP address of the netconsole server box. It should be a Linux box.

> When I checked the pogo's light it was ended on Red color. I hard rebooted and the Pogo now ends on green color but still no ability to ping/ssh.

Red LED means the kernel has not been loaded by u-boot. Solid green LED means the kernel has started, but probably could not mount rootfs or some other reason after the rootfs was mounted.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
January 16, 2021 11:44PM
bodhi Wrote:
-------------------------------------------------------
> Do you have Linux box where you can run netconsole
> server?
>
>
> nc -lup 6666 192.168.0.2 6666
>
>
> serverip is the IP address of the netconsole
> server box. It should be a Linux box.

Admittedly this is my first time doing anything with netconsole. My assumption was that the USB's rootfs kernel should support this and only the envs needed to be set to enabled the logging. Then any device that can run 'nc' and that I deem as the server can monitor the boot logs remotely.

I have a couple other Pogos running Debian Stretch. When I run "which nc" nothing came up. When I tried to run any nc command I get "nc: command not found". However on my Mac "which nc" returns "/usr/bin/nc". I did find that I could run "apt install netcat" to get the nc command on another pogo. After installing and running "nc -lup 6666 192.168.0.2 6666" I get the following:
invalid connection to [192.168.0.8] from (UNKNOWN) [192.168.0.4] 49154

When running without the "u" flag (explainshell.com can't tell me what the u flag means), my terminal on the debian pogo e02 hangs like it's waiting to monitor the boot process, but when I reboot the pogo v4, nothing comes through to the e02 terminal. The e02 is on IP 192.168.0.8. Does it have to have .0.15 (what I assigned as the serverip) for this to work? I can change it if need be.

Looking back at the original envs that were set, there seems to have already been several references to netconsole.
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;
if_netconsole=ping $serverip
serverip=192.168.0.220
ipaddr=192.168.0.231
# my actual IP ended in .0.2
These are slightly different than the envs I recently set to try to get netconsole to work.
fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.2'
fw_setenv serverip '192.168.0.15'


> > When I checked the pogo's light it had ended on
> Red color. I hard rebooted and the Pogo now ends
> on green color but still no ability to ping/ssh.
>
> Red LED means the kernel has not been loaded by
> u-boot. Solid green LED means the kernel has
> started, but probably could not mount rootfs or
> some other reason after the rootfs was mounted.

I can always get solid green with the rootfs drive attached. However I still can't ping or ssh and looking at my router devices table it doesn't appear anything is being assigned the 192.168.0.2 IP address.

Here's everything I'm wondering:
  1. Can I use the nc command from my Mac?
  2. If I should use the Pogo E02 to monitor the Pogo V4 boot, does it have to have the 192.168.0.15 IP assigned to "serverip"
  3. Are my envs too old (from Jeff's post), and should I have used the format that was already in the V4s envs?
  4. Assuming Netconsole is stopping the rootfs boot, but why might it?
  5. Would next steps be to override the netconsole envs with uEnv.txt?

Greatly appreciating the feedback. I'm excited to see netconsole in action and know I should have had it set up and better understood from the get go...
Re: Pogoplug Mobile Debian Install
January 17, 2021 01:36PM
Update: I can now ping 192.168.0.2 but still no SSH. The IP assignment doesn't show up in my router's device table. The status light is a combo of yellow and red.
Re: Pogoplug Mobile Debian Install
January 17, 2021 04:20PM
cdlenfert,

> My assumption was that the USB's
> rootfs kernel should support this and only the
> envs needed to be set to enabled the logging. Then
> any device that can run 'nc' and that I deem as
> the server can monitor the boot logs remotely.

Yes for all above.

> I did find that I could run
> "apt install netcat" to get the nc command on
> another pogo.

Yes.

> The e02 is on IP 192.168.0.8.
> Does it have to have .0.15 (what I assigned as the
> serverip) for this to work? I can change it if
> need be.

Right. You current set up is:
fw_setenv ipaddr    '192.168.0.2'
fw_setenv serverip '192.168.0.15'

So the Pogo IP address is 192.168.0.2. And then box where you run nc must have IP address 192.168.0.15. In this case the Pogo E02 IP address must be 192.168.0.15.

Note that this syntax allow you to interact (i.e. interrupt u-boot at count down) with the Pogo Mobile. There is also a simpler nc syntax to listen to all netconsole where you only see the log, but cannot interact with it.


> These are slightly different than the envs I
> recently set to try to get netconsole to work.

Use the netconsole set up I have in the u-boot release thread.

> [*] Can I use the nc command from my Mac?

Yes, but the command options are different. Because on Mac, it is netcat-bsd, not net-cat-traditional like lin Debian.

> [*] If I should use the Pogo E02 to monitor the
> Pogo V4 boot, does it have to have the
> 192.168.0.15 IP assigned to "serverip"

Yes.

> [*] Are my envs too old (from Jeff's post), and
> should I have used the format that was already in
> the V4s envs?

Yes. Use the latest I have in the u-boot release thread.

> [*] Assuming Netconsole is stopping the rootfs
> boot, but why might it?

It could if the line is noisy. But in that case, the Pogo Mobile LED will be flashing Green, it will never get to solid Orange or Green.


> [*] Would next steps be to override the netconsole
> envs with uEnv.txt?

No, you can not do this without further changes in envs. I intentionally did not show how, because it is risky for beginners who install u-boot the first time (a simple typo could lock users out of the box, until serial console is connected to fix it). For people who has serial console (i.e. more advance users), it is quite easy to allow uEnv.txt to work in changing netconsole envs on the fly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
January 17, 2021 05:07PM
Thanks for confirming all of this.

I thought I was already able to use uEnv.txt to load systemv as the init system. I might not have been doing it on this pogo, but I've done it on others.

Anyway I switched my Pogo to have the 192.168.0.15 IP address.
Ran the nc command again and get an invalid connection error.
root@pogoplug:~# nc -lup 6666 192.168.0.2 6666
invalid connection to [192.168.0.15] from (UNKNOWN) [192.168.0.4] 49154
It's like something else is trying to connect to the E02 at (.0.15) from the .0.4 IP address.. I'm not sure what this device even is.

This only happens when I use the -u flag. If I run the same command without the -u flag and boot the V4, I get 70+ blank return lines (so maybe there is some sort of connection via netconsole).

I had the envs set from the uboot thread when I originally flashed this Pogo a few years ago, but changed them based on your quote from:
Quote
Quote
Yes, but you don't need to reflash u-boot. Just set it up while in Debian

Quote
[url

https://forum.doozan.com/read.php?3,12381[/url]

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 8 then activate netconsole with the following envs:

Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'

Is there another way I can try to make the netconsole connection without the -u flag that would work? Any ideas about the invalid connection error?
If I can't get netconsole to connect and I can reset my envs in any way, will I be stuck needing to connect via serial to further fix this issue and get things booting properly again?
edit: and as always, thank you for your responses.

edit 2: I may be going insane. The V4 just showed up in my devices table with an IP of 192.168.0.30. Not sure how that was assigned, but I can shell into it now and it's running on the backup system of the old Pogo OS. Maybe now I can clean up those netconsole envs. I'll be sure to post what I'm entering prior to committing the changes and rebooting.



Edited 2 time(s). Last edit at 01/17/2021 05:31PM by cdlenfert.
Re: Pogoplug Mobile Debian Install
January 17, 2021 06:06PM
> I thought I was already able to use uEnv.txt to
> load systemv as the init system. I might not have
> been doing it on this pogo, but I've done it on
> others.

Correct. Only bootcmd and netconsole setup are not possible to be changed using uEnv.txt. Out of the box, after you installed u-boot, all other envs are OK to be changed in uEnv.txt.

>
> Anyway I switched my Pogo to have the 192.168.0.15
> IP address.
> Ran the nc command again and get an invalid
> connection error.
>
> root@pogoplug:~# nc -lup 6666 192.168.0.2 6666
> invalid connection to [192.168.0.15] from
> (UNKNOWN) [192.168.0.4] 49154
>

Your Pogo Mobile is 192.168.0.2, and your Pogo E02 as the netconsole server is 192.168.0.15.

There is a box with IP address 192.168.0.4 that wants to connect with the Pogo E02 after you started the server with nc command. This happens because that box must have been another Kirkwood/OXNAS box is running in your network and has neconsole setup!

So usually I just recall the nc command and execute again a few times, until it catches the connection from 192.168.0.2.

> This only happens when I use the -u flag. If I run
> the same command without the -u flag and boot the
> V4, I get 70+ blank return lines (so maybe there
> is some sort of connection via netconsole).

As I said, the -lup flag is what I use everyday. And always on a Kirkwood box (which is my reference plug to test everything else).

> If I can't get netconsole to connect and I can
> reset my envs in any way, will I be stuck needing
> to connect via serial to further fix this issue
> and get things booting properly again?

Yes.

> edit 2: I may be going insane. The V4 just showed
> up in my devices table with an IP of 192.168.0.30.
> Not sure how that was assigned,

Most likely that was a dynamic IP assigned by the router.

I always use static IP address on all my plugs in the network. Because you need static IP to make netconsole work properly.

Only if I'm about to bring a box somewhere else, I would change it back to dynamic IP.

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



Edited 1 time(s). Last edit at 01/17/2021 06:10PM by bodhi.
Re: Pogoplug Mobile Debian Install
January 18, 2021 12:56PM
Quote
Your Pogo Mobile is 192.168.0.2, and your Pogo E02 as the netconsole server is 192.168.0.15.

There is a box with IP address 192.168.0.4 that wants to connect with the Pogo E02 after you started the server with nc command. This happens because that box must have been another Kirkwood/OXNAS box is running in your network and has neconsole setup!

So usually I just recall the nc command and execute again a few times, until it catches the connection from 192.168.0.2.


Thanks for confirming this other box wants to connect to the E02. It's not a Kirkwood/OXNAS box though. I know all of the IP addresses of those devices and this .0.4 device is some other random thing (maybe my smart thermostat, or a smart speaker, or something like that). Either way, good to know I can keep running that command as the V4 boots to try and allow it to make it's connection to the E02.

I found out the the -u flag tells nc to connect over UDP instead of TCP.

Since I was able to get shell access to the V4 recovery OS, I made the following changes:
./fw_setenv serverip '192.168.0.8'
#changed IP address back to what I want the E02 netconsole server to use

My DHCP reservervation on my modem was not present for the Pogo V4. That’s why it ended up with a .0.30 adddress. I set it back up to .0.2. This has always worked in the past to keep the V4 on the same IP.
I also changed the reservation back to .0.8 for the E02 to match the new serverip setting in the V4 envs.
Once I reboot the V4, everything should be on the correct IP again and ready for netconsole testing.

Questions
Why is the default env for preboot_nc that gets applied when flashing uBoot different than what is recommended in the netconsole setup in the same uBoot post?
old: preboot_nc=run if_netconsole start_netconsole	
new: preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi

and if the new setting is the correct one to be used, then I believe I had all settings correct, so why was booting mostly failing after I enabled netconsole? I suppose we may find out if I can get netconsole to work.


Finally, here are my current env settings.
It'd be great to get another set of eyes on them before I reboot and try netconsole again.
[root@PogoplugMobile /etc]# ./fw_printenv 
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3960
machid=f78
usb_rootfstype=ext3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo
ethaddr=00:25:31:03:49:49
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.0.2
serverip=192.168.0.8
Re: Pogoplug Mobile Debian Install
January 18, 2021 05:09PM
cdlenfert ,

> My DHCP reservervation on my modem was not present
> for the Pogo V4. That’s why it ended up with a
> .0.30 adddress. I set it back up to .0.2. This has
> always worked in the past to keep the V4 on the
> same IP.
> I also changed the reservation back to .0.8 for
> the E02 to match the new serverip setting in the
> V4 envs.
> Once I reboot the V4, everything should be on the
> correct IP again and ready for netconsole
> testing.

OK. That's a good way to control the reservation of IP, in effect it is just like a static IP assigned to certain box.


> Questions
> Why is the default env for preboot_nc that gets
> applied when flashing uBoot different than what is
> recommended in the netconsole setup in the same
> uBoot post?
>
> old: preboot_nc=run if_netconsole
> start_netconsole	
> new: preboot_nc=setenv nc_ready 0; for pingstat in
> 1 2 3 4 5; do; sleep 1; if run if_netconsole; then
> setenv nc_ready 1; fi; done; if test $nc_ready -eq
> 1; then run start_netconsole; fi
>
>
> and if the new setting is the correct one to be
> used, then I believe I had all settings correct,
> so why was booting mostly failing after I enabled
> netconsole? I suppose we may find out if I can get
> netconsole to work.

Yes, the new settings is good.

U-boot netconsole code is quite simple in that it relies on the envs to detect if the netconsole server is up. But 1 ping sometime gives a false positive if the netconsole server was up just a moment ago and was down now. This problem with false positive will cause a delay of about 2 minutes during booting.

So I scripted it to do 5 pings in the modified env. It will allow u-boot recognize that there is actually no netconsole server running.

But of course, if a box that has the same IP address as serverip, is running in somewhere the network, then all bets are off. The result will be unpredictable, since there is no nc running on that box. I suspect this is your problem when the boot was interrupted by some erroneous response from that box.

Quote

> start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
> if_netconsole=ping $serverip

> preboot_nc=setenv nc_ready 0; for pingstat in 1 2
> 3 4 5; do; sleep 1; if run if_netconsole; then
> setenv nc_ready 1; fi; done; if test $nc_ready -eq
> 1; then run start_netconsole; fi

> preboot=run preboot_nc

> ipaddr=192.168.0.2

> serverip=192.168.0.8

Looks good!

====

Note: the env preboot_nc could have been scripted a bit better. But as it is right now, it should work OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogoplug Mobile Debian Install
January 19, 2021 03:10PM
It worked (in more ways than 1).

Netconsole worked to monitor boot.

Boot worked for Debian from the USB flash.

Boot worked for Debian from the SD card.

Netconsole Log when using SD card rootfs drive

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

MMC rescan: current device # 0 initialized OK
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

no IDE devices available

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

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	61929472  	fe673342-01	83
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 19 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
4963680 bytes read in 134 ms (35.3 MiB/s)
loading uInitrd ...
9713936 bytes read in 234 ms (39.6 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
9962 bytes read in 47 ms (206.1 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000

I didn't modify the rootfs on either USB or SD, so not sure why the didn't boot before and it was falling back to the Pogo OS.

I got a segmentation fault on the SD card while running installing apt packages, so I'm guessing that's part of my problem.

Thanks again for all your help in setting up netconsole and troubleshooting.
Re: Pogoplug Mobile Debian Install
January 19, 2021 03:47PM
Quote

I got a segmentation fault on the SD card while running installing apt packages, so I'm guessing that's part of my problem.

Yes that segmentation fault is very likeky the problem. I would reformat the SD card when this happens.

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

Your Email:


Subject:


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