debian 12
Running an update returned:
the volume boot has only 4mb disk space remaining
zstd: error 70 : Write error : cannot write block : No space left on device
E: mkinitramfs failure zstd -q -9 -T0 70
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
E: Sub-process /usr/bin/dpkg returned an error code (1)
Suggestions? Can you run an autoremove command on the boot volume? Thanks.
[Solved] volume boot has only 4mb disk space remaining error
-
- Global Moderator
- Posts: 3204
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 67 times
- Been thanked: 282 times
Re: [Software] volume boot has only 4mb disk space remaining error
Usually there are too many old kernels installed. Remove old kernels you are not using.
Mottainai
- wizard10000
- Global Moderator
- Posts: 1244
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 125 times
- Been thanked: 220 times
Re: [Solved] volume boot has only 4mb disk space remaining error
Another thing that might help - by default Linux reserves 5% of a filesystem for the root account. This worked pretty well when drives were a lot smaller but 5% of a 500GB drive is 25GB
Fortunately this reserved space can be adjusted or eliminated with tune2fs - these days I reserve 1% on my root partition (which is still 5GB) and 0% on other partitions.
Hope this helps -
Fortunately this reserved space can be adjusted or eliminated with tune2fs - these days I reserve 1% on my root partition (which is still 5GB) and 0% on other partitions.
Hope this helps -
we see things not as they are, but as we are.
-- anais nin
-- anais nin
- wizard10000
- Global Moderator
- Posts: 1244
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 125 times
- Been thanked: 220 times
Re: [Solved] volume boot has only 4mb disk space remaining error
From tune2fs' man page -DebianFox wrote: 2025-01-16 05:15how is it possible to check how much has Linux reserved for a particular partition? Is there some command that can be used?
Code: Select all
-m reserved-blocks-percentage
Set the percentage of the file system which may only be allocated
by privileged processes. Reserving some number of file system
blocks for use by privileged processes is done to avoid file sys‐
tem fragmentation, and to allow system daemons, such as sys‐
logd(8), to continue to function correctly after non-privileged
processes are prevented from writing to the file system. Nor‐
mally, the default percentage of reserved blocks is 5%.
Code: Select all
wizard@laptop 05:22:37 $ sudo tune2fs -l /dev/nvme0n1p2 | grep "Reserved block count\|Block size"
Reserved block count: 1249036
Block size: 4096
wizard@laptop 05:23:11 $
Hope this helps -
we see things not as they are, but as we are.
-- anais nin
-- anais nin
Re: [Solved] volume boot has only 4mb disk space remaining error
Thanks @wizard10000. A few follow up questions.
1) Based on the sample values given above, it appears that 4.76 GB has been reserved on the partition for root. i.e. (1249036 * 4096) / (1024 * 1024 *1024). Is my understanding correct?
2) Is this 1% or 5% or whatever the user has decided done on a per partition basis or for root partition only? So if the disk is divided into say root (/), /home, /swap and /boot partition, then for each partition 1% or 5% or some value is reserved for root partition?
3) I went through the Linux File System Hierarchy documentation. It does not specify the value of 5% or 1% or some other value to be reserved for root account on a partition or disk level. Is this value based on distro? Does Debian have some corresponding documentation that refers to this?
1) Based on the sample values given above, it appears that 4.76 GB has been reserved on the partition for root. i.e. (1249036 * 4096) / (1024 * 1024 *1024). Is my understanding correct?
2) Is this 1% or 5% or whatever the user has decided done on a per partition basis or for root partition only? So if the disk is divided into say root (/), /home, /swap and /boot partition, then for each partition 1% or 5% or some value is reserved for root partition?
3) I went through the Linux File System Hierarchy documentation. It does not specify the value of 5% or 1% or some other value to be reserved for root account on a partition or disk level. Is this value based on distro? Does Debian have some corresponding documentation that refers to this?
- wizard10000
- Global Moderator
- Posts: 1244
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 125 times
- Been thanked: 220 times
Re: [Solved] volume boot has only 4mb disk space remaining error
1) Yep - you got it
2) It's per filesystem so all partitions default to 5% reserved space.
3) FHS doesn't address reserved disk space; AFAIK 5% is the default and I don't think it varies by distribution but a maintainer could always modify source code. No idea whether any other distribution does that, though. I did search for Debian documentation but didn't find anything other than tune2fs' man page.
edit: I mentioned it above but this is configurable even on a running filesystem - the way I did it on my root partition waswhere -m sets the percentage of reserved space so -m 1 would set the reservation at 1% of the filesystem and decimals are supported so if someone had a really big drive wanted to do -m 0.5 that'd also work.
This would make a pretty easy how-to that folks might like so I'ma go write one
2) It's per filesystem so all partitions default to 5% reserved space.
3) FHS doesn't address reserved disk space; AFAIK 5% is the default and I don't think it varies by distribution but a maintainer could always modify source code. No idea whether any other distribution does that, though. I did search for Debian documentation but didn't find anything other than tune2fs' man page.
edit: I mentioned it above but this is configurable even on a running filesystem - the way I did it on my root partition was
Code: Select all
sudo tune2fs -m 1 /dev/nvme0n1p2
This would make a pretty easy how-to that folks might like so I'ma go write one
we see things not as they are, but as we are.
-- anais nin
-- anais nin