Welcome! Log In Create A New Profile

Advanced

Pogoplug E02 Debian Linux Installation Guide

Posted by feas 
Re: Pogoplug E02 Debian Linux Installation Guide
October 20, 2017 11:40PM
Is it OK that my USB stick is ext2? (I made the second one ext3 but I must have just forgot with the first one)
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 12:11AM
Sorry that was a syntax error on my part.

Please execute this correct command and post here:
ls -lart /lib/modules/

Why there are 2 USB drives? which one is the rootfs that you will boot with? I hope it is the sda1 (the one you are currently running with).

/dev/sda1 on / type ext2 (rw,noatime,errors=remount-ro)
/dev/sdb1 on /media/sdb1 type ext3 (rw,relatime,data=ordered)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 12:50AM
sda1 is the first USB stick I used to go through feas' long-way process of updating from kernel to kernel, but now should have the latest kernel installed. I realize that his is the one you are evaluating for consistency. This is the one that is Ext2 - I'm guessing that's OK?

sda2 is my 2nd USB stick with which I basically followed your instructions. On this one I installed the latest rootfs but have not upgraded to the very latest kernel. Hopefully this is now bootable as well, but if not it's no big deal.

My plan is to shutdown, unplug the 2nd stick, leave the 1st stick plugged in to the bottom rear USB port, and then power up the device. (Unless you tell me something different)



Here is the modules directory:
debian:/boot#
debian:/boot#
debian:/boot# ls -lart /lib/modules/
total 32
drwxr-xr-x  3 root root 4096 Oct 17 20:35 2.6.33
drwxr-xr-x 15 root root 8192 Oct 19 13:59 ..
drwxr-xr-x  3 root root 4096 Oct 19 14:16 3.16.0-4-kirkwood
drwxr-xr-x  2 root root 4096 Oct 20 13:25 2.6.32-5-kirkwood
drwxr-xr-x  7 root root 4096 Oct 20 16:29 .
drwxr-xr-x  3 root root 4096 Oct 20 16:31 4.13.5-kirkwood-tld-1
drwxr-xr-x  2 root root 4096 Oct 20 18:29 3.2.0-4-kirkwood
debian:/boot#
debian:/boot#

Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 01:52AM
huge,

> leave the 1st stick plugged in to the bottom rear
> USB port, and then power up the device. (Unless
> you tell me something different)

Yes, everything looks good! leave only the current system stick in and reboot.

Ext2 is OK. It will boot with the current default envs. The kernel will figure out the fs type. Later you should clone it to another USB drive to backup, and then convert this to Ext3.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 02:10AM
OK, will do!

Amusingly, right when your post came in, I was finally able to make a serial connection to my unresponsive Pogo Mobile using (don't laugh) bare wires and masking tape (OK you can laugh) because I don't have a soldering iron. I was about to ask you how to recover it when I found your response 3 years ago to someone in a very similar situation telling him
You are running the latest u-boot. 

Do this to recover: 

- Download the latest rootfs from this thread (Updated 31 Oct 2014 Rootfs Debian-3.17.0-kirkwood-tld-1). 
- Format a new USB thumb drive with Ext3 (or just use one you have and format it as new, wiping out all data, though) 
- Follow instruction to untar that rootfs to the drive 
- Take it to the Pogo and cold start.

And I'm like "OMG I KNOW HOW TO DO THAT!!!"

Thanks for helping me when you don't even know you're helping me.

I'll report back on the E02. Hopefully I won't have to bug you about the Mobile.

-huge
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 02:36AM
D'OH!!

The LED blinked and then went solid just like it should, but after about ten minutes it still hasn't made a connection to my router (and I checked to see if it somehow grabbed another IP address).

I assume the only thing I can do now is (A) power-cycle it and try again (maybe leaving it powered down for a few minutes), (B) try the other USB stick and then, gasp, (C) try creating another boot stick in another pogoplug, and then (D) try to connect via serial cable (shudder).

Dang it, I really thought it was going to just work.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 03:27AM
huge,

> The LED blinked and then went solid just like it
> should,

It means the kernel has completed booting. And it tried to mount the rootfs.

> but after about ten minutes it still
> hasn't made a connection to my router (and I
> checked to see if it somehow grabbed another IP
> address).

The basic rootfs use dynamic IP. If it does not appear in the router, try its hostname.

Try
ping debian.local
Wait for a few minutes.

--------- Next solution if you can't boot with this existing rootfs.

Now that your u-boot has been installed successfully (I believe so, but you did not post the log of that installation so I am guessing). You can just create a brand new rootfs on the 2nd USB drive using Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2. Use another Linux box to do that.
https://forum.doozan.com/read.php?2,12096

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

And boot with it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 04:07AM
Well, I tried power-cycling & starting again with the same USB, then powering up with the 2nd USB - same result of fast blinking LED followed by steady LED but no connection to router (my router assigns it a static/reserved ip address, and even if that didn't work I can always tell if a new device has connected, so I knew pinging debian.local wouldn't work but I tried it anyway). Then just for kicks I tried starting with no USB drive - as expected that just brought a blinking LED that never went solid.

Time for bed, but I'll try adding the rootfs to the 2nd USB stick tomorrow.

Thank you so much - it may be frustrating me now, but I'm confident it will get there, and both of you have just been amazingly helpful & generous with a fumbling noob...

-huge
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 04:40AM
Sorry huge and Bodhi, I wanted to clean my mess from my original posting like a big boy.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 05:27AM
@feas,

> Sorry huge and Bodhi, I wanted to clean my mess
> from my original posting like a big boy.

Nah, nothing to sorry about. I've checked out everything, and it's all looking good :) there is nothing wrong that I can tell from hughe post above.

This could happen even with the brand new rootfs created from the tarball....

Hold on, there is one crucial info that I've forgot: fstab :) in the later Debian distributions, fstab rules have changed. I'm positive that the old /dev/root would cause the rootfs mounting problem (wheezy was OK with it).

@hughe,

Make sure your fstab looks like this:

cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext2    noatime,errors=remount-ro 0 1

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



Edited 2 time(s). Last edit at 10/21/2017 05:32AM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 11:59AM
bodhi Wrote:
-------------------------------------------------------
> @feas,
>
> > Sorry huge and Bodhi, I wanted to clean my mess
> > from my original posting like a big boy.
>
> Nah, nothing to sorry about. I've checked out
> everything, and it's all looking good :) there is
> nothing wrong that I can tell from hughe post
> above.
>
> This could happen even with the brand new rootfs
> created from the tarball....
>
> Hold on, there is one crucial info that I've
> forgot: fstab :) in the later Debian
> distributions, fstab rules have changed. I'm
> positive that the old /dev/root would cause the
> rootfs mounting problem (wheezy was OK with it).
>
> @hughe,
>
> Make sure your fstab looks like this:
>
> cat /etc/fstab
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options> 
>      <dump>  <pass>
> LABEL=rootfs    /               ext2   
> noatime,errors=remount-ro 0 1
>




With my first USB stick I set up a swap partition as sdx2, per feas' OP. Here is the fstab from that stick:

[root@alarm tmp]# cat /media/hd-sdb1/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
none           /dev/pts        devpts  defaults          0       0
none           /dev/shm        tmpfs   nodev,nosuid      0       0
/dev/sda1      /               ext2    noatime,errors=remount-ro 0       1
/dev/sda2      none            swap    sw                0       0

[root@alarm sdb1]#




My second USB stick's fstab looks different (with a LABEL=rootfs line instead of /dev/sda1), but you'll have to tell me if either one might be causing the problem or if there are any changes I can make to them that might help. :

[root@alarm tmp]# cat /media/rootfs/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
[root@alarm tmp]#

Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 03:45PM
I didn't really think these would work (and they didn't) but I tried the following changes one at a time before power-cycling my E02 and checking for a router connection:

1. Gave my first USB stick the "rootfs" label

2. edited the fstab files in each USB stick to look exactly like yours (by commenting out the extra lines for tmpfs, swap file, devpts)

3. tried the front USB port in the E02


Is there a way to make the boot process write a log to the USB drive so that I can look at it after I unplug it and see what went wrong? Or does that happen already?
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 04:24PM
huge,

> (by commenting out the
> extra lines for tmpfs, swap file, devpts)

Sorry, that's not what I intended to say! I meant the rootf device must be like:
LABEL=rootfs    /               ext2    noatime,errors=remount-ro 0 1
You can leave the rest (tmpfs, swap file, devpts) as is.

> Is there a way to make the boot process write a
> log to the USB drive so that I can look at it
> after I unplug it and see what went wrong? Or does
> that happen already?

Not possible to do that when you have not got through the rootfs mounting part of the boot process.


===============================


The good thing is your u-boot installation is OK. The kernel is already running. So to avoid further delay, now it is time to try the brand news rootfs using your second USB drive.

Use another Linux box to create the new rootfs using Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from the kernel and rootfs thread:
https://forum.doozan.com/read.php?2,12096

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

And boot with this stick only.

Keep the log of the session while you are creating this rootfs. And post that log here if it does not boot all the way into Debian.

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



Edited 1 time(s). Last edit at 10/21/2017 04:31PM by bodhi.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 04:29PM
By the way,

This is a good example of how much time we waste because there is no serial console :) If there were a serial console connected, most booting problems can be solved in minutes.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 04:46PM
bodhi Wrote:
-------------------------------------------------------
> huge,
>
> > (by commenting out the
> > extra lines for tmpfs, swap file, devpts)
>
> Sorry, that's not what I intended to say! I meant
> the rootf device must be like:
>
> LABEL=rootfs    /               ext2   
> noatime,errors=remount-ro 0 1
>
> You can leave the rest (tmpfs, swap file, devpts)
> as is.
>


Yeah, like I said, I didn't actually think it would work - was sort of a "what the hell" moment


>
>
> The good thing is your u-boot installation is OK.
> The kernel is already running. So to avoid further
> delay, now it is time to try the brand news rootfs
> using your second USB drive.
>
> Use another Linux box to create the new rootfs
> using
> Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> from the kernel and rootfs thread:
> https://forum.doozan.com/read.php?2,12096
>
...
> And boot with this stick only.
>



Sadly I already did this with my second USB drive, with the same result.



> Keep the log of the session while you are creating
> this rootfs. And post that log here if it does not
> boot all the way into Debian.



But I didn't keep a log. Perhaps I should do that with a freshly-formatted USB drive.

Thanks once again
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 04:49PM
bodhi Wrote:
-------------------------------------------------------
> By the way,
>
> This is a good example of how much time we waste
> because there is no serial console :) If there
> were a serial console connected, most booting
> problems can be solved in minutes.

I actually think I can get a serial connection working, if I'm right that the E02 has a little plastic header on the circuit board that I can attach an old CD-ROM audio cable to. I have the CP2102 USB adapter for a serial connection, I just don't own a soldering iron.

I'll still try creating a new USB boot drive, but failing that I'll skip right to trying the serial port.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 05:09PM
makes me wonder if your sticks are part of the problem as some types seem to cause problems booting reliably.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 05:13PM
feas Wrote:
-------------------------------------------------------
> makes me wonder if your sticks are part of the
> problem as some types seem to cause problems
> booting reliably.

I know I've used one of them before (successfully) to boot other Pogos, but the other two are cheap and/or old.
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 06:20PM
OK, tried again with a freshly-formatted USB stick, same result. Here is the log of my screen installing the Debian Stretch Kirkwood rootfs. If you see anything missing or wrong, let me know. If not I'm happy to try to wrangle a serial cable connection...

[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.1).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): o
Building a new DOS disklabel with disk identifier 0x3fd1c278.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-7831551, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-7831551, default 7831551):
Using default value 7831551
Partition 1 of type Linux and of size 3.8 GiB is set

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# tune2fs -L rootfs /dev/sdb1
tune2fs 1.42.7 (21-Jan-2013)
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# mkfs.ext3 /dev/sdb1
mke2fs 1.42.7 (21-Jan-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
244800 inodes, 978688 blocks
48934 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1002438656
30 block groups
32768 blocks per group, 32768 fragments per group
8160 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

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

[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# fdisk -l /dev/sdb

Disk /dev/sdb: 4009 MB, 4009754624 bytes, 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x3fd1c278

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048     7831551     3914752   83  Linux
[root@alarm tmp]#
[root@alarm tmp]#
[root@alarm tmp]# mount /dev/sdb1 /media/hd-sdb1
[root@alarm tmp]#
[root@alarm tmp]# ## copied in Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2  
[root@alarm tmp]#
[root@alarm tmp]# cd /media/hd-sdb1
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]# ls
Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2  lost+found
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]# tar -xjf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]#
[root@alarm hd-sdb1]# cat etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
[root@alarm hd-sdb1]#

Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 07:35PM
OK, I finally pried the case apart and connected the serial cable. Here is the screen output from trying to boot with the most recent USB stick I created (freshly formatted ext3, installed latest rootfs:
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43 -0700)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Using egiga0 device
host 192.168.222.103 is alive
Using egiga0 device
host 192.168.222.103 is alive
Using egiga0 device
host 192.168.222.103 is alive
Using egiga0 device
host 192.168.222.103 is alive
Using egiga0 device
host 192.168.222.103 is alive
Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000dd6).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.

I poked around and found some other people who had run into the same error with the machid "dd6" being unrecognized, but now I need to head out for the evening. I'm happy to keep researching on my own, but I'm half guessing one of you will see this and say "Oh, duh, XYZ is wrong".
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 07:48PM
> [root@alarm tmp]# tune2fs -L rootfs /dev/sdb1

> [root@alarm tmp]# mkfs.ext3 /dev/sdb1



The above steps were done in reversed.

Correct order:
mkfs.ext3 /dev/sdb1
tune2fs -L rootfs /dev/sdb1

and check

e2label /dev/sdb1

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 07:55PM
> U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43
> -0700)
> Pogo E02
>
> SoC: Kirkwood 88F6281_A0
> DRAM: 256 MiB
> WARNING: Caches not enabled
> NAND: 128 MiB
> In: serial
> Out: serial
> Err: serial
> Net: egiga0
> Using egiga0 device
> host 192.168.222.103 is alive
> Using egiga0 device
> host 192.168.222.103 is alive
> Using egiga0 device
> host 192.168.222.103 is alive
> Using egiga0 device
> host 192.168.222.103 is alive
> Using egiga0 device
> host 192.168.222.103 is alive
> Uncompressing Linux... done, booting the kernel.
>
> Error: unrecognized/unsupported machine ID (r1 =
> 0x00000dd6).
>
> Available machine support:
>
> ID (hex) NAME
> ffffffff Generic DT based system
> ffffffff Marvell Kirkwood (Flattened Device
> Tree)
>
> Please check your kernel config and/or
> bootloader.
>


Either the booting envs or the kernel files on USB are incorrect. In this case, it looks like the envs. Because the rootfs is OK, if that was all you did in this post:
https://forum.doozan.com/read.php?2,29068,39664#msg-39664


Power up, interrupt serial console and

printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 21, 2017 08:17PM
Note the netconsole interferrence in the boot log above:

host 192.168.222.103 is alive

To eliminate that, and allow the serial console countdown to show: change the IP address of the box that currently defined as 192.168.222.103 to some other IP addr such as 192.168.222.104.

This way, netconsole will not be started, and serial console is the only console that talks to the box.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 03:52AM
>e. Modify the following u-boot variables using fw_setenv:

>Note that setting arcNumber and machid are not necessary if you are booting with FDT kernel 3.17+ in >the latest kernel and rootfs thread. But it's required for non-FDT kernel.

>Also note that only some boxes need machid, some don't (so the command fw_setenv machid below clears >them).



> Uncompressing Linux... done, booting the kernel.
>
> Error: unrecognized/unsupported machine ID (r1 =
> 0x00000dd6).
>
> Available machine support:
>
> ID (hex) NAME
> ffffffff Generic DT based system
> ffffffff Marvell Kirkwood (Flattened Device
> Tree)
>
> Please check your kernel config and/or
> bootloader.
>

So is it possible that by having these set when not required could be causing the hang now?
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 04:40AM
Hi feas,

Quote

So is it possible that by having these set when not required could be causing the hang now?

No, machid and arcNumber are not likely to be the reason. The FDT kernels ignore archNumber and machid. But non-FDT kernels care about them. The installation instruction must take into consideration that even u-boot is new, the kernel might be old (such as 3.16 or 3.14). And it is OK to set them in all kernel versions... You can see why the instruction seems long winded :) If I knew the exact kernel version that will be booted, then I could have simplified it a lot more.

This is the problem with not loading DTB. But since netconsole masked the boot log, we cannot see right away if that is the case.

That's why I showed above how to get a complete serial console input/output back without having to clear preboot env for netconsole. And also asked hughe for the envs so I can adjust them.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 04:42AM
bodhi Wrote:
-------------------------------------------------------
>
> Either the booting envs or the kernel
> files
on USB are incorrect. In this case, it
> looks like the envs. Because the rootfs is OK, if
> that was all you did in this post:
> https://forum.doozan.com/read.php?2,29068,39664#msg-39664
>
>
> Power up, interrupt serial console and
>
>
> printenv
>

Success! (with some mystery). I've spent the last couple hours stumbling around with the dumbest little glitches.

I'm going to try to show you just the bits from my console session that seemed like they needed attention, and what I did about them. But I have pretty much my entire log stored so I can look at or post the whole pile of printenv outputs, boot failure messages etc,

PogoE02>
PogoE02> printenv
...
devices=usb ide mmc
...

It looks like this is being parsed weirdly. It generates error messages in the boot log:
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
I haven't done anything about this since I don't think it's actually causing a problem. I guess I can just git rid of ide & mmc since the E02 doesn't have SATA or SD.







...
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:25:31:04:80:8C
if_netconsole=ping $serverip
ipaddr=192.168.222.168
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/dts/kirkwood-pogo_e02.dtb
...
Note the extra "/dts" in the load_dtb definition. I did a setenv in the serial console to fix this, but after each boot attempt it reverts back to the wrong file path, even now in debian:
root@debian:~#
root@debian:~# fw_printenv load_dtb
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/dts/kirkwood-pogo_e02.dtb
root@debian:~#
I presume this came from me installing U-boot and just typing something wrong, but I don't know where, and I'm concerned that just doing a fw_setenv now won't fix it permanently. I added a /boot/dts/dts/ directory with that one .dtb file copied just so it hopefully won't keep me from booting. I'll let you know what happens next time I reboot.

The first time I typed "boot" I got some weird results:
PogoE02> boot
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'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7829504         3fd1c278-01     83 Boot
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
I already mentioned the ide/mmc errors. I'm certain I had created /boot/uEnv.txt, but checking the drive it was missing, so I created it again, with the correct dtb file path and I deleted "mmc" and "ide" from the devices definition, which leaves uEnv.txt looking like this:
root@debian:~# cat /boot/uEnv.txt
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
devices=usb
devices=usb
disks=0 1 2 3 4 5 6 7
I don't know if I should/can/need to remove the 2nd "devices=usb"

Then it would run into the bad file path and ultimately fail:
** File not found /boot/dts/dts/kirkwood-pogo_e02.dtb **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xdd6 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000dd6).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.


2nd boot attempt, the uEnv.txt error is gone, but very strangely now we have:

** File not found /boot/dts/kirkwood-pogo_e02.dtb **

which is the correct file name & path, and that file really is there on the USB drive, so I don't know why it's choking there.

Here are highlights from the latest output from a serial session with "printenv" and "boot":

U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43 -0700)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Using egiga0 device

Abort
ping failed; host 192.168.222.103 is not alive
Hit any key to stop autoboot:  0

PogoE02> printenv
arcNumber=3542
...
devices=usb ide mmc
disks=0 1 2 3 4 5 6 7
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:25:31:04:80:8C
if_netconsole=ping $serverip
ipaddr=192.168.222.168
--The devices line again - not sure if I should try to change that or just let it be.
--The dtb file path looks good
--ipaddr is correct for the E02




led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/dts/kirkwood-pogo_e02.dtb
load_dtb_addr=0x1c00000
Here's the bad file path for the .dtb file




And the last few lines of boot:
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=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
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
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: 3088/131068 bytes




So in console I did another setenv to re-fix the flie path
PogoE02> printenv load_dtb
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/dts/kirkwood-pogo_e02.dtb

PogoE02> setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb'




And then it worked...
PogoE02> boot
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'
...
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f42b000, end 0fb13f40 ... OK
   Loading Device Tree to 0f425000, end 0f42a8cb ... OK
Using machid 0xdd6 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f


... [[skipping most of this. let me know if you want to see the whole log]]


Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.


...


Listening on LPF/eth0/00:25:31:04:80:8c
Sending on   LPF/eth0/00:25:31:04:80:8c
Sending on   Socket/fallback
DHCPREQUEST of 192.168.0.14 on eth0 to 255.255.255.255 port 67
[   30.927742] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   37.344629] NET: Registered protocol family 10
[   37.353340] Segment Routing with IPv6
DHCPREQUEST of 192.168.0.14 on eth0 to 255.255.255.255 port 67
DHCPNAK from 192.168.222.1
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST of 192.168.222.168 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.222.168 from 192.168.222.1
DHCPACK of 192.168.222.168 from 192.168.222.1
bound to 192.168.222.168 -- renewal in 41465 seconds.
done.


...


[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1326 (klogd)
. ok
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 debian ttyS0

debian login:


root@debian:~# uname -a
Linux debian 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel GNU/Linux




I'm going to post this and then post fw_printenv separately...
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 04:46AM
bodhi Wrote:
-------------------------------------------------------
>
> That's why I showed above how to get a complete
> serial console input/output back without having to
> clear preboot env for netconsole. And also asked
> hughe for the envs so I can adjust them.

You posted this right as I was finishing my eventual success story. Here's fw_printenv, let me know if you want me to post anything else:
root@debian:~#
root@debian:~#
root@debian:~# fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
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
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
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
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=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=3542
machid=dd6
ethaddr=00:25:31:04:80:8C
disks=0 1 2 3 4 5 6 7
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.222.168
serverip=192.168.222.103
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
load_db=load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb
root@debian:~#
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 05:00AM
so it came down to a typo in the dtb location? eitherway, glad you are up an running
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 05:05AM
Is there supposed to be a load_db or just load_dtb?

I just noticed that I have both, wondering if that's me making a typo somewhere along the line or a legit env variable.
Re: Pogoplug E02 Debian Linux Installation Guide
October 22, 2017 05:13AM
feas Wrote:
-------------------------------------------------------
> so it came down to a typo in the dtb location?
> eitherway, glad you are up an running

Indeed. That's why it did not boot.

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

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 21 plus 25?
Message: