Welcome! Log In Create A New Profile

Advanced

Linux Kernel cleanup question

Posted by dumdedumda 
Linux Kernel cleanup question
August 21, 2022 05:03PM
Hi Bodhi,

What would be the best way to restore a Pogoplug V4 back to its default kernel settings (with all settings restored, packages removed, etc.)? I.e. a fresh installed image of linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2.

Would I just redownload linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2 and run "dpkg -i linux-image-5.18.6-kirkwood-tld-1_1.0_armel.deb" under /boot?

Btw, currently have both the latest released kernel & rootfs installed: linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2 (Jun 25 Apr 2022) & Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (26 Sept 2021)

Thank you.

Sorry please delete this post. Just saw the following after I had posted.

Kernel linux-5.18.6-kirkwood-tld-1 package has been uploaded.

See 1st post for download link.

And please create a new thread for any installation problem or question.

-bodhi



Edited 3 time(s). Last edit at 08/21/2022 05:58PM by bodhi.
Re: Linux Kernel cleanup question
August 21, 2022 06:13PM
dumdedumda,

That's OK! I usually close the topic but somehow forgot to do that.

> What would be the best way to restore a Pogoplug
> V4 back to its default kernel settings (with all
> settings restored, packages removed, etc.)? I.e. a
> fresh installed image of
> linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2.

> Would I just redownload
> linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2 and run
> "dpkg -i
> linux-image-5.18.6-kirkwood-tld-1_1.0_armel.deb"
> under /boot?

Usually doing that will refresh the kernel on top, and dpkg will recreate the init scripts. So it should work fine.

But to clean it completely like you never install that kernel, you would boot back to a previous kernel version. For example, linux-5.17.4-kirkwood-tld-1. And then while the previous kernel is running, do:
dpkg --purge linux-image-5.18.6-kirkwood-tld-1

To see which kernels have been installed currently:
dpkg -l | grep linux-image


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

So before you upgrade kernel, copy the current kernel uImage and uInitrd to backup files. For example,

cd /boot 
cp -a uImage uImage.5.17.4-kirkwood-tld-1
cp -a uInitrd uInitrd.5.17.4-kirkwood-tld-1

And then install 5.18.6-kirkwood-tld-1.

This way you can just go back a kernel version:
cd /boot 
cp -a uImage.5.17.4-kirkwood-tld-1 uImage
cp -a uInitrd uInitrd.5.17.4-kirkwood-tld-1 uInitrd
And reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel cleanup question
August 24, 2022 05:37PM
Thank you, Bodhi!

Additionally, what's the latest version of Debian Buster for Kirkwood devices? Would that be linux-5.13.6-kirkwood-tld-1 (04 Aug 2021)? If so, can you please reupload the image to DropBox (Dropbox notes the file has been deleted) or direct me to a link with all the archives of old images? Installing Buster on a second Pogo V4 for testing purposes.

Thank you, once again.
Re: Linux Kernel cleanup question
August 24, 2022 06:31PM
dumdedumda ,

> Additionally, what's the latest version of Debian
> Buster for Kirkwood devices?
> Would that be
> linux-5.13.6-kirkwood-tld-1 (04 Aug 2021)?

No, the latest rootfs is Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (Buster). And it has kernel linux-5.13.6-kirkwood-tld-1 already installed on it. This rootfs can be used for any Kirkwood box.

And then you once you got Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 running, you can install later kernels into the rootfs, such as linux-5.19.2-kirkwood-tld-1-bodhi.tar.bz2.

You can also install older kernels in this buster rootfs, for whatever reason. As long as it is not too old, it should work. It is still a Debian buster OS, even if the kernel is older or later than linux-5.13.6-kirkwood-tld-1.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel cleanup question
August 25, 2022 05:24PM
Hi Bodhi,

Little confused here. Just checked my Pogo V4 with a freshly installed copy of the latest rootfs (26 Sept 2021 Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2) and it is showing Debian 11 (Bullseye), and not 10 (Buster). Also, the release page shows "Updated 26 Sept 2021:Basic Debian bullseye Kirkwood rootfs for most Kirwood plugs."

It appears any kernel that is older than 26 Sept 2021 has been deleted from the DropBox. Would you be able to link me or upload a copy of the latest Debian 10 (Buster) kernel for Kirkwood devices?

Apologies for the hassle and thank you.

root@debian:~# hostnamectl
   Static hostname: debian
         Icon name: computer
        Machine ID: 
           Boot ID: 
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.13.6-kirkwood-tld-1
      Architecture: arm
root@debian:~# uname -r
5.13.6-kirkwood-tld-1



Edited 2 time(s). Last edit at 08/25/2022 05:25PM by dumdedumda.
Re: Linux Kernel cleanup question
August 25, 2022 06:02PM
dumdedumda,

> Little confused here. Just checked my Pogo V4 with
> a freshly installed copy of the latest rootfs (26
> Sept 2021
> Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2)
> and it is showing Debian 11 (Bullseye), and not 10
> (Buster). Also, the release page shows "Updated 26
> Sept 2021:Basic Debian bullseye Kirkwood rootfs
> for most Kirwood plugs."

Ah, sorry I mispoke :) Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 should be Bullseye.

> It appears any kernel that is older than 26 Sept
> 2021 has been deleted from the DropBox. Would you
> be able to link me or upload a copy of the latest
> Debian 10 (Buster) kernel for Kirkwood devices?

OK let me check the link. It must be bitly.com that causing problems. I will post the direct link if needed.

I recently cleaned up my old kernels. So older kernels you are lookimg for might be gone.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel cleanup question
August 25, 2022 06:13PM
Here is the Debian buster rootfs in the release thread. The link is OK.

https://forum.doozan.com/read.php?2,12096

Quote


=======================================================================
Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- 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, sysvinit-utils, u-boot-tools, and mtd-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-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf

And as I said, the kernel version has no relation to rootfs version, you can run any kernel that released after the 25 Aug 2019 date. Best to run the latest kernel now in this buster rootfs after you have booted the rootfs.

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



Edited 1 time(s). Last edit at 08/25/2022 06:15PM by bodhi.
Re: Linux Kernel cleanup question
August 25, 2022 10:12PM
Quote

And as I said, the kernel version has no relation to rootfs version, you can run any kernel that released after the 25 Aug 2019 date. Best to run the latest kernel now in this buster rootfs after you have booted the rootfs.

Ah, I see what you meant now! I misunderstood-- I initially thought that the kernel updates directly reflected or corresponded to respective Debian kernels (Debian 10, 11, etc.). So, the rootfs is the base that ultimately determines the kernel version and supersedes any of the updates.

Bodhi, thanks for your incredible patience in teaching and guiding us. This has been a great learning experience (tuition-free too).

root@debian:~# hostnamectl
   Static hostname: debian
         Icon name: computer
        Machine ID: 
           Boot ID: 
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 5.18.6-kirkwood-tld-1
      Architecture: arm


bodhi Wrote:
-------------------------------------------------------
> Here is the Debian buster rootfs in the release
> thread. The link is OK.
>
> https://forum.doozan.com/read.php?2,12096
>
>
Quote

>
> =======================================================================
>
> Updated 25 Aug 2019:
>
> Basic Debian buster Kirkwood rootfs for most
> Kirwood plugs:
>
> - tarball size: 209M
> - install size: 536M
> - 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,
> sysvinit-utils, u-boot-tools, and mtd-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-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
>
> md5:
> cd8ad170aa1a9fdc2a0a1c43ab1c0721
> sha256:
> 8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf
>
> And as I said, the kernel version has no relation
> to rootfs version, you can run any kernel that
> released after the 25 Aug 2019 date. Best to run
> the latest kernel now in this buster rootfs after
> you have booted the rootfs.
Re: Linux Kernel cleanup question
August 26, 2022 12:00AM
> Ah, I see what you meant now! I misunderstood-- I
> initially thought that the kernel updates directly
> reflected or corresponded to respective Debian
> kernels (Debian 10, 11, etc.). So, the rootfs is
> the base that ultimately determines the kernel
> version and supersedes any of the updates.

Yes, it's difference from running a mainline Debian distribution, which ususally ties to a kernel version. Here we have maximum freedom to pick and choose the kernel version and the Debian version we need to use .

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

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: