Re: imminent /boot problem.

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

 



On Thu, Feb 22, 2024 at 2:33 PM Mike Wright <nobody@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On 2/22/24 10:21, home user wrote:
> > (f-38; gnome)
> > Good morning,
> >
> > While doing my weekly "dnf upgrade" a little while ago, I got the
> > following pop-up at the top of the screen"
> > ------
> > Low Disk Space on"boot"
> > The volume "boot" has only 20.9 MB disk space remaining.
> >
> > Examine   Ignore
> > ------
> > Seeing that a new kernel needs...
> > over 74,000,000 (initrams*)
> > over 14,700,000 (vmlinuz*)
> > over  8,800,000 (System.map*)
> > over    200,000 (config*)
> > =============================
> > over 97,700,000 total,
> > I suspect that the next time I do weekly patches (next Thursday), it
> > will fail.
> >
> > I'm only keeping 2 old kernels now.  I did not do anything to shrink
> > /boot.  What has grown so much recently?  What do I delete?
> >
> > Here's what's in /boot:
> > -----
> > -bash.2[~]: ls -alS /boot
> > total 414860
> > -rw-------.  1 root root 116291735 Jun  1  2023
> > initramfs-0-rescue-70857e3fb05849139515e66a3fdc6b38.img
> > -rw-------.  1 root root  74107910 Feb  8 12:15
> > initramfs-6.7.3-100.fc38.x86_64.img
> > -rw-------.  1 root root  74063151 Feb 22 10:15
> > initramfs-6.7.5-100.fc38.x86_64.img
> > -rw-------.  1 root root  74060383 Feb 15 13:15
> > initramfs-6.7.4-100.fc38.x86_64.img
> > -rwxr-xr-x.  1 root root  14806856 Feb  4 17:00
> > vmlinuz-6.7.4-100.fc38.x86_64
> > -rwxr-xr-x.  1 root root  14786376 Jan 30 17:00
> > vmlinuz-6.7.3-100.fc38.x86_64
> > -rwxr-xr-x.  1 root root  14786376 Feb 16 17:00
> > vmlinuz-6.7.5-100.fc38.x86_64
> > -rwxr-xr-x.  1 root root  14329896 Jun  1  2023
> > vmlinuz-0-rescue-70857e3fb05849139515e66a3fdc6b38
> > -rw-r--r--.  1 root root   8851363 Feb 16 17:00
> > System.map-6.7.5-100.fc38.x86_64
> > -rw-r--r--.  1 root root   8850577 Feb  4 17:00
> > System.map-6.7.4-100.fc38.x86_64
> > -rw-r--r--.  1 root root   8849769 Jan 30 17:00
> > System.map-6.7.3-100.fc38.x86_64
> > -rw-r--r--.  1 root root    269368 Jan 30 17:00
> > config-6.7.3-100.fc38.x86_64
> > -rw-r--r--.  1 root root    269338 Feb 16 17:00
> > config-6.7.5-100.fc38.x86_64
> > -rw-r--r--.  1 root root    269327 Feb  4 17:00
> > config-6.7.4-100.fc38.x86_64
> > -rw-r--r--.  1 root root    147744 Jan  6 17:00 memtest86+x64.bin
> > drwx------.  2 root root     12288 Mar 17  2013 lost+found
> > dr-xr-xr-x.  6 root root      5120 Feb 22 10:15 .
> > dr-xr-xr-x. 22 root root      4096 Oct  5 14:40 ..
> > drwx------.  3 root root      1024 Jan 18  2023 efi
> > drwx------.  6 root root      1024 Feb 22 10:55 grub2
> > drwxr-xr-x.  3 root root      1024 Oct 11  2018 loader
> > -rw-r--r--.  1 root root       161 Nov  1 18:00
> > .vmlinuz-6.5.10-200.fc38.x86_64.hmac
> > -rw-r--r--.  1 root root       160 Oct 19 18:00
> > .vmlinuz-6.5.8-200.fc38.x86_64.hmac
> > -rw-r--r--.  1 root root       160 Jan 30 17:00
> > .vmlinuz-6.7.3-100.fc38.x86_64.hmac
> > -rw-r--r--.  1 root root       160 Feb  4 17:00
> > .vmlinuz-6.7.4-100.fc38.x86_64.hmac
> > -rw-r--r--.  1 root root       160 Feb 16 17:00
> > .vmlinuz-6.7.5-100.fc38.x86_64.hmac
> > lrwxrwxrwx.  1 root root        45 Feb  8 12:15
> > symvers-6.7.3-100.fc38.x86_64.xz ->
> > /lib/modules/6.7.3-100.fc38.x86_64/symvers.xz
> > lrwxrwxrwx.  1 root root        45 Feb 15 13:15
> > symvers-6.7.4-100.fc38.x86_64.xz ->
> > /lib/modules/6.7.4-100.fc38.x86_64/symvers.xz
> > lrwxrwxrwx.  1 root root        45 Feb 22 10:15
> > symvers-6.7.5-100.fc38.x86_64.xz ->
> > /lib/modules/6.7.5-100.fc38.x86_64/symvers.xz
>
> rm *6.7.3* would open up a lot and you'd still have 2 kernel versions

Yeah, it looks closer to 5 old kernels.

    #!/usr/bin/env bash

    mapfile -t old_kernels < <(dnf repoquery --installonly --latest-limit=-2 -q)
    if [ "${#old_kernels[@]}" -eq 0 ]; then
        echo "No old kernels found"
        clean_lib_modules
        exit 0
    fi

    if ! dnf -y remove "${old_kernels[@]}"; then
        echo "Failed to remove old kernels"
        exit 1
    fi

    # Force generation of new rescue kernel
    # https://discussion.fedoraproject.org/t/update-rescue-image
    # https://discussion.fedoraproject.org/t/questions-about-rescue-kernel
    # https://www.mail-archive.com/users@xxxxxxxxxxxxxxxxxxxxxxx/msg159032.html
    # https://www.reddit.com/r/Fedora/comments/wfr5hu/about_the_rescue_mode_on_fedora/
    echo "Generating new Rescue kernel"
    rm -f /boot/*rescue*
    kernel-install add "$(uname -r)" "/lib/modules/$(uname -r)/vmlinuz"

Jeff
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux