I have a “low disc space in Boot partition” warning .
The last update said 0 disc space.
I’m not a programming guy. Can anyone help me with this ?
I’m about to log out now but please share here if below command (typed within Terminal) helps there:
sudo apt autoremove
EDIT:
sudo dpkg --list | egrep -i --colour 'linux-image|linux-headers'
Here below are just two examples (please read above/correct output and remove only those beginning with rc
):
sudo apt --purge remove linux-image-5.10.0-12-amd64
sudo apt --purge remove linux-image-5.10.0-13-amd64
Important: please do not remove installed Linux Kernels (two of them) where belonging line starts with ii
.
Thank you for your reply.
Autoremove command did report freed up disc space.
I don’t understand the rest of your suggestion involving EDIT;
0 to upgrade, 0 to newly install, 25 to remove and 7 not to upgrade.
2 not fully installed or removed.
After this operation, 1,901 MB disk space will be freed.
Should this have been done with Librem key in. Much output said " No Medium Found" to write “grub file” ?
Generating grub configuration file …
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
Below command will give you related output
(nothing else, just output):
Rest should be easy to understand.
EDIT: There was missing one additional '
sign. Sorry @Gelphi, I edited it correctly now.
Probably! Actually cannot confirm anything as do not have one, but looks like that Librem key is requirement there (I’m learning from you as well).
You can and should do: sudo apt autoremove
afterwards.
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
Above should help with the 7 related packages.
So i did without Librem key.
Not wanting to reboot before issue settled.
Or will re running autoremove flash(?) new image to key?
Or another command might do that at this stage ?
I agree! apt autoremove
is not important at this stage. Do you see output of sudo dpkg --list
…?
It is very similar to this one:
sudo dpkg --list | egrep -i --colour 'linux-image|linux-headers' ii linux-image-5.10.0-15-amd64 5.10.120-1 amd64 Linux 5.10 for 64-bit PCs (signed) ii linux-image-5.10.0-16-amd64 5.10.127-1 amd64 Linux 5.10 for 64-bit PCs (signed) ii linux-image-amd64 5.10.127-1 amd64 Linux for 64-bit PCs (meta-package)
For currently used Linux Kernel:
uname -r
See list
current kernel 5.4.0-120-generic
Now what?
paul@paul-librem-14:~$ sudo dpkg --list | egrep -i --colour ‘linux-image|linux-headers’
[sudo] password for paul:
ii linux-headers-5.4.0-120 5.4.0-120.136 all Header files related to Linux kernel version 5.4.0
ii linux-headers-5.4.0-120-generic 5.4.0-120.136 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii linux-headers-5.4.0-122 5.4.0-122.138 all Header files related to Linux kernel version 5.4.0
ii linux-headers-5.4.0-122-generic 5.4.0-122.138 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii linux-headers-5.4.0-91 5.4.0-91.102 all Header files related to Linux kernel version 5.4.0
ii linux-headers-5.4.0-91-generic 5.4.0-91.102 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii linux-headers-generic 5.4.0.122.123 amd64 Generic Linux kernel headers
rc linux-image-5.4.0-105-generic 5.4.0-105.119 amd64 Signed kernel image generic
rc linux-image-5.4.0-107-generic 5.4.0-107.121 amd64 Signed kernel image generic
rc linux-image-5.4.0-109-generic 5.4.0-109.123 amd64 Signed kernel image generic
rc linux-image-5.4.0-117-generic 5.4.0-117.132 amd64 Signed kernel image generic
ii linux-image-5.4.0-120-generic 5.4.0-120.136 amd64 Signed kernel image generic
rc linux-image-5.4.0-121-generic 5.4.0-121.137 amd64 Signed kernel image generic
ii linux-image-5.4.0-122-generic 5.4.0-122.138 amd64 Signed kernel image generic
ii linux-image-5.4.0-91-generic 5.4.0-91.102 amd64 Signed kernel image generic
ii linux-image-generic 5.4.0.122.123 amd64 Generic Linux kernel image
paul@paul-librem-14:~$ sudo uname -r
5.4.0-120-generic
paul@paul-librem-14:~$
sudo apt --purge remove linux-image-5.4.0-105-generic
sudo apt --purge remove linux-image-5.4.0-107-generic
sudo apt --purge remove linux-image-5.4.0-109-generic
sudo apt --purge remove linux-image-5.4.0-117-generic
You should already get enough physical space within related partition. Please continue with:
sudo apt --purge remove linux-image-5.4.0-91-generic
sudo apt --purge remove linux-headers-5.4.0-91
sudo apt --purge remove linux-headers-5.4.0-91-generic
Now you’ll be at the point to involve helping command, important one:
sudo dpkg --configure -a
sudo systemctl reboot
After your system is back you should perform regular check:
sudo apt update
sudo apt upgrade
sudo systemctl reboot
uname -r
sudo dpkg --list | egrep -i --colour 'linux-image|linux-headers'
By reminding that most important there is: linux-image-generic
package + two used (most recent) Linux Kernels where belonging line starts with the ii
(so that you can check back after successful reboot
).
First bit went OK.
then this sudo apt --purge remove linux-image-5.4.0-91-generic
Gave this
The following packages will be REMOVED:
linux-image-5.4.0-91-generic* linux-modules-extra-5.4.0-91-generic*
0 to upgrade, 0 to newly install, 2 to remove and 18 not to upgrade.
After this operation, 214 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 398059 files and directories currently installed.)
Removing linux-modules-extra-5.4.0-91-generic (5.4.0-91.102) …
Removing linux-image-5.4.0-91-generic (5.4.0-91.102) …
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.4.0-91-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file /etc/default/grub' Sourcing file
/etc/default/grub.d/50_linuxmint.cfg’
Sourcing file `/etc/default/grub.d/init-select.cfg’
Generating grub configuration file …
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No med
Key was IN.
What is grub file ?
Still not rebooted.
Very right decision of yours. Therefore mandatory (very important) there:
sudo update-grub
−− you can post output here if something not right, but should work well.
Proof things:
sudo dpkg --configure -a
df -kh /boot
−− will show you how much space is currently in use. If enough rest/free space there please execute at first place:
Perhaps you might want to but avoid if not needed:
sudo apt install linux-image-5.4.0-91-generic linux-modules-extra-5.4.0-91-generic
Yet I would go with this first after and if sudo update-grub
sucessful:
sudo apt update
apt list linux-image-generic -a
sudo apt upgrade linux-image-generic
sudo dpkg -l | grep linux-'[g|i|m|h]'
If for some reason above not providing what expected (getting latest version):
sudo apt reinstall linux-image-generic
sudo apt-mark auto linux-image-generic
apt autoremove --purge
Please post here output of the current situation:
apt list linux-image-generic -a
At some point sudo apt upgrade
might/should solve everything.
sudo update-grub
[sudo] password for paul:
Sourcing file /etc/default/grub' Sourcing file
/etc/default/grub.d/50_linuxmint.cfg’
Sourcing file `/etc/default/grub.d/init-select.cfg’
Generating grub configuration file …
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
/dev/sda: open failed: No medium found
Thanks for help But I’m in wrong forum. I’m talking mint to a Puritan.
It might be the same ish, but my mistake, installed mint on Librem at advice of tech for new user.
Please try if following helps (just post output if something not successful):
sudo dpkg -P --force-all linux-image-5.4.0-91-generic linux-modules-extra-5.4.0-91-generic
sudo apt clean && sudo apt update && sudo apt install -fy
sudo apt upgrade
Check if following works without any issue:
sudo dpkg --configure -a
sudo apt --fix-broken install
sudo update-grub
Afterwards (if above doesn’t help), as within some discussion people using Mint have mentioned that re-installation of the bootloader to the MBR should help (before you reboot) after:
sudo apt install grub-customizer
But I never tried this app by myself (it is GUI app, sudo password needed to open it):
Also,
sudo update-grub
should work there before you reboot
, and please come back here if having other related questions (cannot say I’m really focused how to help you further, but please come back with your feedback when having or in order to have update-grub
successful there).
As well, please provide here output of your current:
df -kh /boot
Not adequate or simply wrong advice (not related to your hardware, more related toward Windows dependent users), IMHO.
paul@paul-librem-14:~$ sudo dpkg -P --force-all linux-image-5.4.0-91-generic linux-modules-extra-5.4.0-91-generic
[sudo] password for paul:
dpkg: warning: ignoring request to remove linux-image-5.4.0-91-generic which isn’t installed
dpkg: warning: ignoring request to remove linux-modules-extra-5.4.0-91-generic which isn’t installed
Mint ppl did point way to a button which automates all of this
paul@paul-librem-14:~$ df -kh /boot
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p5 704M 217M 436M 34% /boot
Primary reason for Librem was own BIOS. not monitored, not changeable remotely. Also simplicity of Linux programs in comparison. Early glitch with PureOS could not find info for novice. Do wish concept success. Envisioned going Pure later.