Welcome! Log In Create A New Profile

Advanced

POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9

Posted by chaos 
POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 20, 2019 09:43PM
I've been trying for some days to set up POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9 without success.

The steps I followed:
  1. Executing automatic shell script which installs uboot.2014.07-tld-1.pogo_v4.bodhi and uboot.2014.07-tld-1.environment.img.
  2. Extracting the corresponding rootfs to a 1GB Sandisk SD-card formated as ext3 with 128MB linux-swap partition at the end. The formating was done with the linux tool gparted.
  3. Test result: Success
  4. Tried to upgrade with linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 (18 Aug 2019) without success.
  5. Issue post #2 suggested that it was necessary to update to uboot.2017.07-tld-1.pogo_v4.bodhi.
  6. Flashed 2017.07 U-Boot Kirkwood on POGO-V4-A3-01. Result: success.
  7. Extracted Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017) onto the same 1GB Sandisk SD-card and also onto an old Data Traveller 2GB USB2.0-stick with only one ext3 partition.
  8. Extracted the environment variables as instructed from the archive uboot.2016.05-tld-1.environment.img (the default envs image to be flashed) and flashed them successfully.
  9. Rebooted with test result: Failed.
  10. Booting Debian 4.12.1 rootfs was not possible.
  11. The last step to update the kernel to linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 (18 Aug 2019) was not possible to perform.

Booting Debian 4.12.1 rootfs produces the following regardless of if there is only one SD-card, one USB-stick (top socket) or both SD-card and USB-stick:

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 
Initializing devices...
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
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** Bad device ide 0 **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** No partition table - mmc 0 **
Loading envs from mmc 1...
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
Loading envs from mmc 2...
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
Loading envs from mmc 3...
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
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
** No partition table - mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

I found another (older) thread suggesting to add these environment variables (which didn't change anything):
Pogov4> setenv usb_rootfstype 'ext3'
Pogov4> setenv mmc_bootcmd 'mmc rescan; run mmc_set_bootargs; run mmc_boot'
Pogov4> setenv mmc_boot 'mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
Pogov4> setenv mmc_root '/dev/mmcblk0p1'
Pogov4> setenv mmc_set_bootargs 'setenv bootargs console=$console root=$mmc_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'
Pogov4> saveenv

I am suspecting that possible causes for this could be:
  • that there is something wrong with the environment variables in uboot.2016.05-tld-1.environment.img (the default envs image to be flashed), or
  • uboot 2017.07 cannot find the partition table on neither device
  • the ext3 partition that worked with uboot.2014.07-tld-1.pogo_v4.bodhi no longer works.
  • I have missed to do some essential steps that could have been forgotten to be mentioned in the installation instruction, as you guys probably already are familiar with the procedure of setting up POGO-V4-A3-01, but newcomers are not aware of.

The funny thing is that an uboot 2014.07 works, but a uboot 2017.07 doesn't, even though all steps have been carefully done:
  1. Download uboot.2017.07-tld-1.pogo_v4.bodhi.tar
  2. Download uboot tools script:
      
    #!/bin/bash
    # (the pogoplug ships with busybox, so we have to use ash instead of bash.)
    # see https://github.com/pepaslabs/pogoplug_mobile_uboot_installer
    # file name: download_uboot_tools.sh
    # parse command line args:

    assume_yes=0
    if [ "${1:-}" == "-y" ]
    then
    assume_yes=1
    fi

    ### functions

    echo_step()
    {
    echo
    echo "* $@"
    }

    echo2()
    {
    echo "$@" >&2
    }

    prompt_to_proceed()
    {
    local message="$1"

    echo -n "${message} [Y/n]: "

    if [ "${assume_yes}" -eq 1 ]
    then
    echo "(Assuming yes...)"
    return 0
    fi

    read yn
    case $yn in
    y|Y|yes|Yes|YES|'') echo "Proceeding..." ;;
    *) echo2 "Exiting..." ; exit 1 ;;
    esac
    # thanks to http://stackoverflow.com/a/226724
    }

    # entering "strict" mode
    set -e
    set -u
    set -o pipefail

    # verbose
    #set -x

    ### cache / downloads section

    echo_run()
    {
    echo "+ $@"
    eval "$@"
    }

    md5_step()
    {
    local file="$1"
    local sum="$2"

    echo_step "Verifying ${file}"
    echo "${sum} ${file}" | md5sum -c -
    }

    wget_step()
    {
    local file="$1"
    local baseurl="$2"
    local sum="$3"

    if [ ! -e ${file} ]
    then
    echo_step "Downloading ${file}"
    echo_run wget "${baseurl}/${file}"
    fi

    if pwd | grep -q '/bin'
    then
    chmod +x "${file}"
    fi

    md5_step "${file}" "${sum}"
    }

    mkdir -p /tmp/bin /tmp/dev /tmp/cache /tmp/mnt
    export PATH=/tmp/bin:${PATH}

    # download flash utils
    cd /tmp/bin
    #baseurl="http://download.qnology.com/pogoplug/v4";
    # Note: download.qnology.com seems to be down. Falling back to mirrored files:
    baseurl="http://ssl.pepas.com/pogo/mirrored/download.qnology.com/pogoplug/v4";
    wget_step nanddump ${baseurl} 770bbbbe4292747aa8f2163bb1e677bb
    wget_step nandwrite ${baseurl} 47974246185ee52deae7cc6cfea5e8fc
    wget_step flash_erase ${baseurl} 8b5f9961376281e30a1bd519353484b0
    wget_step fw_printenv ${baseurl} 7d28314b0d2737094e57632a6fe43bbe
    wget_step fw_setenv ${baseurl} 7d28314b0d2737094e57632a6fe43bbe

    echo_step "Downloaded all files. Exiting."
  3. Pogo-V4-A3-01$ chmod +x /tmp/download_uboot_tools.sh
  4. Pogo-V4-A3-01$ ./tmp/download_uboot_tools.sh
  5. Pogo-V4-A3-01$ export PATH=/tmp/bin:${PATH}
  6. desktop$ echo e2c2b4927dcd8189f0c97dd81b72ad7e uboot.2017.07-tld-1.pogo_v4.bodhi.tar > uboot.2017.07-tld-1.pogo_v4.bodhi.tar.md5
  7. desktop$ echo 18f856d2106aabe6029331358fb06f053ea9257ad896e2d382f4f096f93c46e9 uboot.2017.07-tld-1.pogo_v4.bodhi.tar > uboot.2017.07-tld-1.pogo_v4.bodhi.tar.sha256
  8. desktop$ md5sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.md5
    uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK
  9. desktop$ sha256sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.sha256
    uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK
  10. desktop$ scp uboot.2017.07-tld-1.pogo_v4.bodhi.* root@<pogo_ip_address>:/tmp
  11. Pogo-V4-A3-01$ md5sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.md5
    uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK
  12. Pogo-V4-A3-01$ sha256sum -c uboot.2017.07-tld-1.pogo_v4.bodhi.tar.sha256
    uboot.2017.07-tld-1.pogo_v4.bodhi.tar: OK
  13. Pogo-V4-A3-01$ cat /etc/fw_env.config
    # MTD device name Device offset Env. size Flash sector size Number of sectors
    /dev/mtd0 0xc0000 0x20000 0x20000
  14. Pogo-V4-A3-01$ 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"
  15. Pogo-V4-A3-01$ fw_printenv ethaddr
    ethaddr=00:aa:bb:cc:dd:ee
  16. Pogo-V4-A3-01$ nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
  17. Pogo-V4-A3-01$ fw_printenv > current_envs.txt
  18. desktop$ scp root@<pogo_ip_address>:/tmp/mtd0 .
  19. desktop$ scp root@<pogo_ip_address>:/tmp/current_envs.txt .
  20. Pogo-V4-A3-01$ dmesg | grep -i 'bad'
    [ 2.084074] Scanning device for bad blocks
    [ 2.105538] Bad eraseblock 210 at 0x000001a40000
    (Comment: It's ok since it is outside block 1-8.)
  21. Pogo-V4-A3-01$ cd /tmp
  22. Pogo-V4-A3-01$ tar -xf uboot.2017.07-tld-1.pogo_v4.bodhi.tar
  23. Pogo-V4-A3-01$ flash_erase /dev/mtd0 0 4
    Erase Total 4 Units
    Performing Flash Erase of length 131072 at offset 0x60000 done
  24. Pogo-V4-A3-01$ nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_v4.mtd0.kwb
    Writing data to block 0 at offset 0x0
    Writing data to block 1 at offset 0x20000
    Writing data to block 2 at offset 0x40000
    Writing data to block 3 at offset 0x60000
  25. Download the default u-boot envs:
    uboot.2016.05-tld-1.environment.bodhi.tar
  26. desktop$ echo 3823eef10011b864859d31a76470e0e3 uboot.2016.05-tld-1.environment.bodhi.tar > uboot.2016.05-tld-1.environment.bodhi.tar.md5
  27. desktop$ echo c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c uboot.2016.05-tld-1.environment.bodhi.tar > uboot.2016.05-tld-1.environment.bodhi.tar.sha256
  28. desktop$ md5sum -c uboot.2016.05-tld-1.environment.bodhi.tar.md5
    uboot.2016.05-tld-1.environment.bodhi.tar: OK
  29. desktop$ sha256sum -c uboot.2016.05-tld-1.environment.bodhi.tar.sha256
    uboot.2016.05-tld-1.environment.bodhi.tar: OK
  30. desktop$ scp uboot.2016.05-tld-1.environment.bodhi.tar* root@<pogo_ip_address>:/tmp
  31. Pogo-V4-A3-01$ md5sum -c uboot.2016.05-tld-1.environment.bodhi.tar.md5
    uboot.2016.05-tld-1.environment.bodhi.tar: OK
  32. Pogo-V4-A3-01$ sha256sum -c uboot.2016.05-tld-1.environment.bodhi.tar.sha256
    uboot.2016.05-tld-1.environment.bodhi.tar: OK
  33. Pogo-V4-A3-01$ cd /tmp
  34. Pogo-V4-A3-01$ tar -xf uboot.2016.05-tld-1.environment.bodhi.tar
  35. Pogo-V4-A3-01$ fw_printenv > current_envs.txt
  36. Pogo-V4-A3-01$ flash_erase /dev/mtd0 0xc0000 1
    Erase Total 1 Units
    Performing Flash Erase of length 131072 at offset 0xc0000 done
  37. Pogo-V4-A3-01$ nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
    Writing data to block 6 at offset 0xc0000
  38. Pogo-V4-A3-01$ fw_setenv arcNumber 3960
  39. Pogo-V4-A3-01$ fw_setenv machid f78
  40. Pogo-V4-A3-01$ fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'
  41. Pogo-V4-A3-01$ fw_setenv ethaddr '00:aa:bb:cc:dd:ee' (Comment: Make sure you use your own address printed under the box!)

    uEnv.txt envs correction:
  42. Pogo-V4-A3-01$ fw_setenv uenv_init_devices 'echo Initializing 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'
  43. Pogo-V4-A3-01$ fw_setenv uenv_read 'echo Loading envs from $device_type $disk_number...; if load $device_type $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi'
  44. Pogo-V4-A3-01$ fw_setenv uenv_load 'run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;'
  45. Pogo-V4-A3-01$ fw_setenv uenv_read_disk

    And for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA. This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up).
  46. Pogo-V4-A3-01$ fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
  47. Pogo-V4-A3-01$ fw_setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'

    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).
  48. Pogo-V4-A3-01$ 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'
  49. Pogo-V4-A3-01$ fw_setenv preboot 'run preboot_nc'
  50. Pogo-V4-A3-01$ fw_setenv ipaddr '192.168.0.xxx'
  51. Pogo-V4-A3-01$ fw_setenv serverip '192.168.0.yyy'
  52. Pogo-V4-A3-01$ reboot
  53. Extract Debian 4.12.1 rootfs to the ext3-formated 1GB SD-card (made with gparted) and the ext3-formated USB2.0-stick (made with gparted) with
    tar -xvf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
  54. Pogov4> printenv
      
     arcNumber=3960 
    bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
    bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
    bootcmd_exec=run load_uimage; 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
    bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
    bootdelay=10
    bootdev=usb
    device=0:1
    device_type=mmc
    devices=usb ide mmc
    disk_number=3
    disks=0 1 2 3
    dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
    ethact=egiga0
    ethaddr=00:aa:bb:cc:dd:ee[/b] (Comment: Make sure you use your own address printed under the box!)
    if_netconsole=ping $serverip
    init_ide=ide reset
    init_mmc=mmc rescan
    init_usb=usb start
    ipaddr=192.168.10.xxx
    led_error=orange blinking
    led_exit=green off
    led_init=green blinking
    load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
    load_dtb_addr=0x1c00000
    load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
    load_initrd_addr=0x1100000
    load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
    load_uimage_addr=0x800000
    machid=f78
    mainlineLinux=yes
    mmc_boot=mw 0x800000 0 1; ext2load mmc 0:1 0x00800000 /boot/uImage; if ext2load mmc 0:1 0x01100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
    mmc_bootcmd=mmc rescan; run mmc_set_bootargs; run mmc_boot
    mmc_root=/dev/mmcblk0p1
    mmc_set_bootargs=setenv bootargs console=$console root=$mmc_root rootdelay=$usb_rootdelay
    rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
    mtdids=nand0=orion_nand
    mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
    nc_ready=1
    ncip=192.168.10.yyy
    partition=nand0,2
    preboot=run preboot_nc
    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
    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
    scan_ide=ide reset
    scan_mmc=mmc rescan
    scan_usb=usb start
    serverip=192.168.10.yyy
    set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
    start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
    stderr=nc
    stdin=nc
    stdout=nc
    uenv_addr=0x810000
    uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
    uenv_init_devices=echo Initializing 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 $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
    uenv_loaded=0
    uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
    usb_ready_retry=15
    usb_rootfstype=ext3

    Environment size: 3824/131068 bytes


It is quite difficult to understand what could be wrong, following the installation guide. What could the issue be?
Pogov4> mmc info
mmc info
Device: MVEBU_MMC
Manufacturer ID: 3
OEM: 5344
Name: SD01G 
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.10
High Capacity: No
Capacity: 968.8 MiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Pogov4> mmc list
mmc list
MVEBU_MMC: 0 (SD)
Pogov4> mmc dev
mmc dev
switch to partitions #0, OK
mmc0 is current device
Pogov4> mmc part
mmc part
## Unknown partition table type 0
Pogov4> usb stop
usb stop
stopping USB..
Pogov4> usb start
usb start
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
Pogov4> usb storage
usb storage
No storage devices, perhaps not 'usb start'ed..?
Pogov4> usb info
usb info
1: Hub,  USB Revision 2.0
 - u-boot EHCI Host Controller 
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms



Edited 1 time(s). Last edit at 08/20/2019 09:47PM by chaos.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 20, 2019 10:55PM
chaos,

It is apparent that neither the USB nor the SD card were recognized by u-boot as having a good partition:

> scanning bus 0 for devices... 1 USB Device(s)
> found
> scanning usb for storage devices... 0
> Storage Device(s) found

>
.....
> device mmc 0:1
> ** No partition table - mmc 0 **
> device mmc 1:1

=====

There is too much info to digest in your post. It is simpler for me to help troubleshooting if you do this.

Plug in whatever rootfs you want to boot (USB rootfs is prefered). Power up, and interrupt serial console, and

printenv
boot

And post the entire serial console log here.

And also post info about the rootfs. Was it formatted as Ext3? was the rootfs prepared while you're being root user (not sudo)? If you mount the rootfs on another Linux box, and
mount
What is the output?

After that, I'll look at the log and suggest what is the next step to take in troubleshooting.

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



Edited 1 time(s). Last edit at 08/20/2019 11:04PM by bodhi.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 21, 2019 07:33AM
Test: interrupt autobooting + printenv
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:  9 
 0 
Pogov4> printenv
printenv
arcNumber=3960
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; 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
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
device_type=mmc
devices=usb ide mmc
disk_number=3
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:aa:bb:cc:dd:ee (comment: same as on sticker under pogoplug)
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.10.9
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=f78
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
nc_ready=1
ncip=192.168.10.21
partition=nand0,2
preboot=run preboot_nc
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
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
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.10.21
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing 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 $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_loaded=0
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_ready_retry=15

Environment size: 3396/131068 bytes

Test result: booting with USB-stick Data Traveller 2GB
Pogov4> boot
boot
Initializing devices...
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
Card did not respond to voltage select!
mmc_init: -95, time 11
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** Bad device ide 0 **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
Card did not respond to voltage select!
mmc_init: -95, time 11
Card did not respond to voltage select!
mmc_init: -95, time 10
** Bad device mmc 0 **
Loading envs from mmc 1...
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
Loading envs from mmc 2...
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
Loading envs from mmc 3...
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
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
Card did not respond to voltage select!
mmc_init: -95, time 11
device mmc 0:1
Card did not respond to voltage select!
mmc_init: -95, time 10
Card did not respond to voltage select!
mmc_init: -95, time 10
** Bad device mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Pogov4>

Test result: booting with SD-card 1GB Sandisk

Pogov4> boot
boot
Initializing devices...
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
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** Bad device ide 0 **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** No partition table - mmc 0 **
Loading envs from mmc 1...
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
Loading envs from mmc 2...
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
Loading envs from mmc 3...
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
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
** No partition table - mmc 0 **
device mmc 1:1
MMC Device 1 not found
MMC Device 1 not found
** Bad device mmc 1 **
device mmc 2:1
MMC Device 2 not found
MMC Device 2 not found
** Bad device mmc 2 **
device mmc 3:1
MMC Device 3 not found
MMC Device 3 not found
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Pogov4>


How the rootfs was prepared
  1. Ubuntu 18.04 doesn’t have root enabled by default.
  2. By using the tool gparted on Ubuntu 18.04, a user is asked to enter the administrative password, that might mean that gparted was in fact run as sudo. Not sure why sudo would mess up (instead of being root). For newcomers it would be good to educate themselves what the difference between sudo and root has on partitioning and formating an ext3 USB-stick. If there is a thread somewhere on the forum about root vs sudo, it would be helpful to make the thread sticky and easy to find.
  3. For this troubleshooting purpose I installed a fresh Ubuntu Budgie 19.04 on a laptop to enable root and mess around. The steps to create root access on Ubuntu were described here.
    1. Press Ctrl+Alt+T to open a terminal window. For security purposes (and to avoid damage), the root user account is locked by default. To safely run commands as root, you should use sudo or gksudo instead. If you absolutely must have a separate root user (if it’s required by a program used by your business, or this workstation will only be used by a single user), you can enable the root user with some simple commands.
      • Enabling the root user can put your system at risk and is not recommended by Ubuntu.
    2. Type sudo passwd root and press ↵ Enter. You will be prompted to set a new password for the root user. Don’t lose this password.
    3. Enter a password, then press ↵ Enter.
    4. Retype the password when prompted, then press ↵ Enter. The root user should now have a password.
    5. Type su - and press ↵ Enter. Enter the root password when prompted to arrive at the root prompt.
      • To disable the root account, type sudo passwd -dl root.
     admin@desktop:~$ sudo passwd root 
    [sudo] password for admin:
    New password:
    Retype new password:
    passwd: password updated successfully
    admin@desktop:~$ su root
    Password:
    root@desktop:/home/admin#
    root@desktop:/home/admin# cd ~

    Create new ext3 partition on USB-stick:

    In fdisk, type p to see all the partitions on your flash drive. You're going to need to get rid of them, so type d 1 to get rid of the first. Depending on how many partitions you have you'll need to keep going. Use d 2 for the second partition, d 3 for the third, etc. When you're done, type p to list the partitions again. You should see no partitions at all. Success? Then it's time to create a new partition. You can do that by typing n. Press enter, then type p to designate this partition as the primary partition. Press enter again and type 1 to specify that this is the first partition on the flash drive. After that you'll need to press enter a few more times to accept the defaults and fdisk will do its job. When it's all done, type w to exit.

      
     root@desktop:~# fdisk /dev/sdb1 

    Welcome to fdisk (util-linux 2.33.1).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.

    The old ext3 signature will be removed by a write command.

    Device does not contain a recognized partition table.
    Created a new DOS disklabel with disk identifier 0x7ff2bb4c.

    Command (m for help): p
    Disk /dev/sdb1: 1,9 GiB, 1999323648 bytes, 3904929 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x7ff2bb4c

    Command (m for help): d 1
    No partition is defined yet!

    Command (m for help): F

    Unpartitioned space /dev/sdb1: 1,9 GiB, 1998275072 bytes, 3902881 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes

    Start End Sectors Size
    2048 3904928 3902881 1,9G
    Command (m for help): n
    Partition type
    p primary (0 primary, 0 extended, 4 free)
    e extended (container for logical partitions)
    Select (default p): p
    Partition number (1-4, default 1): 1
    First sector (2048-3904928, default 2048): 2048
    Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-3904928, default 3904928): 3904928

    Created a new partition 1 of type 'Linux' and of size 1,9 GiB.

    Command (m for help): w
    The partition table has been altered.
    Failed to add partition 1 to system: Invalid argument

    The kernel still uses the old partitions. The new table will be used at the next reboot.
    Syncing disks.
    root@desktop:~# fdisk /dev/sdb1

    Welcome to fdisk (util-linux 2.33.1).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.


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

    Command (m for help): i
    Selected partition 1
    Device: /dev/sdb1p1
    Start: 2048
    End: 3904928
    Sectors: 3902881
    Cylinders: 1637
    Size: 1,9G
    Id: 83
    Type: Linux
    Start-C/H/S: 0/33/3
    End-C/H/S: 1015/52/45

    Command (m for help): p
    Disk /dev/sdb1: 1,9 GiB, 1999323648 bytes, 3904929 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x7ff2bb4c

    Device Boot Start End Sectors Size Id Type
    /dev/sdb1p1 2048 3904928 3902881 1,9G 83 Linux

    Command (m for help): w
    The partition table has been altered.
    Syncing disks.
    root@desktop:~# which mkfs.ext3
    /usr/sbin/mkfs.ext3
    root@desktop:~# mkfs.ext3 -L rootfs /dev/sdb1
    mke2fs 1.44.6 (5-Mar-2019)
    Found a dos partition table in /dev/sdb1
    Proceed anyway? (y,N) y
    /dev/sdb1 is mounted; will not make a filesystem here!
    root@desktop:~# umount /dev/sdb1
    root@desktop:~# mkfs.ext3 -L rootfs /dev/sdb1
    mke2fs 1.44.6 (5-Mar-2019)
    Found a dos partition table in /dev/sdb1
    Proceed anyway? (y,N) y
    Creating filesystem with 488116 4k blocks and 122160 inodes
    Filesystem UUID: 7914b7b1-e64a-4a9a-a2c2-07eafcfc5449
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912

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

    Create new ext3 partition on SD-card:
     root@desktop:~# fdisk /dev/mmcblk0p1 

    Welcome to fdisk (util-linux 2.33.1).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.

    The old ext3 signature will be removed by a write command.

    Device does not contain a recognized partition table.
    Created a new DOS disklabel with disk identifier 0x5227d595.

    Command (m for help): p
    Disk /dev/mmcblk0p1: 967 MiB, 1013972992 bytes, 1980416 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x5227d595

    Command (m for help): n
    Partition type
    p primary (0 primary, 0 extended, 4 free)
    e extended (container for logical partitions)
    Select (default p): p
    Partition number (1-4, default 1):
    First sector (2048-1980415, default 2048):
    Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1980415, default 1980415):

    Created a new partition 1 of type 'Linux' and of size 966 MiB.

    Command (m for help): p
    Disk /dev/mmcblk0p1: 967 MiB, 1013972992 bytes, 1980416 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x5227d595

    Device Boot Start End Sectors Size Id Type
    /dev/mmcblk0p1p1 2048 1980415 1978368 966M 83 Linux

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

    Command (m for help): w
    The partition table has been altered.
    Failed to add partition 1 to system: Invalid argument

    The kernel still uses the old partitions. The new table will be used at the next reboot.
    Syncing disks.

    root@desktop:~# fdisk /dev/mmcblk0p1

    Welcome to fdisk (util-linux 2.33.1).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.


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

    Command (m for help): i
    Selected partition 1
    Device: /dev/mmcblk0p1p1
    Start: 2048
    End: 1980415
    Sectors: 1978368
    Cylinders: 30913
    Size: 966M
    Id: 83
    Type: Linux
    Start-C/H/S: 32/0/1
    End-C/H/S: 223/3/16

    Command (m for help): w
    The partition table has been altered.
    Syncing disks.

    root@desktop:~# mkfs.ext3 -L rootfs /dev/mmcblk0p1
    mke2fs 1.44.6 (5-Mar-2019)
    Found a dos partition table in /dev/mmcblk0p1
    Proceed anyway? (y,N) y
    Discarding device blocks: done
    Creating filesystem with 247552 4k blocks and 61952 inodes
    Filesystem UUID: 6579a554-8dc8-491d-b2b9-8b3bf781525e
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376

    Allocating group tables: done
    Writing inode tables: done
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done
    root@desktop:~# tar -xvjf /home/admin/Downloads/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 -C /media/admin/rootfs
    root@desktop:~# tar -xvjf /home/admin/Downloads/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 -C /media/admin/rootfs1
    (comment: This is the SD-card)

    Contents of the uEnv.txt-file which will reside in /boot/uEnv.txt on POGO-V4-A3-01:
     dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb 
    devices=mmc usb ide
    disks=0 1 2 3 4 5 6 7
    custom_params=init=/bin/systemd

     root@desktop:~# cp /home/admin/Downloads/uEnv.txt /media/admin/rootfs/boot/ 
    root@desktop:~# cp /home/admin/Downloads/uEnv.txt /media/admin/rootfs1/boot/
    (comment: This is the SD-card)

Output of mount
root@desktop:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3987872k,nr_inodes=996968,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=804932k,mode=755)
/dev/mapper/ubuntu--budgie--vg-root on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=35,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16705)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/var/lib/snapd/snaps/core_7396.snap on /snap/core/7396 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_6673.snap on /snap/core/6673 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/ubuntu-budgie-welcome_131.snap on /snap/ubuntu-budgie-welcome/131 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/ubuntu-budgie-welcome_120.snap on /snap/ubuntu-budgie-welcome/120 type squashfs (ro,nodev,relatime,x-gdu.hide)
/dev/sda1 on /boot type ext4 (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=804928k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdb1 on /media/admin/rootfs type ext3 (rw,nosuid,nodev,relatime,uhelper=udisks2)
/dev/mmcblk0p1 on /media/admin/rootfs1 type ext3 (rw,nosuid,nodev,relatime,uhelper=udisks2)

End comment:
Even though the partitions were created under root, with the use of fdisk and mkfs.ext3 instead of gparted, the result is exactly the same regardless of booting with USB-stick or SD-card.



Edited 4 time(s). Last edit at 08/21/2019 07:51AM by chaos.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 21, 2019 01:43PM
chaos,

In both boot attempts, u-boot did not find good partition. See the error in last lines quoted below.

Quote

Test result: booting with USB-stick Data Traveller 2GB
Pogov4> boot
boot
Initializing devices...
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

Quote

Test result: booting with SD-card 1GB Sandisk

Pogov4> boot
boot
Initializing devices...
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

<snip>

Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
** No partition table - mmc 0 **
device mmc 1:1

And you did create the drives partition correctly.

So I would suggest using a different USB brand such as Sandisk flash drive (Data Traveler is not good for booting). The Sandisk SD is usually pretty good, so I can't see why it failed in 2nd test.

And also remember to be root when you untar the rootfs tarball to the partition, and sync the disk a few times.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 23, 2019 08:31AM
Whatever USB I put, whatever format on the file system I use (ext3/ext2/ext4), whatever the partition table type (msdos/GPT/MAC/BSD), I even tried to do all this on another older PogoPlugPro, the result is always the same:

Pogov4> usb start
usb start
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

I tried using tools parted, gparted, testdisk, fdisk, gdisk, mkfs, mkfs.ext2, mkfs.ext3, mkfs.ext4 ... nothing seems to create a partition that Pogoplug v4 uboot 2017.07 reads.

In fact, there is a post here on this forum that tells exactly the same thing, that all USB-thingies get ignored by uboot 2017.07. All these USB-devices work just fine to access and read on all other linux boxes, so there should be nothing wrong with the partitioning. Still the uboot does not recognize partitions on USB, which makes me believe that uboot 2017.07 cannot do things that uboot 2014.07 could ... and that seems to be other people's idea too, suspecting that there is in fact something wrong with the 2017.07 uboot which has this same error pattern.

This leads me to the questions:
  • How exactly should a working USB-stick with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017) rootfs be set up?
  • Could Ubuntu 18.04 and Budgie 19.04 be the culprit, not creating the partitions in a way that POGO-V4-A3-01 uboot 2017.07-Kirkwood-tld-1 is set up to recognize?
  • Is there another version of fdisk and mkfs.ext3 that would create a correct partition?
  • How does uboot recognize a partition on a USB, where does it look?
  • Is it possible to roll back to a more stable uboot (which?) that reads USB:s without problems, using the console somehow?
  • Is there some other environment variables that can be used to force booting somehow?
  • tftpboot?

It simply can't be so that every single USB lacks a good partition table that uboot 2017.07 is able to read. I even tried Sandisk Cruzer that really works all the time everywhere ... and the same result showed up: USB found, but no storage found.

Some people talk about a voltage problem on a USB-stick, related to MEM_TERM_RMX, phy2 impedance, which uboot cannot handle well. Maybe that's the case?

There seems to be a way to boot the box via tftp server...
Pogo4> help
...
tftpboot- boot image via network using TFTP protocol
...

but I would need exact instructions on how to do it successfully.

Another thing I have been trying to find out, is if uboot 2017.07 has tools built in to actually partition and format a USB-stick right in the console, transfer the rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017), extract it and then boot. How are USB issues trouble shooted through the uboot console?



Edited 2 time(s). Last edit at 08/23/2019 09:55AM by chaos.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 23, 2019 02:59PM
chaos,

Here is the correct bahavior.

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0 
Pogov4> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
Pogov4>

Note the retry period of 15 seconds. The absense of this in your log usually means u-boot has not seen the partition, so it would not atempt to initialize the drive the 1st time.

Going back to your log. Looks like you did not create partition in a clean way. You did not erase your partition table.

Try these commands in fdisk:

p = print, o = clear all partitions, n = create new partition, a = make active partition, p = print partition, w = write partition table.


p
o
n
a
p
w


And then do
mkfs.ext3 -L rootfs /dev/sdb1

So on.

If after you've done the above, and it still not working. Then check the power supply.

One more thought. Make sure you use the USB port on top (USB 2.0) , The 2 USB ports on the rear (USB 3.0) only works after kernel has booted. Not possible to use them for booting kernel.

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



Edited 4 time(s). Last edit at 08/23/2019 10:41PM by bodhi.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 24, 2019 10:45AM
I now see what I did wrong: I used the two USB3.0 ports on the back and didn't know and didn't suspect that there was something hidden under the top plastic, which by the way is not just design, but actually hides something crucial... the one and only USB2.0 port that is to be used for booting. This is exactly what I meant that a newbie may not anticipate something so trivial to experts.

For all other newbies that get this error, the POGO-V4-A3-01 has a top lid which is removable and looks like this and can plug in a 2.5 SATA like this.

I followed all the steps and voila! It now boots even a Data Traveller USB!

The solution to this problem was:
fdisk /dev/sdb
p = print, o = clear all partitions, n = create new partition, a = toggle a bootable flag, p = print partition, w = write partition table.
p
o
n
a
p
w
mkfs.ext3 -L rootfs /dev/sdb1

use the USB port on top (USB 2.0), The 2 USB ports on the rear (USB 3.0 with blue colored parts in the port) only works after kernel has booted. Not possible to use them for booting kernel.

Thank you for pointing out that I had to pop off the top plastic lid to find the correct USB port to use.

Will proceed to update to kernel 5.2.9 after this solution.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 24, 2019 12:18PM
This is how installation of kernel 5.2.9 was done.
Also installed systemd and locales.

user@desktop:~$ scp linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2* root@<POGO-V4-A3-01 ip address>:/boot
linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2      100%   34MB   5.0MB/s   00:06    
linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2.md5  100%   75    52.7KB/s   00:00    
linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2.sha2 100%  107    90.1KB/s   00:00
root@DebianPlugv4:/boot# md5sum -c *md5
linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2: OK
root@DebianPlugv4:/boot# sha256sum -c *sha256
linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2: OK

# Backup of current kernel files
root@DebianPlugv4:/boot# cp uInitrd uInitrd-4.12.1.bak 
root@DebianPlugv4:/boot# cp uImage uImage-4.12.1.bak
root@DebianPlugv4:/boot# cp initrd.img-4.12.1-kirkwood-tld-1 initrd.img-4.12.1-kirkwood-tld-1.bak
root@DebianPlugv4:/boot# cp System.map-4.12.1-kirkwood-tld-1 System.map-4.12.1-kirkwood-tld-1.bak
root@DebianPlugv4:/boot# cp vmlinuz-4.12.1-kirkwood-tld-1 vmlinuz-4.12.1-kirkwood-tld-1.bak
root@DebianPlugv4:/boot# cp config-4.12.1-kirkwood-tld-1 config-4.12.1-kirkwood-tld-1.bak
root@DebianPlugv4:/boot# cp -r dts dts-4.12-1.bak

# Install systemd and locales (annoying to get a lot of error messages)
root@DebianPlugv4:~# apt-get install systemd locales
root@DebianPlugv4:~# dpkg-reconfigure locales
root@DebianPlugv4:~# echo custom_params=init=/bin/systemd > /boot/uEnv.txt

#Change password
root@DebianPlugv4:~# passwd

#Generate New OpenSSH Keys
root@DebianPlugv4:~# rm /etc/ssh/ssh_host*
root@DebianPlugv4:~# ssh-keygen -A

#Update
root@DebianPlugv4:~# apt-get update
root@DebianPlugv4:~# apt-get upgrade

#Set hostname to DebianPlugv4 or whatever you like
root@DebianPlugv4:~# echo DebianPlugv4>/etc/hostname

#Set Time Zone
root@DebianPlugv4:~# tzselect
root@DebianPlugv4:~# reboot

Login via ssh again and test if systemd is running
root@DebianPlugv4:~# ps 1
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:08 /bin/systemd
root@DebianPlugv4:~# systemctl list-units --type=service
UNIT                               LOAD   ACTIVE SUB     DESCRIPTION
...
ssh.service                        loaded active running OpenBSD Secure Shell server                                       
...
systemd-sysctl.service             loaded active exited  Apply Kernel Variables

So far all seem to work.
# Shutdown POGO-V4-A3-01 and backup rootfs.
root@DebianPlugv4:~# poweroff
Wait some 20 seconds.
Unplug the rootfs USB-stick from POGO-V4-A3-01.
Insert the rootfs USB-stick into a laptop and mount it.

Go one level outside your rootfs folder and try:
root@laptop # tar -cvjSf Debian-5.2.9-kirkwood-tld-1-chaos-rootfs.tar.bz2 <folder_where_rootfs_is>
Or from the same folder try:
root@laptop # tar -cvjSf Debian-5.2.9-kirkwood-tld-1-chaos-rootfs.tar.bz2 *



Edited 4 time(s). Last edit at 08/24/2019 05:13PM by chaos.
Re: POGO-V4-A3-01 + 2017.07 U-Boot Kirkwood + Debian 4.12.1 rootfs + Kernel 5.2.9
August 24, 2019 02:20PM
chaos,


> Go one level outside your rootfs folder and try:
>
> sudo tar -cvjSf
> Debian-5.2.9-kirkwood-tld-1-rootfs.tar.bz2
> <folder_where_rootfs_is>
>
> Or from the same folder try:
>
> sudo tar -cvjSf
> Debian-5.2.9-kirkwood-tld-1-rootfs.tar.bz2
> *
>

That was wrong! you need to be root user, not using sudo when creating or extracting the rootfs.

And don't use the same naming covention Debian-5.2.9-kirkwood-tld-1-rootfs.tar.bz2! Becaus it will confulse yours with a released version. Use Debian-5.2.9-kirkwood-tld-1-chaos-rootfs.tar.bz2.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: