[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Updating kernels impossible when /boot is getting full



Hello,

OP: You are pretty safe deleting (rm) vmlinuz* and initrd* things
from /boot that are related to any kernels you aren't actually
booted into at the time. That can give you back enough space to let
apt finish what it wants to do. Just remember to do:

# update-initramfs -u -k all

afterwards to regenerate the initrd for any installed kernel that
you do want to boot into next time.

I would suggest not deleting the initrd* for the current kernel
because if you find yourself unable to regenerate it for any reason
then you have a system that can't be rebooted. If you leave the
current kernel's files alone then at least you know you have a
known-good setup.

On Sun, Aug 01, 2021 at 10:51:59AM -0400, Gene Heskett wrote:
> So If you wind up reinstalling, make /boot a minimum of 2G so you do not 
> hit this situation in the lifetime of the hardware ever again, make 2x 
> you memory as swap, and split the rest into / and /home. It just works 
> for me, your storage will have room to keep itself clean and functional. 
> But YMMV. :)

There is very little advantage these days to separating out /boot
and /home etc on such devices. You are far better off just putting
it all in / and making sure you have backups a quick way to re-image
the thing.

If you absolutely must do it, I advise making a fairly small / (5G
or so counts as small these days) that has /boot in it (not separate
fs) and then do your other splits with a volume manager like LVM,
btrfs or ZFS.

Splitting things into multiple filesystems fundamentally invites
problems such as the one encountered in this thread - you guess
wrong and make something too small. Nobody is perfect or omniscient
so this happens quite often. Meanwhile a lot of the reasons for
splitting things up have been obsoleted back in the mists of time.
Just strongly consider not doing it any more and see if your life
improves.

At this point there will probably be some people who consider
themselves veterans saying that one must absolutely split things off
because of various reasons like differing mount options being
desirable, ability to re-use contents of /home after reinstall,
having multiple devices and wanting to suit filesystem contents to
drive characteristics, … or whatever. Most of that will not apply to
any given person, and if it does then I believe it's better done
with volume management.

So really think hard before splitting off a filesystem outside of
volume management. I believe it is more likely to cause problems
than it is to avoid problems.

I think I've heard all the arguments for doing it and I also agree
with some of them in some situations - but since the '90s we've had
volume management to help with this. If someone has come up with
some obscure reason why they must split their storage into multiple
mount points with no volume management then I don't need to hear
about it - I'm happy to believe them that it may be necessary for
their specific circumstances while also not agreeing that it's a
good idea in the general case!

Gene's recommendation is to not spare the drive capacity and be
generous, but then Gene recommends doing something that severely
restricts drive capacity: making hard-to-change decisions about
carving it up. I agree with Gene's suggestion to be generous with
capacity, and I suggest that is achieved by just giving it all to /
unless you have very very good reason not to (and then use volume
management if you must).

Cheers,
Andy


Reply to: