Welcome! Log In Create A New Profile

Advanced

Cleanup Excess File in iConnect /boot Directory?

Posted by teledog 
teledog
Cleanup Excess File in iConnect /boot Directory?
February 04, 2021 02:37AM
I've recently installed the newest kernel on a USB booting iConnect using the instructions found here on this forum. Everything went well and it's working great. I have quite a mess of excess files left in the /boot folder now. What are the minimum required files to have there for booting and ease of future kernel updates?

I'd like to keep as clean as possible.

Here is the current content of my /boot folder:

-rw-r--r--  1 root root    135754 Jun  9  2020 config-3.16.0-11-kirkwood
-rw-r--r--  1 root root    107587 Dec 10  2017 config-3.2.0-4-kirkwood
-rw-r--r--  1 root root    107588 May 31  2018 config-3.2.0-6-kirkwood
-rw-r--r--  1 root root    180435 Jan 15 01:22 config-5.10.7-kirkwood-tld-1
-rw-r--r--  1 root root     17154 Feb 19  2014 DefaultPicture.bmp
drwxr-xr-x  2 root root      3072 Dec 24 12:51 dts
lrwxrwxrwx  1 root root        29 Feb  3 23:03 initrd.img -> initrd.img-3.16.0-11-kirkwood
-rw-r--r--  1 root root  10362559 Feb  3 23:04 initrd.img-3.16.0-11-kirkwood
-rw-r--r--  1 root root   7470402 Mar 19  2019 initrd.img-3.2.0-4-kirkwood
-rw-r--r--  1 root root   8266603 Feb  3 22:31 initrd.img-3.2.0-6-kirkwood
-rw-r--r--  1 root root   7361337 Feb  3 23:23 initrd.img-5.10.7-kirkwood-tld-1
lrwxrwxrwx  1 root root        27 Mar 19  2019 initrd.img.old -> initrd.img-3.2.0-6-kirkwood
drwxrwxrwx  5 root root      1024 Feb 19  2014 .lifeline
-rw-r--r--  1 root root    161761 Jan 16 18:54 linux-5.10.7-kirkwood-tld-1.patch
-rw-r--r--  1 root root   1300480 Jan 15 02:11 linux-dtb-5.10.7-kirkwood-tld-1.tar
-rw-r--r--  1 root root   7589236 Jan 15 01:47 linux-headers-5.10.7-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root  21747120 Jan 15 01:50 linux-image-5.10.7-kirkwood-tld-1_1.0_armel.deb
drwxr-xr-x  2 root root     12288 Dec 23  2013 lost+found
-rw-r--r--  1 root root   1632336 Jun  9  2020 System.map-3.16.0-11-kirkwood
-rw-r--r--  1 root root   1216202 Dec 10  2017 System.map-3.2.0-4-kirkwood
-rw-r--r--  1 root root   1216863 May 31  2018 System.map-3.2.0-6-kirkwood
-rw-r--r--  1 root root   4308309 Jan 15 01:22 System.map-5.10.7-kirkwood-tld-1
-rw-r--r--  1 root root   5327658 Feb  3 22:38 uImage
-rw-r--r--  1 root root   2856464 Apr 14  2013 uImage.orig
-rw-r--r--  1 root root   6938924 Feb  3 22:38 uInitrd
lrwxrwxrwx  1 root root        26 Feb  3 23:03 vmlinuz -> vmlinuz-3.16.0-11-kirkwood
-rw-r--r--  1 root root   2086264 Jun  9  2020 vmlinuz-3.16.0-11-kirkwood
-rw-r--r--  1 root root   1619152 Dec 10  2017 vmlinuz-3.2.0-4-kirkwood
-rw-r--r--  1 root root   1621664 May 31  2018 vmlinuz-3.2.0-6-kirkwood
-rwxr-xr-x  1 root root   5316464 Jan 15 01:22 vmlinuz-5.10.7-kirkwood-tld-1
lrwxrwxrwx  1 root root        24 Mar 19  2019 vmlinuz.old -> vmlinuz-3.2.0-6-kirkwood
-rwxr-xr-x  1 root root   5316464 Jan 15 01:32 zImage-5.10.7-kirkwood-tld-1
-rwxr-xr-x  1 root root   5327594 Feb  3 22:37 zImage.fdt
Re: Cleanup Excess File in iConnect /boot Directory?
February 04, 2021 05:28PM
teledog,

> What are the minimum
> required files to have there for booting and ease
> of future kernel updates?

Keep 2 kernel versions, in case you need to boot back to previous working kernel if the current kernel has problem.

To clean up, run dpkg, it will take care of removing kernel files that are part of a kernel. Recall when you upgrade the kernel with "dpkg -i" command? So now you want to use the same dpkg command, but with remove/purge option.

For example,

Install:

dpkg -i linux-image-5.10.7-kirkwood-tld-1_1.0_armel.deb

Remove:
dpkg --purge linux-image-5.10.7-kirkwood-tld-1

But in this case, you want to remove the older mainline kernels that you have installed previously, and those kernel names are different. So find it:

dpkg -l | grep linux-image

You will see all kernels that have been installed, and now can use dpkg --purge to remove any old kernel that you don't want to keep.

For example:
dpkg --purge linux-image-3.16.0-11-kirkwood

Also, when you list the files on /boot, you should list them in reverse chronological order so you can see each group of kernel files together:

ls -lart

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
teledog
Re: Cleanup Excess File in iConnect /boot Directory?
February 05, 2021 01:52AM
Thanks, that worked great. Got the /boot partition back to 44% used now!
Author:

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: