[SOLVED] cant remove kernel

weconnect

Member
May 20, 2020
21
1
8
35
Hello

i have gotten an issue after updating to the latest proxmox..

i cant update kernel as it says no space left on the device.

Code:
apt-get remove pve-kernel-5.4.114-1-pve --purge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  pve-kernel-5.15.35-3-pve pve-kernel-5.4.114-1-pve* pve-kernel-5.4.128-1-pve
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 957 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 153928 files and directories currently installed.)
Removing pve-kernel-5.15.35-3-pve (5.15.35-6) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
update-initramfs: Deleting /boot/initrd.img-5.15.35-3-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 5.15.35-3-pve /boot/vmlinuz-5.15.35-3-pve
Re-executing '/etc/kernel/postrm.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/cmdline found - falling back to /proc/cmdline
Copying and configuring kernels on /dev/disk/by-uuid/4549-7ED8
        Copying kernel 5.13.19-6-pve
        Copying kernel 5.15.35-2-pve
        Copying kernel 5.15.39-1-pve
cp: error writing '/var/tmp/espmounts/4549-7ED8/vmlinuz-5.15.39-1-pve': No space left on device
run-parts: /etc/kernel/postrm.d/zz-proxmox-boot exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/pve-kernel-5.15.35-3-pve.postrm line 14.
dpkg: error processing package pve-kernel-5.15.35-3-pve (--remove):
 installed pve-kernel-5.15.35-3-pve package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 pve-kernel-5.15.35-3-pve
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

fdisk -l says

Code:
fdisk -l
Disk /dev/sda: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD4003FRYZ-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3DADC829-F80F-485E-9FC3-09AEA82DEB16

Device       Start        End    Sectors  Size Type
/dev/sda1       34       2047       2014 1007K BIOS boot
/dev/sda2     2048    1050623    1048576  512M EFI System
/dev/sda3  1050624 7814037134 7812986511  3.6T Solaris /usr & Apple ZFS

Partition 1 does not start on physical sector boundary.


Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD4003FRYZ-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9B12381C-5744-426B-B44F-8A030F326661

Device       Start        End    Sectors  Size Type
/dev/sdb1       34       2047       2014 1007K BIOS boot
/dev/sdb2     2048    1050623    1048576  512M EFI System
/dev/sdb3  1050624 7814037134 7812986511  3.6T Solaris /usr & Apple ZFS

Partition 1 does not start on physical sector boundary.

efibootmgr -v

Code:
efibootmgr -v
EFI variables are not supported on this system.

proxmox-boot-tool says

Code:
proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with legacy bios
4549-7ED8 is configured with: uefi (versions: 5.3.18-3-pve, 5.4.44-2-pve, 5.4.73-1-pve, 5.4.78-2-pve), grub (versions: 5.13.19-6-pve, 5.15.30-2-pve, 5.15.35-1-pve, 5.15.35-2-pve, 5.15.35-3-pve, 5.15.39-1-pve)
4549-F755 is configured with: uefi (versions: 5.3.18-3-pve, 5.4.44-2-pve, 5.4.73-1-pve, 5.4.78-2-pve), grub (versions: 5.13.19-6-pve, 5.15.30-2-pve, 5.15.35-1-pve, 5.15.35-2-pve)

i have tried autoclean and auto remove dont work sadly.

anyone have any idea on how to solve this issue?
 
mount the ESP manually, remove unwanted kernels, unmount again, then repeat the APT invocation.
 
for example, mount /dev/sda2 /boot/efi
 
for example, mount /dev/sda2 /boot/efi
Is it possible to have more detailed instuction how to solve the issue?
I have zfs boot drives in zraid configuration from installation under version 6. I have already upgrade to ver.7 year ago. Everything was ok until something happened this summer.
I have no "sda1, sda2".
Should I do mount /dev/sdg2 /boot/efi
Please help to "remove unwanted kernels, unmount again, then repeat the APT invocation".

My fdisk configuration is:
Code:
root@fj / # fdisk -l
Disk /dev/sdc: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 923E39A1-05BB-5645-A23B-C44A420F3742

Device         Start       End   Sectors   Size Type
/dev/sdc1       2048 937684991 937682944 447.1G Solaris /usr & Apple ZFS
/dev/sdc9  937684992 937701375     16384     8M Solaris reserved 1
BOOT ZFS DRIVES "rpool":
Code:
Disk /dev/sdg: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FE76B4AB-09D8-47B7-BA4A-3D05C97A1DD2

Device       Start       End   Sectors  Size Type
/dev/sdg1       34      2047      2014 1007K BIOS boot
/dev/sdg2     2048   1050623   1048576  512M EFI System
/dev/sdg3  1050624 146800640 145750017 69.5G Solaris /usr & Apple ZFS


Disk /dev/sdh: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 511CEB01-4E48-4C7A-B16E-E02CED4D696B

Device       Start       End   Sectors  Size Type
/dev/sdh1       34      2047      2014 1007K BIOS boot
/dev/sdh2     2048   1050623   1048576  512M EFI System
/dev/sdh3  1050624 146800640 145750017 69.5G Solaris /usr & Apple ZFS
 
Last edited:
yes, in your case the partitions are /dev/sdg2 and /dev/sdh2 (those marked as "EFI System" partitions, or "ESP")
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!