since the last update, i don’t have enough space in the /boot folder to allow installation.
As you can see in the folder, there are several files with the same name. I would like to know if I can safely delete them, in order to perform the update correctly?
What version of Parrot are you running? (include version, edition, and architecture)
Linux parrot 4.18.0-parrot10-amd64 #1 SMP Debian 4.18.10-1parrot10 (2018-10-06) x86_64 GNU/Linux
What method did you use to install Parrot? (Debian Standard / Debian GTK / parrot-experimental)
Debian GTK
Configured to multiboot with other systems? (yes / no)
No
If there are any similar issues or solutions, link to them below:
But no confirmation on my question…
If there are any error messages or relevant logs, post them below:
You can use uname -r to see which kernel version you are currently using.
Follow this https://help.ubuntu.com/community/RemoveOldKernels or google ‘removing old kernels’/ ‘linux /boot full’.
Ideally you keep a few (3 is default). But if /boot is in its own partition then you gotta do, what you gotta do.
Im Having The Same Particular Issue. Same Error & Im Having It From A Couple Of Weeks Now. Googled a couple of solutions like sudo apt-get autoremove or sudo apt-get autoremove --purge but none of them worked. The out come was the same error the main claimant of this thread.
What method did you use to install Parrot? (Debian Standard / Debian GTK / parrot-experimental)
Debian GTK Configured to multiboot with other systems? (yes / no)
No
Using LVM Encrypted Partiotions
Error :
sudo su
apt-get autoremove -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 463 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.132) …
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.132) …
update-initramfs: Generating /boot/initrd.img-4.18.0-parrot20-amd64
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.18.0-parrot20-amd64 with 1.
dpkg: error processing package initramfs-tools (–configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
initramfs-tools
Configuring sandbox profiles…
Sandbox profiles updated!
E: Sub-process /usr/bin/dpkg returned an error code (1)
More digging :
cd /boot
ls
config-4.18.0-parrot10-amd64 initrd.img-4.18.0-parrot20-amd64
config-4.18.0-parrot20-amd64 lost+found
efi System.map-4.18.0-parrot10-amd64
grub System.map-4.18.0-parrot20-amd64
initrd.img-4.18.0-parrot10-amd64 vmlinuz-4.18.0-parrot10-amd64
initrd.img-4.18.0-parrot10-amd64.old-dkms vmlinuz-4.18.0-parrot20-amd64
uname -r
4.18.0-parrot20-amd64
tried to do this as someone said but didnt work out either:
cd /boot
ls
sudo apt-get purge initrd.img-4.18.0-parrot10-amd64.old-dkms
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package initrd.img-4.18.0-parrot10-amd64.old-dkms
E: Couldn’t find any package by glob ‘initrd.img-4.18.0-parrot10-amd64.old-dkms’
E: Couldn’t find any package by regex ‘initrd.img-4.18.0-parrot10-amd64.old-dkms’
Is there a manual way to remove the old images? If yes then How & what images should i remove?
Keep in mind that im fairly new to Linux so please be as eloborative as possible while explaining the solution.
So this should list installed kernels you are not using: dpkg -l | grep -e "ii linux-image-[0-9]" | grep -v $(uname -r)
(note 2 spaces between ‘ii’ and ‘linux’)
dpkg -l — list packages grep -e — only show lines containing that string grep -v — exclude current kernel from list
Then you can remove the kernels in that list. sudo apt-get purge <image>
You can also remove the .old-dkms files, simply sudo rm /boot/*old-dkms, although they should be removed when you purge the old kernel.
I would recommend increasing the size of you boot partition, if you dont want to do this to frequently. This will also remove the risk of you accidentally ‘soft bricking’ the OS, by removing the wrong kernel.
Use this or just manually compare uname -r with the content of /boot
Then you get an output like ii linux-image-4.18.0-parrot10-amd64 4.18.10-2parrot10 amd64 Linux 4.18 for 64-bit PCs
right after ‘ii’ is the kernel name that you can remove (‘linux-image-4.18.0-parrot10-amd64’)
So then take that name and put it after apt-get purge e.g. apt-get purge linux-image-4.18.0-parrot10-amd64
its been maybe a month but the same previous issue has occured.
I followed the previously mentioned steps and the out come of dpkg -l | grep -e “ii linux-image-[0-9]” | grep -v $(uname -r) is :
ii linux-image-4.18.0-parrot20-amd64 4.18.20-2parrot20
WHat shall i do now? which image should i remove and with which command?
cd /boot
ls
config-4.18.0-parrot20-amd64
config-4.19.0-parrot1-13t-amd64
efi
grub
initrd.img-4.18.0-parrot20-amd64
initrd.img-4.19.0-parrot1-13t-amd64
initrd.img-4.19.0-parrot1-13t-amd64.dpkg-bak
initrd.img-4.19.0-parrot1-13t-amd64.new
initrd.img-4.19.0-parrot1-13t-amd64.old-dkms
lost+found
System.map-4.18.0-parrot20-amd64
System.map-4.19.0-parrot1-13t-amd64
vmlinuz-4.18.0-parrot20-amd64
vmlinuz-4.19.0-parrot1-13t-amd64
I will try to make it easier using a new command chain. But the more i chain together, the more that can go wrong. So make sure you backup anything important before hand.
and make sure that it doesn’t match the output of uname -r.
Just check that is correct before proceeding.
Then we can try another command that should remove it for you. In theory you should be able to use this command every time. But personally i would check the output each time, just in case.
Running this should remove it for you:
gives out same error as the one mentioned above.
grep: linux-image-[0-9]”: No such file or directory.
Ran both the commands with and without root. same outcome.
Is there any hope left
My other command didnt work because i wasnt using echo .
So it would be sudo apt-get purge $(echo $(dpkg -l | grep -e “ii linux-image-[0-9]” | grep -v $(uname -r) -m 1 | cut -d' ' -f3))