Welcome! Log In Create A New Profile

Advanced

Pogoplug V4 - Debian 10 (Buster)

Posted by dumdedumda 
Noobian1
Re: Pogoplug V4 - Debian 10 (Buster)
March 18, 2022 01:53PM
Hello all,

Bodhi

First of all thank you so much to keep this GOLD forum up and Running!

Apologies if this has been asked before, I do have only basic knowledge in terminal, I made 2 V4 devices that I'm using for PiHole. But I followed simplified instructions based on your work (https://github.com/pepaslabs/pogoplug-v4-bodhi-rootfs-debian/blob/master/README.md).

That was Debian 9 I was using, but June 2022 will be last security update. It worked easy that way, because I am familiar with Linux (DEB based) but GUI and less terminal. I tried many times to follow instructions here and update my kernel, but it gets confusing for someone who has only basic knowledge in terminal.

I found another s"simple" (READ: NOOB solution) here (https://github.com/susamn/debian-10-buster-pogoplug-v4) probably based on instructions here but simplified. I am using Debian based Linux systems (GUI) and I was bale to extend partition, create and copy or deploy image (.bin).

Long story short, Is there noob proof step by step how to create recent version V4 device (updated kernel, Debian, U-BOOT)? I tried to follow but for my understanding there is a many missing steps. Is there easier way to install U-BOOT & recent Debian on SD (ISO) or beginner friendly tutorial that we the green ones can follow? I really appreciate your work and your time Sir.!

====
bodhi's update: inserted breaks to make it easier to read.



Edited 1 time(s). Last edit at 03/18/2022 03:18PM by bodhi.
Re: Pogoplug V4 - Debian 10 (Buster)
March 18, 2022 03:41PM
Noobian1,

> Apologies if this has been asked before, I do have
> only basic knowledge in terminal,

I think you meant "basic knowledge in command line"

> I made 2 V4
> devices that I'm using for PiHole. But I followed
> simplified instructions based on your work
> (https://github.com/pepaslabs/pogoplug-v4-bodhi-rootfs-debian/blob/master/README.md).
>
>
> That was Debian 9 I was using, but June 2022 will
> be last security update. It worked easy that way,
> because I am familiar with Linux (DEB based) but
> GUI and less terminal. I tried many times to
> follow instructions here and update my kernel, but
> it gets confusing for someone who has only basic
> knowledge in terminal.
>
> I found another s"simple" (READ: NOOB solution)
> here
> (https://github.com/susamn/debian-10-buster-pogoplug-v4)
> probably based on instructions here but
> simplified. I am using Debian based Linux systems
> (GUI) and I was bale to extend partition, create
> and copy or deploy image (.bin).
>
> Long story short, Is there noob proof step by step
> how to create recent version V4 device (updated
> kernel, Debian, U-BOOT)? I tried to follow but for
> my understanding there is a many missing steps. Is
> there easier way to install U-BOOT & recent Debian
> on SD (ISO) or beginner friendly tutorial that we
> the green ones can follow?

Unfortunately, I don't have such procedure (ISO). I thought about this bit in the past, and decided not to do it. The reason is each Kirkwood SoC has a different u-boot, it is not possible to install it that way.

The Debian netinstall is one way to make it work, but it must be done for each box (Pogo V4, GoFlex Home,....) and there are about 15 Kirkwood boxes that I'm supporting here :)

So the bottom line is: if you have already run an older version of u-boot and Debian rootfs from my releases, you can either

1. upgrade Linux kernel and Debian in your rootfs using command line instruction

OR

2. Create a new rootfs using the bullseye tarball Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2. And you don't need to upgrade u-boot to run this new rootfs. The older u-boot should work just fine.

Both approaches require some knowledge of command line (running on terminal).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Noobian1
Re: Pogoplug V4 - Debian 10 (Buster)
March 18, 2022 07:45PM
Bodhi,

I appreciate your response and help.
I do have some basic knowledge in terminal. Devices that I am using are one (1) pink and (1) blue V4 Pogo.
I would like to proceed with 2nd option and recent Bullseye Debian. I can copy paste codes, understand basics and make it work, but I am not sure where to start. My devices are with older uboot, is there a way someone can help with net (wget) installation? I am also lost in steps between major commands (when to use SD when u-boot, I tried today updating kernel from 3.18 to 5.19 on buster and I lost ssh). Sorry if I'm asking for too much of simplification. Maybe these more detailed steps will be helpful for terminal starters like me. Many thanks and all the best
Noobian1
Re: Pogoplug V4 - Debian 10 (Buster)
March 25, 2022 11:02AM
Bodhi,

Is this method correct/acceptable?


#backup original kernel files
cd /boot
mkdir backup
mv *3.18* backup
mv uImage backup/uImage3.18
mv uInitrd backup/uInitrd3.18

..............................................

uInitrd
uImage
initrd.img-3.18.5-kirkwood-tld-1
System.map-3.18.5-kirkwood-tld-1
vmlinuz-3.18.5-kirkwood-tld-1
config-3.18.5-kirkwood-tld-1
dts/

..............................................

#download from bodhi's dropbox
wget --no-check-certificate https://www.dropbox.com/s/88bkl08z2djmpzk/linux-5.16.5-kirkwood-tld-1-bodhi.tar.bz2

#check md5
echo "ccb853d1d81eabe24f34cd228e92c2c3 linux-5.16.5-kirkwood-tld-1-bodhi.tar.bz2" |md5sum -c

#extract
cd /boot
tar -xvjf linux-5.16.5-kirkwood-tld-1-bodhi.tar.bz2
tar -xvf linux-dtb-5.16.5-kirkwood-tld-1.tar

#install kernel and headers
cd /boot
apt-get remove flash-kernel
dpkg -i linux-image-5.16.5-kirkwood-tld-1_1.0_armel.deb

#Generate new uImage and uInitrd with fdt file. No need to modify uboot env
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.16.5-kirkwood-tld-1 -d vmlinuz-5.16.5-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.16.5-kirkwood-tld-1 -d initrd.img-5.16.5-kirkwood-tld-1 uInitrd

#clean up
sync
sync
sync
shutdown -r now

#reboot and verify
uname -a


I tried this method but I lost SSH to device, and i was not able to see if boot properly, Light on my V4 Pink Pogo device was kinda Yellow (I didn't saw this before).

Please let me know if my simplified is correct

Thank you Sir!
Re: Pogoplug V4 - Debian 10 (Buster)
March 25, 2022 04:33PM
Noobian1,

> Is this method correct/acceptable?

Yes, the steps look all correct. However, there are preparation steps in between that are quite important and were omitted.


> I tried this method but I lost SSH to device, and
> i was not able to see if boot properly, Light on
> my V4 Pink Pogo device was kinda Yellow (I didn't
> saw this before).

Yellow/amber LED means the kernel has not complete booting. If it were, then LED is solid green.

And if the LED was solid green, but no SSH, then the rootfs was not mounted successfully.

=====

Now there are a few questions and troubleshooting steps for you.

1. What is the u-boot version you installed on this box? Look back to the original instruction and find out.

2. Boot into kernel 3.18.5-kirkwood-tld-1 like before, and

cd /boot
ls -lart
cat /etc/fw_env.config
fw_printenv
cat /etc/fstab
e2label /dev/mmcblk0p1
e2label /dev/sda1
Note that if your rootfs is on SD card then the command e2label /dev/mmcblk0p1 will work, if your rootfs is on USB then e2label /dev/sda1 will work. But one of these 2 will fail and output error.

Post the log of everything done in step 2 above. When you post the log, just copy/paste the whole thing to a new post here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Noobian1
Re: Pogoplug V4 - Debian 10 (Buster)
March 28, 2022 07:37AM
Hi Bodhi,

Thank you for your assistance. Please see below.

*********************************************************
root@DebianPogoPink:/boot# ls -lart
total 41200
-rwxr-xr-x  1 root root 2865600 Feb  5  2015 zImage-3.18.5-kirkwood-tld-1
drwxr-xr-x  2 root root    4096 Feb  5  2015 dts
-rw-r--r--  1 root root  131204 Feb  6  2015 config-3.18.5-kirkwood-tld-1
-rw-r--r--  1 root root 2019506 Feb  6  2015 System.map-3.18.5-kirkwood-tld-1
-rwxr-xr-x  1 root root 2865600 Feb  6  2015 vmlinuz-3.18.5-kirkwood-tld-1
-rw-r--r--  1 root root 9460784 Feb  6  2015 linux-headers-3.18.5-kirkwood-tld-1_1_armel.deb
-rw-r--r--  1 root root 2865664 Feb  8  2015 uImage.orig
-rw-r--r--  1 root root 6535284 Feb 18  2015 uInitrd
-rwxr-xr-x  1 root root 2875628 Nov 10  2015 zImage.fdt
-rw-r--r--  1 root root 2875692 Nov 10  2015 uImage
drwxr-xr-x 21 root root    4096 Mar 22 12:42 ..
-rw-r--r--  1 root root 9583807 Mar 22 12:55 initrd.img-3.18.5-kirkwood-tld-1
drwxr-xr-x  3 root root    4096 Mar 22 12:55 .


******************************************************************************

root@DebianPogoPink:/boot# cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000


******************************************************************************

root@DebianPogoPink:/boot# fw_printenv
ipaddr=192.168.0.231
serverip=192.168.0.220
baudrate=115200
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
ethaddr=00:25:31:04:2d:26
arcNumber=3960
machid=F78
usb_rootfstype=ext3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
bootcmd=run bootcmd_mmc; run bootcmd_usb; run bootcmd_sata; run bootcmd_pogo; reset

root@DebianPogoPink:/boot#

***************************************************************
root@DebianPogoPink:/boot# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mmcblk0p1


***************************************************************

root@DebianPogoPink:/boot# e2label /dev/mmcblk0p1
rootfs

root@DebianPogoPink:/boot#

**************************************************************

root@DebianPogoPink:/boot# e2label /dev/sda1
e2label: No such file or directory while trying to open /dev/sda1
Couldn't find valid filesystem superblock.

root@DebianPogoPink:/boot#

*************************************************************

I hope this is good enough.

e2label: No such file or directory while trying to open /dev/sda1
Couldn't find valid filesystem superblock. Im assuming my system is on SD card.

I saved SD image of system prior to " linux image update ". This is now My Stock system, with Debian 10, only PiHole installed. My goal was to update only Kernel and stay with Debian 10 for some time or as you mention update to Bullseye an be good with that kernel integration. I am using device predominantly for PiHole blocker. But if there is a simple solution for small home server I can make a backup and use one for that.

Let me know your thoughts Sir

Regards,

======
moderator edit: please use code tags (i.e. formatted code button) to post log.



Edited 1 time(s). Last edit at 03/28/2022 06:30PM by bodhi.
Re: Pogoplug V4 - Debian 10 (Buster)
March 28, 2022 07:17PM
OK, so the log has confirmed that the installed u-boot version is quite old (probably circa 2014).

The u-boot envs in this version will have problem booting the latest kernel. The kernel files size have grown quite a bit since then. This is why you saw yellow/amber LED.

The immediate 2-step remedy to allow booting the kernel on the rootfs Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2.

1. Create a new rootfs on another SD card.

Format a new SD card like you did back in 2015.

Make sure that the rootfs Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is created with Step 4 done, as described in the release thread:
https://forum.doozan.com/read.php?2,12096

Your Step 4 should look like this:
Generate the uImage with DTB embedded inside: 

cd /media/sdb1/boot
cp -a zImage-5.13.6-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-pogoplug_v4.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.13.6-kirkwood-tld-1 -d zImage.fdt  uImage
sync

If you'd like, you can copy and paste the whole log while you're creating the rootfs here. I'll review it before you proceed to the next step below.

2. Connect serial console.

Note that you don't have serial console connected to recover from any problem messing with u-boot or u-boot envs. My recommendation is to connect serial console first before changing u-boot envs like I show you in the 2 fw_setenv commands below.
https://varkey.in/seagate-goflex-net-serial-connection/
http://forum.doozan.com/read.php?8,13263
http://geeksmith.blogspot.com/2017/02/adding-jst-serial-connector-to-pogoplug.html

OK. With that said, if you are willing to connect serial console later to recover from any mistake (caused by typo, power outage, or my mistake...), then proceed.

3. Change 2 u-boot envs to allow it to boot the new Debian rootfs. Note that these changes are also good for your current rootfs, too.

Boot with your current SD card. Log in, and at command line, set these 2 envs

fw_setenv mmc_boot 'mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x2100000; else bootm 0x800000; fi'
fw_setenv mmc_load_uinitrd 'ext2load mmc $device 0x2100000 /boot/uInitrd'

And then list the envs again to verify
fw_printenv

Assume every thing went fine (you could post the log of these 2 commands execution here for me to review if you're extremely careful).

You can shutdown the Pogo:
sync
sync
shutdown -h now

And remove the current SD card, insert the new SD card with with the rootfs Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 and power up.

Observe the LED light. It will start blinking green rapidly, and then turn yellow/amber, and then become solid green. From this moment, wait 20 seconds and then look for the new IP address in your network.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Noobian1
Re: Pogoplug V4 - Debian 10 (Buster)
March 29, 2022 06:43AM
Hi Bodhi,

Thank you very much for this tutorial. I placed the order for another 32GB SD Card and I will try this guide. And Yes Sir, I do have serial console on both devices. I will update this thread once I have results.

Thank you!
Re: Pogoplug V4 - Debian 10 (Buster)
March 29, 2022 03:13PM
Noobian1,

> I do have serial console
> on both devices.

In that case, you should try kwboot as described in this post first:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

The u-boot version you need to use is uboot.2017.07-tld-1.pogo_v4.mtd0.kwb.

U-boot release thread:

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

This tarball

Quote

uboot.2017.07-tld-1.pogo_v4.bodhi.tar
md5
e2c2b4927dcd8189f0c97dd81b72ad7e
sha256
18f856d2106aabe6029331358fb06f053ea9257ad896e2d382f4f096f93c46e9

The above procedure is to load the new u-boot image over serial line and run it. kwboot binary is availble on you Linux laptop/desktop. If you can run rhis successfully, then the box is almost unbrickable.

=====

With serial console, you don't need to rely on the LED to see the booting progress. Everything is output to the serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Noobian1
Re: Pogoplug V4 - Debian 10 (Buster)
March 30, 2022 09:16AM
Hi Bodhi,

I'll bring my DSD TECH [SH-U09C5] USB to TTL UART Converter and will try that way, my SD card is coming today so I can play around too. I left soldered wires inside in case of bricking on both devices.

Tank you Sir!
Re: Pogoplug V4 - Debian 10 (Buster)
August 19, 2022 05:46AM
Bodhi,

I'd like to upgrade my Pogoplug V4 to the latest kernel & rootfs.

"uname -r" yields
Quote
root@debian:~# uname -r 5.13.6-kirkwood-tld-1
I assume the displayed info is referring to the rootfs version. If so, what is the command to check for the kernel version? (Sorry, I know it's a rather simple question, but I Googled forums.doozan.com earlier to try to find an answer before resorting to this post.)

I followed instructions "dpkg -i linux-image-5.18.6-kirkwood-tld-1_1.0_armel.deb" earlier in an attempt to perform an upgrade to the latest version, but the process soft-bricked the device. (Thankfully I had backed up the /boot directory, which I restored to the SD card.)
Re: Pogoplug V4 - Debian 10 (Buster)
August 19, 2022 03:37PM
dumdedumda ,

Quote

root@debian:~# uname -r
5.13.6-kirkwood-tld-1"

It is referring to the kernel version currently installed in the rootfs. From this, you should be able to upgrade the kernel to the latest version.

> If so, what is the command
> to check for the kernel version?

uname -r
or
uname -a

-r is just showing the version name, -a shows build date, compiler,...

> I followed instructions "dpkg -i
> linux-image-5.18.6-kirkwood-tld-1_1.0_armel.deb"
> earlier in an attempt to perform an upgrade to the
> latest version, but the process soft-bricked the
> device

How big is your initrd image on this rootfs? Get the /boot file listing sorted by date in reverse:
cd /boot
ls -larth

The lates kernel release notes mentioned watching out for the initrd size.

Quote

Updated Jun 25 Apr 2022:

Kernel linux-5.18.6-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- General kernel upgrade
- See new Important Note in Step 5 about uInitrd size.

......
5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, see Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.
....

If initrd is smaller than 11MB, then it is something else. Let me see what the listing in your /boot show and we'll go from there.

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