Welcome! Log In Create A New Profile

Advanced

Pogoplug Mobile Debian Install

Posted by cdlenfert 
Pogoplug Mobile Debian Install
September 01, 2018 02:27PM
I'm in the process of installing Debian on a Pogoplug mobile running the stock OS. I'm trying to get all my ducks in a row with complete instructions before I jump in. I'm cross referencing Bodhi's threads for rootfs and uboot with Qui Hong's old guides on qnology.com.

I'm interested in retaining the stock Pogoplug OS as a backup system in case my rootfs USB or SD card fails and I'm wondering if Qui's instructions still hold up considering I'm using the newest rootfs and uboot files from Bodhi.The instructions are here. The concept is "Chain Loading" the original stock uboot. Will this work?

Boot default Pogoplug OS when USB/SD Card not attached

Note that this section only works on a new unmodified Pogoplug. It assumes the command are all executed from within the default Pogoplug OS and not from Arch Linux or Debian.

If you previously installed the uBoot from archlinuxarm.org and/or already running ALARM or Debian, use these instructions instead - Pogoplug v4 - Add option to boot default Pogoplug OS when USB/SD Card is Not Attached.

To boot the default Pogoplug OS, we will need to chain load the original (dockstar) uboot which we'll download and store on the internal flash. The boot order will be USB, MMC/SD, SATA (Series 4 only) and then last, the original uBoot which will then load the default Pogoplug OS.

Don't forget that you'll need to activate the Pogoplug on my.pogoplug.com if you plan on SSHing into the default Pogoplug OS.

#remount '/' as read/write
mount -o remount,rw /

#download original uboot
cd /
wget http://download.doozan.com/uboot/files/uboot/uboot.mtd0.dockstar.original.kwb

#update boot order to include pogoplug OS
/tmp/fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset'

#chain load original uboot
/tmp/fw_setenv bootcmd_pogo 'if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi'
Re: Pogoplug Mobile Debian Install
September 01, 2018 02:36PM
cdlenfert ,

Chailoading looks OK for booting. But it will not be running correctly as Pogo V4. Using stock tis way only as a rescue system is OK.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 01, 2018 03:09PM
Thanks for the confirmations. I'm not sure I understand what exactly you mean by...
Quote
But it will not be running correctly as Pogo V4

I'd expect to primarily be running Debian, but in the event the rootfs drive fails and I remove it, it would fall back to Pogo OS as a rescue system right? Would it be my current stock OS which already has SSH enabled, or would I have to find a way to enable SSH again (I did this initially via serial cable). Or are you just saying that since it's using the dockstar uboot it's not truly running as a Pogoplug v4, but some sort of franken-plug. My only concern would be getting SSH access so I could easily format and setup another rootfs drive.

Thanks for any clarification
Re: Pogoplug Mobile Debian Install
September 01, 2018 03:55PM
cdlenfert,

> it would fall back to Pogo OS as a rescue system
> right?

Right.

> Would it be my current stock OS which
> already has SSH enabled, or would I have to find a
> way to enable SSH again (I did this initially via
> serial cable).

As far as SSH it should work as before with your current stock OS.

> Or are you just saying that since
> it's using the dockstar uboot it's not truly
> running as a Pogoplug v4, but some sort of
> franken-plug.

So to speak. Some harware info passed from u-boot to the kernel will not be quite correct. But it should work well enough as a rescue system.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 01, 2018 04:42PM
Thank you again. I've added it to my install process. I'll give it all a go later tonight or tomorrow.



Edited 1 time(s). Last edit at 09/01/2018 04:58PM by cdlenfert.
Re: Pogoplug Mobile Debian Install
September 01, 2018 07:56PM
One more question. It says to ask if I'm not sure and I'm not. Step F from https://forum.doozan.com/read.php?3,12381

++++++++++++++

f. Adjust the DTB name to boot with a rootfs that has FDT kernel 3.17+ (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'


In the special case when you are booting with a non-FDT kernel 3.16 or earlier, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
fw_setenv dtb_file

+++++++++++

The part in bold is what I'm not sure about. Also in Qui's guide there is no equivalent step to fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' or mention of a dtb file.
Re: Pogoplug Mobile Debian Install
September 01, 2018 08:06PM
cdlenfert,

Stock OS is very old. So there is no DTB file to worry about. That instruction is for when you run stock u-boot with the new Debian rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 01, 2018 08:09PM
Good to know and thanks for clarifying. Out of curiosity why would anyone choose to run the old stock u-boot. I've seen it mentioned in the instructions, but don't understand the "advantages".

Thanks!
Re: Pogoplug Mobile Debian Install
September 01, 2018 08:17PM
cdlenfert Wrote:
-------------------------------------------------------
> Good to know and thanks for clarifying. Out of
> curiosity why would anyone choose to run the old
> stock u-boot. I've seen it mentioned in the
> instructions, but don't understand the
> "advantages".
>
> Thanks!

There is no advantage, there are only disadvantages :) Some users might be risk averse and run Debian with stock u-boot to make sure they can go back to stock. However, that would limit quite a bit of what they can do with the box (eg. no Ext4 and >2TB HDD).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 01, 2018 10:51PM
I hit a snag. I admittedly don't do this sort of thing too often, but I can't get a correct MD5 hash on the first file I've downloaded to the Pogo. In this case it's uboot.2017.07-tld-1.pogo_v4.bodhi.tar

[root@PogoplugMobile /tmp]# ls
flash_erase                            hbplug.log                             resolv.conf
fw_printenv                            nanddump                               uboot.2017.07-tld-1.pogo_v4.bodhi.tar
fw_setenv                              nandwrite                              var
[root@PogoplugMobile /tmp]# md5sum uboot.2017.07-tld-1.pogo_v4.bodhi.tar 
62b5bf1fc998b35626bdca6106677fbd  uboot.2017.07-tld-1.pogo_v4.bodhi.tar
[root@PogoplugMobile /tmp]#

I'm expecting the following per - https://forum.doozan.com/read.php?3,12381

uboot.2017.07-tld-1.pogo_v4.bodhi.tar
md5
e2c2b4927dcd8189f0c97dd81b72ad7e

When I check the file on my mac after downloading from Dropbox I get the correct hash. I also get the correct hash when I download the same file I have hosted on my own server (this is where I wget the file from when I download to the Pogo

Am I missing something obvious? Why wouldn't these hashes match? I've downloaded multiple times and still get the same 62b5bf1fc998b35626bdca6106677fbd hash.

Thanks for any input
Re: Pogoplug Mobile Debian Install
September 02, 2018 02:59AM
Update: In this case I'm also seeing the same hash for multiple files
[root@PogoplugMobile /tmp]# md5sum uboot.2017.07-tld-1.pogo_v4.bodhi.tar 
62b5bf1fc998b35626bdca6106677fbd  uboot.2017.07-tld-1.pogo_v4.bodhi.tar
[root@PogoplugMobile /tmp]# md5sum uboot.2016.05-tld-1.environment.bodhi.tar 
62b5bf1fc998b35626bdca6106677fbd  uboot.2016.05-tld-1.environment.bodhi.tar
Re: Pogoplug Mobile Debian Install
September 02, 2018 03:53AM
cdlenfert ,

That's very strange! I have no idea why.

Quote

When I check the file on my mac after downloading from Dropbox I get the correct hash. I also get the correct hash when I download the same file I have hosted on my own server (this is where I wget the file from when I download to the Pogo

Try downloading the Dropbox file directly to you Pogo (instead of from your server).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 02, 2018 07:06AM
Thanks. I tried that and can't pull it down of https. I don't think my version of wget on stock pogo (from 2011 because it's not possible to update the pogo OS anymore) supports it. Also when I pull from dropbox or my server and check the MD5 hash on my Mac, it's correct on both files. Could my wget on the pogo be messing up the file from my server? I've also confirmed the files are likely identical based on their file size on my pogo, so something strange is happening with the wget (code at the bottom of this post)

[root@PogoplugMobile /root]# wget --no-check-certificate https://www.dropbox.com/s/6k3a80jqdplpkeg/uboot.2017.07-tld-1.pogo
_v4.bodhi.tar
wget: unrecognized option `--no-check-certificate'
Usage: wget [OPTION]... ...

Try `wget --help' for more options.
[root@PogoplugMobile /root]# wget --help
GNU Wget 1.12, a non-interactive network retriever.
Usage: wget [OPTION]... ...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version           display the version of Wget and exit.
  -h,  --help              print this help.
  -b,  --background        go to background after startup.
  -e,  --execute=COMMAND   execute a `.wgetrc'-style command.

Logging and input file:
  -o,  --output-file=FILE    log messages to FILE.
  -a,  --append-output=FILE  append messages to FILE.
  -d,  --debug               print lots of debugging information.
  -q,  --quiet               quiet (no output).
  -v,  --verbose             be verbose (this is the default).
  -nv, --no-verbose          turn off verboseness, without being quiet.
  -i,  --input-file=FILE     download URLs found in local or external FILE.
  -F,  --force-html          treat input file as HTML.
  -B,  --base=URL            resolves HTML input-file links (-i -F)
                             relative to URL.

Download:
  -t,  --tries=NUMBER            set number of retries to NUMBER (0 unlimits).
       --retry-connrefused       retry even if connection is refused.
  -O,  --output-document=FILE    write documents to FILE.
  -nc, --no-clobber              skip downloads that would download to
                                 existing files.
  -c,  --continue                resume getting a partially-downloaded file.
       --progress=TYPE           select progress gauge type.
  -N,  --timestamping            don't re-retrieve files unless newer than
                                 local.
  -S,  --server-response         print server response.
       --spider                  don't download anything.
  -T,  --timeout=SECONDS         set all timeout values to SECONDS.
       --dns-timeout=SECS        set the DNS lookup timeout to SECS.
       --connect-timeout=SECS    set the connect timeout to SECS.
       --read-timeout=SECS       set the read timeout to SECS.
  -w,  --wait=SECONDS            wait SECONDS between retrievals.
       --waitretry=SECONDS       wait 1..SECONDS between retries of a retrieval.
       --random-wait             wait from 0...2*WAIT secs between retrievals.
       --no-proxy                explicitly turn off proxy.
  -Q,  --quota=NUMBER            set retrieval quota to NUMBER.
       --bind-address=ADDRESS    bind to ADDRESS (hostname or IP) on local host.
       --limit-rate=RATE         limit download rate to RATE.
       --no-dns-cache            disable caching DNS lookups.
       --restrict-file-names=OS  restrict chars in file names to ones OS allows.
       --ignore-case             ignore case when matching files/directories.
  -4,  --inet4-only              connect only to IPv4 addresses.
  -6,  --inet6-only              connect only to IPv6 addresses.
       --prefer-family=FAMILY    connect first to addresses of specified family,
                                 one of IPv6, IPv4, or none.
       --user=USER               set both ftp and http user to USER.
       --password=PASS           set both ftp and http password to PASS.
       --ask-password            prompt for passwords.
       --no-iri                  turn off IRI support.
       --local-encoding=ENC      use ENC as the local encoding for IRIs.
       --remote-encoding=ENC     use ENC as the default remote encoding.

Directories:
  -nd, --no-directories           don't create directories.
  -x,  --force-directories        force creation of directories.
  -nH, --no-host-directories      don't create host directories.
       --protocol-directories     use protocol name in directories.
  -P,  --directory-prefix=PREFIX  save files to PREFIX/...
       --cut-dirs=NUMBER          ignore NUMBER remote directory components.

HTTP options:
       --http-user=USER        set http user to USER.
       --http-password=PASS    set http password to PASS.
       --no-cache              disallow server-cached data.
       --default-page=NAME     Change the default page name (normally
                               this is `index.html'.).
  -E,  --adjust-extension      save HTML/CSS documents with proper extensions.
       --ignore-length         ignore `Content-Length' header field.
       --header=STRING         insert STRING among the headers.
       --max-redirect          maximum redirections allowed per page.
       --proxy-user=USER       set USER as proxy username.
       --proxy-password=PASS   set PASS as proxy password.
       --referer=URL           include `Referer: URL' header in HTTP request.
       --save-headers          save the HTTP headers to file.
  -U,  --user-agent=AGENT      identify as AGENT instead of Wget/VERSION.
       --no-http-keep-alive    disable HTTP keep-alive (persistent connections).
       --no-cookies            don't use cookies.
       --load-cookies=FILE     load cookies from FILE before session.
       --save-cookies=FILE     save cookies to FILE after session.
       --keep-session-cookies  load and save session (non-permanent) cookies.
       --post-data=STRING      use the POST method; send STRING as the data.
       --post-file=FILE        use the POST method; send contents of FILE.
       --content-disposition   honor the Content-Disposition header when
                               choosing local file names (EXPERIMENTAL).
       --auth-no-challenge     send Basic HTTP authentication information
                               without first waiting for the server's
                               challenge.

FTP options:
       --ftp-user=USER         set ftp user to USER.
       --ftp-password=PASS     set ftp password to PASS.
       --no-remove-listing     don't remove `.listing' files.
       --no-glob               turn off FTP file name globbing.
       --no-passive-ftp        disable the "passive" transfer mode.
       --retr-symlinks         when recursing, get linked-to files (not dir).

Recursive download:
  -r,  --recursive          specify recursive download.
  -l,  --level=NUMBER       maximum recursion depth (inf or 0 for infinite).
       --delete-after       delete files locally after downloading them.
  -k,  --convert-links      make links in downloaded HTML or CSS point to
                            local files.
  -K,  --backup-converted   before converting file X, back up as X.orig.
  -m,  --mirror             shortcut for -N -r -l inf --no-remove-listing.
  -p,  --page-requisites    get all images, etc. needed to display HTML page.
       --strict-comments    turn on strict (SGML) handling of HTML comments.

Recursive accept/reject:
  -A,  --accept=LIST               comma-separated list of accepted extensions.
  -R,  --reject=LIST               comma-separated list of rejected extensions.
  -D,  --domains=LIST              comma-separated list of accepted domains.
       --exclude-domains=LIST      comma-separated list of rejected domains.
       --follow-ftp                follow FTP links from HTML documents.
       --follow-tags=LIST          comma-separated list of followed HTML tags.
       --ignore-tags=LIST          comma-separated list of ignored HTML tags.
  -H,  --span-hosts                go to foreign hosts when recursive.
  -L,  --relative                  follow relative links only.
  -I,  --include-directories=LIST  list of allowed directories.
  -X,  --exclude-directories=LIST  list of excluded directories.
  -np, --no-parent                 don't ascend to the parent directory.

Mail bug reports and suggestions to <bug-wget@gnu.org>.

[root@PogoplugMobile /tmp]# du -a -h
4.0K	./uboot.2016.05-tld-1.environment.bodhi.tar
4.0K	./uboot.2017.07-tld-1.pogo_v4.bodhi.tar
4.0K	./fw_setenv
4.0K	./fw_printenv
4.0K	./flash_erase
4.0K	./nandwrite
4.0K	./nanddump

[root@PogoplugMobile /tmp]# wget http://www.lenfertdesign.com/pogo/pogo-mobile-v4-debian/uboot.2017.07-tld-1.pogo_v4.bodhi.
tar
--2018-09-02 13:04:15--  http://my.domain.com/pogo/pogo-mobile-v4-debian/uboot.2017.07-tld-1.pogo_v4.bodhi.tar
Resolving my.domain.com... 162.215.248.223
Connecting to my.domain.com|162.215.248.223|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `uboot.2017.07-tld-1.pogo_v4.bodhi.tar.1'

    [ <=>                                                                              ] 7           --.-K/s   in 0s      

2018-09-02 13:04:16 (204 KB/s) - `uboot.2017.07-tld-1.pogo_v4.bodhi.tar.1' saved [7]

the .1 extension on the file name is only because I already have this file on my pogo. Otherwise the original wget command is the same. I've also changed my domain name in the output above in oder to not publicly share it.
Re: Pogoplug Mobile Debian Install
September 02, 2018 10:55AM
Is lenfertdesign.com your server? If I try to download from that link I get a 7 byte file with checksum 62b5bf1fc998b35626bdca6106677fbd. In fact, if I try to download anything from lenfertdesign.com I get the same 7 byte file.
root@debian:/tmp#wget http://www.lenfertdesign.com/pogo/asdf
--2018-09-02 12:51:20--  http://www.lenfertdesign.com/pogo/asdf
Resolving www.lenfertdesign.com (www.lenfertdesign.com)... 162.215.248.223
Connecting to www.lenfertdesign.com (www.lenfertdesign.com)|162.215.248.223|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘asdf’

asdf                    [ <=>                 ]       7  --.-KB/s   in 0s

2018-09-02 12:51:20 (24.0 KB/s) - ‘asdf’ saved [7]

root@debian:/tmp# md5sum asdf
62b5bf1fc998b35626bdca6106677fbd  asdf
root@debian:/tmp# ls -la asdf
-rw-r--r-- 1 root root 7 Sep  2 12:51 asdf

What if you try this:
wget -O uboot.2017.07-tld-1.pogo_v4.bodhi.tar "https://uc5f8764e008f7aeaba73ca1b4a6.dl.dropboxusercontent.com/cd/0/get/APhyv697J7wTOENnB6WcJg5b_EXQ1dpa-44H7s5-UQVMRIueq1snIeQ8ByMn7TOVn8e4mvZEyWlAYue_LP0PgBSlx4TcgpN67S2IK2f8V4HupICRlY2RlB-aQBSgKGDgT0MRMSlm_3greMlLMXhSn6sxqOAsfhiEbvbAmq2QRs6vaakqqJel6Y43fJwR3wuFgOo/file?_download_id=124575681663902872012049707605899692080703948951554099193509579131&_notify_domain=www.dropbox.com&dl=1";
-JT
Re: Pogoplug Mobile Debian Install
September 02, 2018 03:44PM
Thanks renojim (JT).

The issue was with the domain. My hosting company recently disbanded and pawned my account over to a new host and things are pretty jacked up and confusing. I was able to get to the correct files and they are validating now. Thanks for taking a look

Now for my next stumper. I'm unable to overwrite my ethernet address. The last 2 commands show where it fails to overwrite. How big of a problem is this?

[root@PogoplugMobile /root]# cat /sys/class/net/eth0/address
00:25:31:03:49:49

#from router
#00:25:31:03:49:49 (matches above) also matches sticker on Pogo

[root@PogoplugMobile /tmp]# /tmp/fw_printenv ethaddr
ethaddr=52:3b:20:9c:11:51
#!!! this is different than what I had before

[root@PogoplugMobile /tmp]# /tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
Can't overwrite "ethaddr"

[root@PogoplugMobile /tmp]# /tmp/fw_setenv ethaddr "00:25:31:03:49:49"
Can't overwrite "ethaddr"
Re: Pogoplug Mobile Debian Install
September 02, 2018 03:49PM
Also if I could get another set of eyes on the fw_printenv output to make sure I'v got things set up right, or if there's an existing file to check against, that would be awesome.

[root@PogoplugMobile /tmp]# /tmp/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
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
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
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
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=3960
machid=f78
usb_rootfstype=ext3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
Re: Pogoplug Mobile Debian Install
September 02, 2018 03:56PM
1. Your envs has some problem.

This should be the pogoplug_v4.dtb
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb

2. Your ethaddr is currently set to a local MAC address (default in u-boot envs image). After you booted into Debian, you can change to the real one.

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



Edited 2 time(s). Last edit at 09/02/2018 04:02PM by bodhi.
Re: Pogoplug Mobile Debian Install
September 02, 2018 03:59PM
Awesome! any problem with the MAC address not matching the sticker? and me not being able to change it with fw_printenv?

... quoted from above

Now for my next stumper. I'm unable to overwrite my ethernet address. The last 2 commands show where it fails to overwrite. How big of a problem is this? 

[root@PogoplugMobile /root]# cat /sys/class/net/eth0/address
00:25:31:03:49:49

#from router
#00:25:31:03:49:49 (matches above) also matches sticker on Pogo

[root@PogoplugMobile /tmp]# /tmp/fw_printenv ethaddr
ethaddr=52:3b:20:9c:11:51
#!!! this is different than what I had before

[root@PogoplugMobile /tmp]# /tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
Can't overwrite "ethaddr"

[root@PogoplugMobile /tmp]# /tmp/fw_setenv ethaddr "00:25:31:03:49:49"
Can't overwrite "ethaddr"



Edited 1 time(s). Last edit at 09/02/2018 03:59PM by cdlenfert.
Re: Pogoplug Mobile Debian Install
September 02, 2018 04:02PM
cdlenfert Wrote:
-------------------------------------------------------
> Awesome! any problem with the MAC address not
> matching the sticker? and me not being able to
> change it with fw_printenv?
>
> ... quoted from above
>
>
> Now for my next stumper. I'm unable to overwrite
> my ethernet address. The last 2 commands show
> where it fails to overwrite. How big of a problem
> is this? 
> 
> [root@PogoplugMobile /root]# cat
> /sys/class/net/eth0/address
> 00:25:31:03:49:49
> 
> #from router
> #00:25:31:03:49:49 (matches above) also matches
> sticker on Pogo
> 
> [root@PogoplugMobile /tmp]# /tmp/fw_printenv
> ethaddr
> ethaddr=52:3b:20:9c:11:51
> #!!! this is different than what I had before
> 
> [root@PogoplugMobile /tmp]# /tmp/fw_setenv ethaddr
> "$(cat /sys/class/net/eth0/address)"
> Can't overwrite "ethaddr"
> 
> [root@PogoplugMobile /tmp]# /tmp/fw_setenv ethaddr
> "00:25:31:03:49:49"
> Can't overwrite "ethaddr"
>

See my modified post above.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 02, 2018 04:08PM
Cool. thanks. I see that I'll need to create the rootfs before I can set the correct dtb file
I imagine I'll have to do something like this
fw_setenv dtb_file '/boot/dts/pogoplug_v4.dtb'

swapping in (if needed) the exact file name for the pogoplug v4 dtb file that resides in /boot/dts

Sound correct?
Re: Pogoplug Mobile Debian Install
September 02, 2018 04:20PM
cdlenfert,

> I see that I'll need to create the
> rootfs before I can set the correct dtb file

Incorrect. This can be set during u-boot installation. Right after you flash the default envs image, and have the correct /etc/fw_env.config in stock OS.

fw_setenv dtb_file '/boot/dts/kirkwood-pogoplug_v4.dtb'


Yes.

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



Edited 1 time(s). Last edit at 09/02/2018 04:57PM by bodhi.
Re: Pogoplug Mobile Debian Install
September 02, 2018 05:49PM
thanks for the update on the .dtb name for the pogo mobile. I've mad that adjustment. What I meant before was that I wouldn't know what file name to put without having the file on my rootfs drive. I tried unzipping the rootfs file from dropbox to see the structure but I couldn't unzip it on my Mac.
Re: Pogoplug Mobile Debian Install
September 02, 2018 07:50PM
the last thing I want to check before attempting a reboot goes back to chain loading the pogo OS as a rescue system:

Qui's
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_pogo; reset

Bodhi's
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec

Because these are so different I wanted to be extra sure this is ok and won't cause any boot issues. Thanks again for any confirmation that this will run. I'm hesitant because I see no reference to "bootcmd_usb" or "bootcmd_mmc" outside of Qui's "bootcmd=" param.
Re: Pogoplug Mobile Debian Install
September 03, 2018 01:27PM
Try,

fw_setenv bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi'
fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo'

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 03, 2018 02:05PM
Thank you. That's quite different. I'm curious to know why the bootcmd_exec was expanded in this way. But I've updated regardless :)

Final fw_printenv for reference

[root@PogoplugMobile /]# /tmp/fw_printenv 
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
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=3960
machid=f78
usb_rootfstype=ext3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo
Re: Pogoplug Mobile Debian Install
September 03, 2018 03:00PM
This definition of the bootcmd_exec is something I forgot to do in the 2016.05-tld-1 envs. It enables the execution to exit gracefully when any of the load commands has error (usually because the rootfs drive is corrupted or unplugged). So if any of the load fails, bootcmd_exec will end like it was successful, and enable the bootcmd to continue executing.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug Mobile Debian Install
September 03, 2018 03:06PM
very cool.

And BTW it all worked! I rebooted into Debian and had SSH access and then was able to unplug the USB and SSH back into stock Pogoplug OS. Thanks for all the help along the way and wonderful files and guides. If there's any interest I'm happy to post a complete set of commands to take Pogoplug Mobile from stock to Debian with a recovery stock OS.
Re: Pogoplug Mobile Debian Install
September 06, 2018 08:02PM
Things are working great with the USB rootfs drive. It's an 8GB flash drive. I'd like to move to an SD, but I'm not sure the best approach to take to clone everything over. I'm also fine starting from scratch with a new rootfs, but I'd rather clone if I can. I could make a backup image on my mac, and restore it to an SD card using something like Etcher, but I think that would require an 8GB SD card as the backup image will be that size. Or could just copy over all of the files and rename the drive on another linux device (raspberry pi for example). Thanks for a point in the right direction. I've seen threads on the forum, but I'm not sure they apply directly to my situation and I don't want to botch my working rootfs just in case.
Re: Pogoplug Mobile Debian Install
September 06, 2018 09:07PM
You can use use tar to copy Unix Directory trees on the same server or across servers.



Edited 1 time(s). Last edit at 09/06/2018 09:07PM by habibie.
Re: Pogoplug Mobile Debian Install
September 06, 2018 10:34PM
cdlenfert,

See the Wiki thread:
https://forum.doozan.com/read.php?2,23630

Quote

Backup and Cloning rootfs

CrashPlan 4.3.0
Backup/Restore rootfs using tar command
Adjust udev rules after cloning rootfs
Stock Pogoplug rootfs
How to clone a rootfs from one Kirkwood box to another: Step 1 and Step 2
How to clone SATA rootfs to USB rootfs

Basically, the cloning is the same as from USB to USB. The only minor difference is during the backup/restoring (on another Linux box), your target drive being SD card, will be mounted at a different device letter (e.g. mmcblk0p1).

Quote

To restore it later when needed, use the same command that I have in the instruction in the first post. For example:

cd /media/mmcblk0p1
tar -xjf /media/sda1/my-rootfs.tar.bz2

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



Edited 1 time(s). Last edit at 09/06/2018 10:58PM by bodhi.
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: