folder boot full

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

folder boot full

Post by dallaramint »

HI,
I installed mint 20.3 on pc.
I tried to install 21.1 Vera and it asked me to do a timeshift.
then she got an error and on the next start she tells me that the boot has a size of 0 bytes, how can I fix it to return the size of the boot folder to an acceptable size?
Thank you.
HI
Last edited by LockBot on Sun Oct 22, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: folder boot full

Post by Cosmo. »

I think you mean upgrade, not install.


Why do you have a boot folder at all? Is this an encrypted system?
User avatar
karlchen
Level 23
Level 23
Posts: 18451
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: folder boot full

Post by karlchen »

Cosmo. wrote: Sat Apr 22, 2023 6:43 amWhy do you have a boot folder at all?
Every Linux Mint system has got the folder /boot. :wink:

By default, the folder /boot will be located on the same disk partition as the root filesystem /. In this default configuration, /boot can only be filled 100%, in case the root filesystem / itself is filled by 100%.

On some systems, however, the folder /boot is located on a dedicated disk partition and is a separate filesystem. Very often such a separate boot filesystem, holding only the folder /boot, will be insufficiently sized and will be filled 100% quickly by 1 or 2 kernel updates. Depends on the size of the filesystem /boot in such cases.

The output of terminal command df -h / /boot should illustrate whether / and /boot are on the same fileystem or whether they are on 2 separate filesystems. It should also illustrate which of the 2 filesystems has been filled by 100%.
Image
The people of Alderaan have been desperately fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 840 days now.
Lifeline
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: folder boot full

Post by Cosmo. »

Right, I typed slower, than I did think about the problem. Of course I should have pointed out, that a separately full boot folder can only exist, if the boot folder is on a separate partition. And this does of course lead to the question, why is this so and if this is perhaps an encrypted system, one of the mostly known reasons for a separate partition. I also should have asked for a boot partition instead of a boot folder, but the formulation of the topic lead me to this wording. (BTW: If a user complains explicitly about a full boot folder I do not assume, that (s)he means a full system partition. This is a justified suspicion.)
User avatar
karlchen
Level 23
Level 23
Posts: 18451
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: folder boot full

Post by karlchen »

Hey, hey, hey. No need to get excited. I know very well that you are aware of the differences between disk partition, filesystem and folder. :wink:
Image
The people of Alderaan have been desperately fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 840 days now.
Lifeline
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: folder boot full

Post by Cosmo. »

I don't know, if you can imagine, how unexcited I am.
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

hello, this is the result of df -h / /boot

Code: Select all

File system     Dim. Usati Dispon. Uso% Montato su
/dev/sda6        96G   23G     69G  25% /
/dev/sda5       4,6G  4,4G       0 100% /boot
I don't remember why they are on 2 different file systems being also a beginner in linux.

being the boot folder at 100%, can this give me problems for future updates?

Thank you

HI
Last edited by karlchen on Mon Apr 24, 2023 3:52 am, edited 1 time in total.
Reason: added [c] [/c] and [code] [/code] tags as appropriate
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: folder boot full

Post by Cosmo. »

It gives you a problem already now. You did not answer, if this is an encrypted system.

Besides that: Is this a 100 GB drive or are there also other partitions on the drive (for Windows)?

On the long run we must change the partition sizes.
linux-rox
Level 10
Level 10
Posts: 3355
Joined: Sun Jul 19, 2020 9:17 pm

Re: folder boot full

Post by linux-rox »

Cosmo. wrote: Sun Apr 23, 2023 10:45 am On the long run we must change the partition sizes.
Wouldn't it be easier to delete all but the most recent two or three kernels? The boot partition is plenty large enough (4.6 GB).
User avatar
karlchen
Level 23
Level 23
Posts: 18451
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: folder boot full

Post by karlchen »

I agree.
/dev/sda5 4,6G 4,4G 0 100% /boot
A /boot partition of 4.6 GB total size must have been filled by a long list of kernel updates. - The most likely explanation.
Or it has been used to store data as well, which should not be stored in /boot.

A simple ls -l /boot should give a first hint, whether there is a long list of obsolete kernels or not.
In case there is, then it is time to clean up by uninstalling all obsolete kernels, just preserving the current kernel and the previous kernel.
Image
The people of Alderaan have been desperately fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 840 days now.
Lifeline
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

HI,
I already deleted the old kernels and if you see ls -la -h /boot

~$ ls -la -h /boot/
totale 208M
drwxr-xr-x 6 root root 4,0K apr 21 13:54 .
drwxr-xr-x 19 root root 4,0K lug 2 2022 ..
-rw-r--r-- 1 root root 233K giu 15 2022 config-5.4.0-121-generic
-rw-r--r-- 1 root root 233K mar 21 10:50 config-5.4.0-147-generic
drwxr-xr-x 4 root root 4,0K apr 21 13:54 grub
lrwxrwxrwx 1 root root 28 apr 21 13:48 initrd.img -> initrd.img-5.4.0-147-generic
-rw-r--r-- 1 root root 87M apr 21 13:53 initrd.img-5.4.0-121-generic
-rw-r--r-- 1 root root 87M apr 21 13:54 initrd.img-5.4.0-147-generic
lrwxrwxrwx 1 root root 28 mar 27 17:36 initrd.img.old -> initrd.img-5.4.0-121-generic
drwx------ 2 root root 16K set 9 2021 lost+found
-rw------- 1 root root 4,6M giu 15 2022 System.map-5.4.0-121-generic
-rw------- 1 root root 4,6M mar 21 10:50 System.map-5.4.0-147-generic
drwxr-xr-x 9 root root 4,0K apr 9 18:06 timeshift
drwx------ 4 root root 4,0K apr 10 12:47 .Trash-0
lrwxrwxrwx 1 root root 25 apr 21 13:48 vmlinuz -> vmlinuz-5.4.0-147-generic
-rw------- 1 root root 14M giu 15 2022 vmlinuz-5.4.0-121-generic
-rw------- 1 root root 14M mar 21 15:13 vmlinuz-5.4.0-147-generic
lrwxrwxrwx 1 root root 25 mar 27 17:36 vmlinuz.old -> vmlinuz-5.4.0-121-generic

occupies only 208 M , against more than 4 gigabytes

I don't understand what it can be filled with
linux-rox
Level 10
Level 10
Posts: 3355
Joined: Sun Jul 19, 2020 9:17 pm

Re: folder boot full

Post by linux-rox »

Let's try sudo du -xhd1 /boot | sort -hr. Please use code tags when reporting the output.
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

HI,

here is what is seen

Code: Select all

~$ sudo du -xhd1 /boot | sort -hr
4,4G	/boot
4,2G	/boot/.Trash-0
7,1M	/boot/grub
32K	/boot/timeshift
16K	/boot/lost+found

the problem I would say is in the .Trash folder.

is it possible to delete it?

even if the folder starts with the . and is it hidden?
linux-rox
Level 10
Level 10
Posts: 3355
Joined: Sun Jul 19, 2020 9:17 pm

Re: folder boot full

Post by linux-rox »

dallaramint wrote: Mon Apr 24, 2023 1:18 pm Is it possible to delete it?
Easily done, but I think it's worth making an attempt to figure out how this happened, so it doesn't happen again.

To this end, I request that you report the output of sudo ls -la /boot/.Trash-0, again using code tags. Might be a very long output, depending on whether the list is files only or mostly/entirely sub-folders. Won't matter how long, though, if you use code tags, as they automatically keep the display window to a manageable size. Please indicate whether you recognize the files/folders and when/why they were deleted.

Once you have done the investigative work, the folder can be emptied with sudo rm -r /boot/.Trash-0/*. I'm having you empty rather than delete the folder for the time being. We might delete the folder later.
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

HI,

here what you see

Code: Select all

sudo ls -lah /boot/.Trash-0
totale 16K
drwx------ 4 root root 4,0K apr 10 12:47 .
drwxr-xr-x 6 root root 4,0K apr 21 13:54 ..
drwx------ 3 root root 4,0K apr 10 12:47 files
drwx------ 2 root root 4,0K apr 10 12:47 info

I don't understand, before it says 4.2G and now with this search it says only 16K
I just don't understand
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

i tried to do with the previous command as well, the du command

and it does so

Code: Select all

sudo du -xhd1 /boot/.Trash-0/
8,0K	/boot/.Trash-0/info
4,2G	/boot/.Trash-0/files
4,2G	/boot/.Trash-0/

and here it is 4.2 G

I do not understand
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

HI,
maybe I think I understand what may have happened.
while I was upgrading to 21.1 Vera, I had timeshifted and then moved on, but then had to abort the upgrade.
having interrupted, maybe he put the files he had already downloaded in the Trash folder under the boot folder
linux-rox
Level 10
Level 10
Posts: 3355
Joined: Sun Jul 19, 2020 9:17 pm

Re: folder boot full

Post by linux-rox »

Just so you understand, what you are up against now is my cautious streak. I don't like to delete 4.2 GB in files without knowing what they are and confirming they're superfluous. If you don't care or are confident nothing valuable is in that folder, you can proceed to delete. Alternatively, you could poke around with File Manager, which will be easier and faster, just not something anyone here can review. You might have to open File Manager as Root/Admin, as the folders are owned by user-root. Right-click somewhere blank in the right pane of regular File Manager and choose the option.

By the way, the reason for the difference, 16K vs 4.2 GB, is that the ls command was reporting only the size of the files at that level (/boot/.Trash-0), i.e., the directories but not their contents. By contrast, the du command was reporting both.

Once you're ready to delete, let's just get it over with: sudo rm -r /boot/.Trash-0. This will remove the folder and its contents. Done.
dallaramint
Level 1
Level 1
Posts: 16
Joined: Sat Apr 22, 2023 4:39 am

Re: folder boot full

Post by dallaramint »

HI,
ok i fixed it.
I have 2 more questions. one related to this post and the other not.

first. could I reduce the 4G boot folder to 1G?

second. maybe I have to open another post but I ask for confirmation here.

I upgraded to mint 21.1. I had to restart the computer but, it doesn't go on, it tells me that I have to load a kernel first, can I have a little help?
Thank you
linux-rox
Level 10
Level 10
Posts: 3355
Joined: Sun Jul 19, 2020 9:17 pm

Re: folder boot full

Post by linux-rox »

Original issue solved? Excellent.

As regards the first question, 1 GB is sufficient if you are conscientious about kernel management. The current kernel plus two spares (known to work, as they were what I used before upgrading to the current one) runs right at 500 MB. On the other hand, the Mint default in LM21 for an encrypted system (which requires a separate boot partition) is nearly 2 GB, so I'd say that's the official recommendation.

On the other hand, I don't see any point to shrinking the boot partition in your case. The system partition (sda6) has plenty of room (only 25% used). Meanwhile, resizing partitions is relatively safe, but there is always a non-zero risk of something going wrong. By the way, if you end up reinstalling, don't bother with a boot partition. Not needed (unless using FDE), nor even any advantage.

The second question is complicated. Please start a new thread. Read how to get help first and be sure to include your system information.
Locked

Return to “Installation & Boot”