[TUTORIAL] about system upgrade hit disk full problem

Yogorov

Renowned Member
Sep 1, 2015
25
4
68
when you install pve by ISO file, boot partitation only has 512MB (no any option can adjust it)

it'll cause a problem , can't save too much old kernel version , due to kernel Getting bigger
when you do system upgrade , it'll keep few old kernel version for you to switch back easily when you hit some error in new kernel
but it can't keep too much old kernel version , about 3~4 old kernel version then 512MB was full

it very bothering when you doing full system upgrade hit this error message say: disk full can't write in
then you will hit apt dead loop
those commnd won't fix this deap loop
apt remove
apt purge
apt -f install


debug:
fdisk -l system_disk

ex:
Bash:
fdisk -l /dev/sde

Disk /dev/sde: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 870
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: 60A8635D-9CFB-4440-AFEC-F8A5BEDFB0F9

Device       Start       End   Sectors   Size Type
/dev/sde1       34      2047      2014  1007K BIOS boot
/dev/sde2     2048   1050623   1048576   512M EFI System
/dev/sde3  1050624 488397134 487346511 232.4G Solaris /usr & Apple ZFS
from above, we can see sde2 only has 512MB
this partitation you can't seen by this command df -h
so we have to mount it

Bash:
mount /dev/sde2 /mnt/temp/
ls -al /mnt/temp/EFI/proxmox/

drwxr-xr-x 2 root root 4.0K  5月 19 01:58 6.8.12-10-pve/
drwxr-xr-x 2 root root 4.0K  6月 24 10:33 6.8.12-11-pve/

du -hd 1 temp/EFI/proxmox/
153M    temp/EFI/proxmox/6.8.12-11-pve
153M    temp/EFI/proxmox/6.8.12-10-pve
306M    temp/EFI/proxmox/
from above , we can see 2 kernel version has 306MB
6.8.12-11-pve was in use
6.8.12-10-pve is old kernel version

if you already in apt dead loop , apt purge or apt remove won't help
you have to jump out apt deap loop.

the idea is empty some file, release space but file name still exist it won't cause apt further problem

command eample:
echo > /mnt/temp/EFI/proxmox/6.8.12-10-pve/initrd.img-6.8.12-10-pve
⇧ don't just copy this command, instead your old kernel version for this command

this way you can jump out apt dead loop
then you can fix this problem by this command
apt -f install


how to delete in right way​

if you hasn't in apt deap loop
here is how to delete old kernel version

command example:
Bash:
aptitude search 6.8.12-10

v   linux-headers-6.8.12-10-pve-amd64                -
v   linux-image-6.8.12-10-pve-amd64                  -
p   proxmox-headers-6.8.12-10-pve                    - Proxmox Kernel Headers
p   proxmox-kernel-6.8.12-10-pve                     - Proxmox Kernel Image
i A proxmox-kernel-6.8.12-10-pve-signed              - Proxmox Kernel Image (signed)
p   proxmox-kernel-6.8.12-10-pve-signed-template     - Template for signed kernel package
v   pve-headers-6.8.12-10-pve                        -
v   pve-kernel-6.8.12-10-pve                         -
from above, we know the full name about kernel 6.8.12-10
here is delete command example:
apt purge proxmox-kernel-6.8.12-10-pve-signed


then you can check your system diks space has release or not

by those comand:
df -h
umount /mnt/temp


if you were Chinese reader you can read this article in Chinese
 
Last edited:
when you install pve by ISO file, boot partitation only has 512MB (no any option can adjust it)

Since (PVE-/)Proxmox-Installer 7.4:
Installation ISO
The EFI System Partition (ESP) defaults to 1 GiB of size if the root disk partition (hdsize) is bigger than 100 GB.
https://pve.proxmox.com/wiki/Roadmap#Proxmox_VE_7.4

In general:
  • Just run: apt autoremove or: apt autoremove --purge on a regular basis...:
  • Also do some housekeeping whenever the default kernel series has changed...

Nevertheless, thanks for the guide!
 
In general:
  • Just run: apt autoremove or: apt autoremove --purge on a regular basis...:
  • Also do some housekeeping whenever the default kernel series has changed...

apt autoremove or apt autoremove --purge
if your boot partition near full , those commands won't help you delete old version kernel
I Just try it and test it
 
Last edited: