Mailing List Archive

Boot has no space left.
Hello,

I was updating my gentoo install, and now it says that /boot has 0
bytes, however i don't know why since i never save anything in that folder.

Any idea on what can i do?

Thanks.
Re: Boot has no space left. [ In reply to ]
Guillermo García wrote:
> Hello,
>
> I was updating my gentoo install, and now it says that /boot has 0
> bytes, however i don't know why since i never save anything in that
> folder.
>
> Any idea on what can i do?
>
> Thanks.
>
>
>


I'd start by doing this:

du -shc /boot/* | sort -h

That will show the size of files in /boot and sort them from smallest to
largest. It could be that you have a large number of kernels and maybe
init thingys in there.  If so, some house cleaning may be required. 

Dale

:-)  :-) 
Re: Boot has no space left. [ In reply to ]
On Monday, 27 June 2022 11:03:51 BST Dale wrote:
> Guillermo García wrote:
> > Hello,
> >
> > I was updating my gentoo install, and now it says that /boot has 0
> > bytes, however i don't know why since i never save anything in that
> > folder.
> >
> > Any idea on what can i do?
> >
> > Thanks.
>
> I'd start by doing this:
>
> du -shc /boot/* | sort -h
>
> That will show the size of files in /boot and sort them from smallest to
> largest. It could be that you have a large number of kernels and maybe
> init thingys in there. If so, some house cleaning may be required.
>
> Dale
>
> :-) :-)

Also check the output of mount, or findmnt, to determine if /boot is the
mountpoint of a partition and if it is currently mounted or not.

The /boot directory is typically where the boot manager files are installed, as
well as the kernel & initrd images, kernel config and System.map files.
Re: Boot has no space left. [ In reply to ]
On 2022-06-27 05:03-0500 Dale <rdalek1967@gmail.com> wrote:

> Guillermo García wrote:
> > Hello,
> >
> > I was updating my gentoo install, and now it says that /boot has 0
> > bytes, however i don't know why since i never save anything in that
> > folder.
> >
> > Any idea on what can i do?
> >
> > Thanks.
> >
> >
> >
>
>
> I'd start by doing this:
>
> du -shc /boot/* | sort -h
>
> That will show the size of files in /boot and sort them from smallest
> to largest. It could be that you have a large number of kernels and
> maybe init thingys in there.  If so, some house cleaning may be
> required. 

app-admin/eclean-kernel can help with automating the house cleaning. ????
Re: Boot has no space left. [ In reply to ]
Dnia 2022-06-27, o godz. 10:35:49
Guillermo García <guillermo18barresiones@gmail.com> napisa?(a):

> Hello,
>
> I was updating my gentoo install, and now it says that /boot has 0
> bytes, however i don't know why since i never save anything in that
> folder.
>
> Any idea on what can i do?
>
> Thanks.
>
>

Hello,

Check if there are old kernels (posibly along with initramfs if you use
them). After a while (especially if your /boot partition is not that
big or you use testing kernels) thay can add up to quite some
megabytes.

Hope that helps

--
xWK
Boot has no space left. [ In reply to ]
Hello guys,

Sorry for not replying the first email i sent, however i got covid and i
cannot reply you, i forgot the original mail i sent here so i make a new
one.

This is the same as my previous one, boot has no space left, here you
have a df -h output inside /boot:

Again, thank you all for your help :)

Regards,

Guillermo.
Re: Boot has no space left. [ In reply to ]
Guillermo García wrote:
>
> Hello guys,
>
> Sorry for not replying the first email i sent, however i got covid and
> i cannot reply you, i forgot the original mail i sent here so i make a
> new one.
>
> This is the same as my previous one, boot has no space left, here you
> have a df -h output inside /boot:
>
> Again, thank you all for your help :)
>
> Regards,
>
> Guillermo.
>


Now do a ls -al for /boot.  There has to be something in there taking up
all that space.  ;-)

Glad you feeling better.

Dale

:-)  :-)
Re: Boot has no space left. [ In reply to ]
On 6/30/22 12:19, Guillermo García wrote:
> Hello guys,
>
> Sorry for not replying the first email i sent, however i got covid and i
> cannot reply you, i forgot the original mail i sent here so i make a new
> one.

If you don't have the replies in your mailbox, you can find them on the
mailing list archive:
https://archives.gentoo.org/gentoo-user/message/ba92573a301b482184cdfe790704110c

Regards,
Julien
Re: Boot has no space left. [ In reply to ]
On 30/06/2022 18:47, Julien Roy wrote:
> On 6/30/22 12:19, Guillermo García wrote:
>> Hello guys,
>>
>> Sorry for not replying the first email i sent, however i got covid
>> and i cannot reply you, i forgot the original mail i sent here so i
>> make a new one.
>
> If you don't have the replies in your mailbox, you can find them on
> the mailing list archive:
> https://archives.gentoo.org/gentoo-user/message/ba92573a301b482184cdfe790704110c
>
> Regards,
> Julien
Re: Boot has no space left. [ In reply to ]
On 30/06/2022 20:11, Guillermo wrote:
> [screenshot]

Doesn't "emerge -a --depclean" remove all these old kernels?
Re: Re: Boot has no space left. [ In reply to ]
Hello,

I still have the same problem, but the command worked fine.

On 30/06/2022 19:24, Nikos Chantziaras wrote:
> On 30/06/2022 20:11, Guillermo wrote:
>> [screenshot]
>
> Doesn't "emerge -a --depclean" remove all these old kernels?
>
>
Re: Re: Boot has no space left. [ In reply to ]
On Thursday, 30 June 2022 19:15:33 BST Guillermo wrote:
> Hello,
>
> I still have the same problem, but the command worked fine.

The command "emerge -a --depclean" will only remove uninstall the kernel
packages, but will not remove files from /usr/src/, or old kernel images and
files from /boot/.

Your /boot partition is full with old kernels you probably no longer use or
need. You have to remove them manually as part of your regular maintenance of
your installation, or you can install and use 'app-admin/eclean-kernel' as
mentioned in the previous thread, to partly automate the cleanup process of
stale kernels. Then update your GRUB to refresh the boot menu.
Re: Re: Boot has no space left. [ In reply to ]
On 30/06/2022 19:23, Michael wrote:
> On Thursday, 30 June 2022 19:15:33 BST Guillermo wrote:
>> Hello,
>>
>> I still have the same problem, but the command worked fine.
> The command "emerge -a --depclean" will only remove uninstall the kernel
> packages, but will not remove files from/usr/src/, or old kernel images and
> files from/boot/.

As far as I'm aware, depclean only installs files it installed, so it
leaves quite a lot of garbage lying around from kernels, including the
/usr/src/kernel-xx-xx-xx directory and various files involved in making
your kernel, that you've modified.

Cheers,
Wol
Re: Re: Boot has no space left. [ In reply to ]
The OP should read the section of the Gentoo manual on kernel install to
learn what files are installed where. Yea, but just rm the kernels and
initramfs's from /boot and you're golden. FWIW, I usually only upgrade my
kernel when it's a major revision.

On Thu, Jun 30, 2022 at 12:39 PM Wols Lists <antlists@youngman.org.uk>
wrote:

> On 30/06/2022 19:23, Michael wrote:
> > On Thursday, 30 June 2022 19:15:33 BST Guillermo wrote:
> >> Hello,
> >>
> >> I still have the same problem, but the command worked fine.
> > The command "emerge -a --depclean" will only remove uninstall the kernel
> > packages, but will not remove files from/usr/src/, or old kernel images
> and
> > files from/boot/.
>
> As far as I'm aware, depclean only installs files it installed, so it
> leaves quite a lot of garbage lying around from kernels, including the
> /usr/src/kernel-xx-xx-xx directory and various files involved in making
> your kernel, that you've modified.
>
> Cheers,
> Wol
>
>

--
Lee ????
<ny6p01@gmail.com>
Re: Re: Boot has no space left. [ In reply to ]
and don't forget to run "uname -a" to get your currently running kernel
version and make sure you don't delete that!

"IF" "uname -a" isn't the latest version you have in /boot, some more
investigation as to why will be needed.

BillK


On 1/7/22 04:29, Lee wrote:
> The OP should read the section of the Gentoo manual on kernel install
> to learn what files are installed where. Yea, but just rm the kernels
> and initramfs's from /boot and you're golden. FWIW, I usually only
> upgrade my kernel when it's a major revision.
>
> On Thu, Jun 30, 2022 at 12:39 PM Wols Lists <antlists@youngman.org.uk>
> wrote:
>
> On 30/06/2022 19:23, Michael wrote:
> > On Thursday, 30 June 2022 19:15:33 BST Guillermo wrote:
> >> Hello,
> >>
> >> I still have the same problem, but the command worked fine.
> > The command "emerge -a --depclean" will only remove uninstall
> the kernel
> > packages, but will not remove files from/usr/src/, or old kernel
> images and
> > files from/boot/.
>
> As far as I'm aware, depclean only installs files it installed, so it
> leaves quite a lot of garbage lying around from kernels, including
> the
> /usr/src/kernel-xx-xx-xx directory and various files involved in
> making
> your kernel, that you've modified.
>
> Cheers,
> Wol
>
>
>
> --
> Lee ???? 
> <ny6p01@gmail.com>
Re: Re: Boot has no space left. [ In reply to ]
William Kenworthy wrote:
>
> and don't forget to run "uname -a" to get your currently running
> kernel version and make sure you don't delete that!
>
> "IF" "uname -a" isn't the latest version you have in /boot, some more
> investigation as to why will be needed.
>
> BillK
>
>


Just to add another method.  I have uprecords installed here.  It lists
the kernels and their uptime.  I keep the last two with reasonably high
uptimes with fairly recent version and the most recent kernel.  I don't
upgrade automatically so I control what and when I update.  Of course, I
also have long uptimes as well.  My thinking on this.  I want kernels
that are known to be stable that I can use as a backup boot option but I
also want newer kernels that have fixes etc in them.  By keeping a
couple with long uptimes, I get stable kernels.  By also picking a
recent kernel version, I get a kernel that I can boot into to see if it
is stable.  Over time, the versions get higher on both parts.  When I do
my checks, I look for kernels with at least 30 days or more of uptime. 
Generally, if a kernel can run that length of time, it is pretty
stable.  That said, I have some with many months of uptime.

When I upgrade to a new kernel, I run for a month or so and then
manually clean out /boot, that would include kernel, init thingy,
System.map and config files. 

Seeing this reminds me it might be a good time to look into updating,
even tho I might not reboot for a while yet. 

Just a thought. 

Dale

:-)  :-) 
Re: Re: Boot has no space left. [ In reply to ]
On 01/07/2022 00:21, Dale wrote:
> When I upgrade to a new kernel, I run for a month or so and then
> manually clean out /boot, that would include kernel, init thingy,
> System.map and config files.
>
> Seeing this reminds me it might be a good time to look into updating,
> even tho I might not reboot for a while yet.

When I update, I wait until I'm happy the new one seems okay, and then I
just leave the most recent one and the one before.

That said, I need to upgrade, and I need to see if my random hangs are
fixed (there's apparently a bug in the Ryzen 3000, and I'm guessing
that's what I'm hitting).

Cheers,
Wol
Re: Re: Boot has no space left. [ In reply to ]
Wols Lists wrote:
> On 01/07/2022 00:21, Dale wrote:
>> When I upgrade to a new kernel, I run for a month or so and then
>> manually clean out /boot, that would include kernel, init thingy,
>> System.map and config files.
>>
>> Seeing this reminds me it might be a good time to look into updating,
>> even tho I might not reboot for a while yet.
>
> When I update, I wait until I'm happy the new one seems okay, and then
> I just leave the most recent one and the one before.
>
> That said, I need to upgrade, and I need to see if my random hangs are
> fixed (there's apparently a bug in the Ryzen 3000, and I'm guessing
> that's what I'm hitting).
>
> Cheers,
> Wol
>
>


After my previous reply, I updated to a newer kernel.  It's in /boot but
it may be months before I reboot.  Anyway, I currently have four kernels
in /boot.  My current running kernel and two backup kernels plus the new
untested one.  Whenever I get around to rebooting and the new kernel
works fine, I'll remove the oldest one including sources etc. 

I try to keep at least two backup kernels.  One reason I do that, the
init thingy.  I admit dracut is working well for me but given the
history I have with those thingys, I want extra protection.  The odds of
three boot options going bad are pretty slim and if it did happen, I
likely have a serious hard drive problem anyway, file system at the very
least.  Either way, I have a lot to worry about. 

Maybe one of the suggestions mentioned here will help the OP.  It seems
he is letting the updater do the install or something and the kernel is
a fast moving target.  One has to have some way, automated or manual, to
clean up the unneeded bits.  I doubt most anyone makes their /boot to
large anyway.  Usually 300 or 400MBs is enough. 

Dale

:-)  :-) 
Re: Boot has no space left. [ In reply to ]
On 2022-07-15 00:21+0100 Wol <antlists@youngman.org.uk> wrote:

> On 15/07/2022 00:01, Dale wrote:
> > Guillermo García wrote:
> >>
> >> Hello again guys, how are you? I hope you're fine.
> >>
> >> I remember someone told me a program to use to remove old kernels
> >> in order to get more space on /boot, i tried to search the
> >> original message that the guy sent me trough this list, but i
> >> cannot find it.
> >>
> >> Here's a screenshot of my /boot folder:
> >>
> >> I guess the kernel version i use is this one:
> >>
> >> Could someone tell me a method to remove the old kernels in order
> >> to get more space in /boot?
> >>
> >> Thank you, and regards,
> >>
> >> Guillermo.
> >>
> >
> >
> > I found it for you.  The package is app-admin/eclean-kernel.  I
> > think there is a wiki page on the Gentoo website for that.  I
> > recall it being pretty easy to use.
> >
> Bear in mind, if the OP is running 5.15.10, that's the second oldest
> kernel in the list. If he's got five newer kernels there, is
> eclean-kernel going to assume the live kernel is out-of-date and
> delete it? NOT a good idea.
>
> The OP needs to make sure that both 5.15.41 and 5.15.48 are in his
> boot menu, AND that they both work, before risking clearing out the
> rest ...

The current kernel is never removed by eclean-kernel.

> The kernel choice algorithm is quite simple:
>
> 1. If the kernel is currently used, don't remove it;
> 2. If the kernel is referenced by a bootloader, don't remove it
> (unless ``--destructive``);
> 3. If auxiliary files do not map to existing kernel, remove them;
> 4. If ``--all`` is used, remove the kernel;
> 5. If kernel is not within *N* newest kernels (where *N* is the
> argument to ``-n``), remove it.

<https://github.com/mgorny/eclean-kernel/blob/master/README.rst>

Since the grub boot menu includes all kernels in /boot by default as
far as i know, it is probably necessary to run eclean-kernel with
--destructive and re-generate the boot menu afterwards.

Kind regards, tastytea
Re: Boot has no space left. [ In reply to ]
Wol wrote:
> On 15/07/2022 00:01, Dale wrote:
>> Guillermo García wrote:
>>>
>>> Hello again guys, how are you? I hope you're fine.
>>>
>>> I remember someone told me a program to use to remove old kernels in
>>> order to get more space on /boot, i tried to search the original
>>> message that the guy sent me trough this list, but i cannot find it.
>>>
>>> Here's a screenshot of my /boot folder:
>>>
>>> I guess the kernel version i use is this one:
>>>
>>> Could someone tell me a method to remove the old kernels in order to
>>> get more space in /boot?
>>>
>>> Thank you, and regards,
>>>
>>> Guillermo.
>>>
>>
>>
>> I found it for you.  The package is app-admin/eclean-kernel.  I think
>> there is a wiki page on the Gentoo website for that.  I recall it
>> being pretty easy to use.
>>
> Bear in mind, if the OP is running 5.15.10, that's the second oldest
> kernel in the list. If he's got five newer kernels there, is
> eclean-kernel going to assume the live kernel is out-of-date and
> delete it? NOT a good idea.
>
> The OP needs to make sure that both 5.15.41 and 5.15.48 are in his
> boot menu, AND that they both work, before risking clearing out the
> rest ...
>
> Cheers,
> Wol
>
> .
>


I've never used the tool.  I clean mine manually.  That way I know what
is going on.  Right now, I can't get a new kernel to boot cleanly.  I'm
stuck with a older one but it works.  I've tried two different version
but still fails with something.  Maybe next time. 

Dale

:-)  :-)