Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 03:25AM
Hi there,

I am using a 4GB USB stick to boot my pogoplug E02 with the latest kernel (5.10.7) which seems to be ok. But when I tried to attach a 320GB hard drive with a single partition with no rootfs label, it seems the system tried to boot from the hard drive and was never successful. How should I fix it?

[Note that the hard drive partition is ext4 and was hooked up to another debian on my dockstar as a data drive. I never had problem booting on it, but now I am using the E02 as a nextcloud server, I try to move it here.]

Here is the log when the hard drive was not attached:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
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... 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
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
33 bytes read in 599 ms (0 Bytes/s)
... envs loaded
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 539 ms (0 Bytes/s)
Found bootable drive on usb 0
5316528 bytes read in 851 ms (6 MiB/s)
9662424 bytes read in 1023 ms (9 MiB/s)
10106 bytes read in 3568 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.10.7-kirkwood-tld-1
   Created:      2021-02-21   9:31:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5316464 Bytes = 5.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.10.7
   Created:      2021-02-26   3:00:20 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9662360 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...


And here is when the hard drive was attached and ran into a problem.

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
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... 4 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
2 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
33 bytes read in 599 ms (0 Bytes/s)
... envs loaded
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
** File not found /boot/uImage **
device usb 1:1
1 bytes read in 538 ms (0 Bytes/s)
Found bootable drive on usb 1
** File not found /boot/uImage **
** File not found /boot/uInitrd **
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02> 
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 04:16AM
jrey,

Quote

attach a 320GB hard drive with a single partition with no rootfs label,

There is a /boot/uEnv.txt file on the USB HDD drive. That file has some settings that interfered with the booting. So I guess this USB HDD drive also has a rootfs on it? That will cause problem.

For the USB HDD drive, removing rootfs label alone is not enough, you should remove any uEnv.txt file in the /boot folder on this drive. And if it has a rootfs, then delete that too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 04:26AM
bodhi Wrote:
-------------------------------------------------------
> jrey,
>
>
Quote

attach a 320GB hard drive with a single
> partition with no rootfs label,
>
> There is a /boot/uEnv.txt file on the USB HDD
> drive. That file has some settings that interfered
> with the booting. So I guess this USB HDD drive
> also has a rootfs on it? That will cause problem.
>
> For the USB HDD drive, removing rootfs label alone
> is not enough, you should remove any uEnv.txt file
> in the /boot folder on this drive. And if it has a
> rootfs, then delete that too.

The partition is labeled as "320GB HD" and here are what's in there:

#ls -l
total 28
drwx------ 2 root     root     16384 Jul 22  2020 lost+found
drwxrwxrwx 8 root     root      4096 Feb 12 21:44 MINIDLNA
drwxr-xr-x 2 www-data www-data  4096 Feb 26 08:12 nextcloud
drwxrwxrwx 7 teeh     teeh      4096 Jan 28 09:08 SambaShare
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 04:33AM
> The partition is labeled as "320GB HD" and here
> are what's in there:
>
>
> #ls -l
> total 28
> drwx------ 2 root     root     16384 Jul 22  2020
> lost+found
> drwxrwxrwx 8 root     root      4096 Feb 12 21:44
> MINIDLNA
> drwxr-xr-x 2 www-data www-data  4096 Feb 26 08:12
> nextcloud
> drwxrwxrwx 7 teeh     teeh      4096 Jan 28 09:08
> SambaShare
>

Ok then the USB rootfs drive is actually the second drive that u-boot detected (usb 1).

The uEnv.txt on the USB rootfs has wrong envs in there. Remove this file and it will boot OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 04:47AM
bodhi Wrote:
-------------------------------------------------------
> > The partition is labeled as "320GB HD" and here
> > are what's in there:
> >
> >
> > #ls -l
> > total 28
> > drwx------ 2 root     root     16384 Jul 22 
> 2020
> > lost+found
> > drwxrwxrwx 8 root     root      4096 Feb 12
> 21:44
> > MINIDLNA
> > drwxr-xr-x 2 www-data www-data  4096 Feb 26
> 08:12
> > nextcloud
> > drwxrwxrwx 7 teeh     teeh      4096 Jan 28
> 09:08
> > SambaShare
> >
>
> Ok then the USB rootfs drive is actually the
> second drive that u-boot detected (usb 1).
>
> The uEnv.txt on the USB rootfs has wrong envs in
> there. Remove this file and it will boot OK.


I have renamed uEnv.txt to Backup_uEnv.txt but it still did not fix the problem:

PogoE02> boot
boot
Initializing devices...
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** File not found /boot/uEnv.txt **
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...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
** File not found /boot/uImage **
device usb 1:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 1
** File not found /boot/uImage **
** File not found /boot/uInitrd **
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02> 

Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 05:12AM
jrey,

Ok then instead of guessing the problem, we should do this once and can see why.

Power up, interrupt serial console and

printenv
usb start
ext2ls usb 0:1 /
ext2ls usb 0:1 /boot
ext2ls usb 1:1 /
ext2ls usb 1:1 /boot
boot
and post the whole serial console log.

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



Edited 2 time(s). Last edit at 02/26/2021 05:14AM by bodhi.
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 11:18AM
Here is the result. Might it be that the USB stick is corrupted? But it boots ok when the HD is disconnected.


PogoE02> printenv
printenv
arcNumber=3542
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
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:25:31:00:94:EC
if_netconsole=ping $serverip
ipaddr=192.168.100.152
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb
load_dtb_addr=0x1c00000
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_uimage_addr=0x800000
machid=dd6
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nc_ready=1
ncip=192.168.100.102
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
serverip=192.168.100.102
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
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_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_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_ready_retry=15

Environment size: 3100/131068 bytes
PogoE02> usb start
usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
2 Storage Device(s) found
PogoE02> ext2ls usb 0:1 /
ext2ls usb 0:1 /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 MINIDLNA
<DIR>       4096 SambaShare
<DIR>       4096 nextcloud
PogoE02> ext2ls usb 0:1 /boot
ext2ls usb 0:1 /boot
** Can not find directory. **
PogoE02> ext2ls usb 1:1 /
ext2ls usb 1:1 /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 proc
<DIR>       4096 sbin
<DIR>       4096 dev
<DIR>       4096 root
<DIR>       4096 usr
<DIR>       4096 opt
<DIR>       4096 boot
<DIR>       4096 bin
<DIR>       4096 etc
<DIR>       4096 tmp
<DIR>       4096 mnt
<DIR>       4096 var
<DIR>       4096 home
<DIR>       4096 media
<DIR>       4096 sys
<DIR>       4096 run
<DIR>       4096 lib
<DIR>       4096 srv
PogoE02> ext2ls usb 1:1 /boot
ext2ls usb 1:1 /boot
<DIR>       4096 .
<DIR>       4096 ..
         9662424 uInitrd
              33 Backup_uEnv.txt
<DIR>       4096 dts
         5316528 uImage
<DIR>       4096 backup
        21747120 linux-image-5.10.7-kirkwood-tld-1_1.0_armel.deb
         7589236 linux-headers-5.10.7-kirkwood-tld-1_1.0_armel.deb
          180435 config-5.10.7-kirkwood-tld-1
         5316464 zImage-5.10.7-kirkwood-tld-1
         1300480 linux-dtb-5.10.7-kirkwood-tld-1.tar
          161761 linux-5.10.7-kirkwood-tld-1.patch
         5316464 vmlinuz-5.10.7-kirkwood-tld-1
         9662360 initrd.img-5.10.7-kirkwood-tld-1
         4308309 System.map-5.10.7-kirkwood-tld-1
PogoE02> boot
boot
Initializing devices...
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** File not found /boot/uEnv.txt **
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...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
** File not found /boot/uImage **
device usb 1:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 1
** File not found /boot/uImage **
** File not found /boot/uInitrd **
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02> 

Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 11:42AM
I did further experiment by plugin another USB stick that also has rootfs partition that I used for my dockstar in the front socket. This time it boots using the (intended) USB stick (for the Pogo E02). Here's the log:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
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... 5 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
3 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** File not found /boot/uEnv.txt **
Loading envs from usb 2...
** File not found /boot/uEnv.txt **
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...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 0
5316528 bytes read in 907 ms (5.6 MiB/s)
9645442 bytes read in 1085 ms (8.5 MiB/s)
10106 bytes read in 3598 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.10.7-kirkwood-tld-1
   Created:      2021-01-24   1:56:53 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5316464 Bytes = 5.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.10.7-kirkwood-tld-1
   Created:      2021-01-24   1:57:05 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9645378 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

So I removed the dockstar USB (from the front) and the Pogo E02 USB (from the 1st back socket) and then plugged the Pogo E02 USB into the front socket. Now it boots ok. Here's the log.

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
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... 4 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
2 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** File not found /boot/uEnv.txt **
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...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 0
5316528 bytes read in 881 ms (5.8 MiB/s)
9662424 bytes read in 1020 ms (9 MiB/s)
10106 bytes read in 3598 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.10.7-kirkwood-tld-1
   Created:      2021-02-21   9:31:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5316464 Bytes = 5.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.10.7
   Created:      2021-02-26   3:00:20 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9662360 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

So now I am very confused whether is it because of my USB stick, my HD or my PogoE02 that is causing the problem.
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 26, 2021 06:44PM
jrey,

Your envs have some problem! we could have solved this right away if I've asked you to do the above :)

Quote

Ok then instead of guessing the problem, we should do this once and can see why.


load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage

The 3 envs above look like left-over from older u-boot installation.

They should be:
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

The env $device is what scandisk returns when it found the rootfs uImage on a partition. So when there 2 USB devices attached to the box, during booting, u-boot enumerate the drives and found the USB HDD as usb 0, and the rootfs as usb 1.

So the $device = 1:1. But the old env was hardcoded to usb 0:1.

So with both USB drives attached, reboot and interrupt serial console, and

setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
And boot
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 27, 2021 01:40AM
Thanks bodhi. This seems to be working (for now :) Here's the new log:

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
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... 4 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)

Use USB retry period from the environment: 15 second(s)
2 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
33 bytes read in 507 ms (0 Bytes/s)
... envs loaded
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 0
5316528 bytes read in 882 ms (5.7 MiB/s)
9662424 bytes read in 1023 ms (9 MiB/s)
10106 bytes read in 3597 ms (2 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.10.7-kirkwood-tld-1
   Created:      2021-02-21   9:31:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5316464 Bytes = 5.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.10.7
   Created:      2021-02-26   3:00:20 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9662360 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000

The box seems to detect the USB stick as usb 0:1. I tried to move it back to the back socket to see if it would be detected as usb 1:1, but it looks like it is 0:1 again.

Just a curiosity, I notice that the message at the below Pogo E02 is different from others which show DRAM and NAND and all that. Mine shows:
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28

Is there anything I should concern?
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 27, 2021 05:30PM
jrey,

> Just a curiosity, I notice that the message at the
> below Pogo E02 is different from others which show
> DRAM and NAND and all that. Mine shows:
>
> U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18
> -0700)
> Pogo E02
> gcc (Debian 6.3.0-18) 6.3.0 20170516
> GNU ld (GNU Binutils for Debian) 2.28
>
>
> Is there anything I should concern?

That's normal. In serial console, the U-boot banner is different (an abbreviated version). In netconsole, the full version was printed out.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Pogo E02 tries to boot from a non-rootfs drive.
February 27, 2021 10:03PM
Thank you, bodhi.
Re: Pogo E02 tries to boot from a non-rootfs drive.
March 01, 2021 08:30PM
Hi bodhi,

It happened again. After rebooting today, the box couldn't boot and I check env and found the same old misconfiguration:

load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage

So I went ahead with your fix above and it boots now. Is there a way to make it permanent? Or what caused it to happen again?

Thanks,
-jrey
Re: Pogo E02 tries to boot from a non-rootfs drive.
March 02, 2021 12:33AM
jrey,

> So I went ahead with your fix above and it boots
> now. Is there a way to make it permanent? Or what
> caused it to happen again?

Whenever you changed u-boot envs in serial console and then booted successfully, you need to save the new envs settings to make it permanent. This can be done either in serial console, or in Debian.

1. To do it Debian, boot with new envs

setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
boot
And log in, list the envs
fw_printenv
And see that the envs till have old settings. Now change them permanently

fw_setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
fw_setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
fw_setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
Now next boot will be OK.

2. To do it in serial console. Power up, interrupt serial console and

setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
saveenv
and boot
boot
Log into Debian and check the envs

fw_printenv

and see that the envs have the new settings. The next boot will be OK.

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