Announcement

Collapse
No announcement yet.

Small /boot folder causing auto-update issues

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Errors] Small /boot folder causing auto-update issues

    Hello all,

    I had reinstalled Kubuntu about a year ago with LUKS and I am not sure how but my /boot directory was not provisioned with enough storage. After a few updates I had noticed the updates failing so I did some digging around. By running sudo dpkg --list 'linux-image*' I could easily see the old versions still installed. I would then run sudo dpkg --remove 'linux-image-VERSION' often with an additional 'linux-module-VERSION' included which would always free up enough space to perform the upgrade (This is how I upgraded to 22.04 for example)
    Click image for larger version

Name:	Screenshot_20221114_203535.png
Views:	145
Size:	727.5 KB
ID:	666749

    I have done this again to get the latest 22.10, however whenever I log in or fully reboot my workstation, I get a message that 5.15.0-52-generic failed to install
    Click image for larger version

Name:	Screenshot_20221114_201743.png
Views:	149
Size:	42.8 KB
ID:	666747
    Note: Open Discover/Repair System both open Discover updates page, in which it says "Up to date" in the center.
    I am not sure how relevant this is but the About page appears to show that the kernel version did indeed upgrade
    Click image for larger version

Name:	Screenshot_20221114_202118.png
Views:	138
Size:	88.5 KB
ID:	666748

    I am not too sure what my next step should be - I figured the only way to fix the /boot issue would be for another reinstall (Only manually make the partition sizes this time) or look for a live CD tool that lets me change the sizes (The one my company uses doesn't like working with LUKS I think.) As for the update error message, I was thinking about manually booting too an older kernel still installed, uninstalling the latest kernel and then try to update via discover after a reboot, but I thought I would reach out and get others opinions.
    Last edited by Meanmelter; Nov 22, 2022, 05:44 PM.

    #2
    Maybe: https://help.ubuntu.com/community/Re...ptedPartitions

    Probably be better to backup, repartition, and restore.

    Just a wild guess here (since you didn't provide any actual numbers like file sizes and partition size, etc.) but if you're using an nVIdia driver, it's possible your initrd-img has gotten much bigger than it was. With the nvidia driver and 5.15 series kernels the initramfs size nearly tripled. You could try and shrink the initramfs size by switching from "MODULES=most" to "MODULES=dep" and rebuild your initrd.img.

    To try this:
    Have at least 2 bootable kernels in case the one you update doesn't work. Alternately, make a backup copy of the initrd.img file on a thumb drive and have a bootable thumb drive available to restore it.

    Then edit /etc/initramfs-tools/initramfs.conf and on line 20, change "most" to "dep". This reduces the number of modules loaded into initramfs. Usually, this only reduces the generic ability to move the kernel to another system or boot after a hardware change requiring a specific kernel module - not a typical situation for most users.

    Once you've made the edit, then update ONE of the initramfs versions this way:

    Code:
    sudo update-initramfs -c -k 5.15.0-48-generic
    Obviously, use the kernel version you wish to test on instead of 5.15.0-48. The -c option will create an entirely new initramfs and it should be quite a bit smaller - by a third or so.

    Test by rebooting into the kernel version you updated. If it works, try the other and you should be good to go. If not, undo the edit and rebuild it again to restore "most" modules.

    BTW, I tried playing around with the different compression versions in the initramfs config, but it made very little difference is size. Reportedly, some compression types are faster than others, but I saw little if any difference in size.

    Please Read Me

    Comment


      #3
      ​Hey Oshunluvr,

      Sorry for the late response. Yesterday I got an update message to update to 5.15.0-53.generic which installed without issue and no longer displays the pop-up error message on login. In either case my /boot partition will probably get full again after enough update later. My apologies for not providing a screenshot of my drive's partition.
      Click image for larger version

Name:	Screenshot_20221119_113859.png
Views:	135
Size:	45.1 KB
ID:	666750
      I do in-fact use NVIDIA drivers so I applied the initramfs.conf change you mentioned.​​ It seemed to have taken up more space?
      Click image for larger version

Name:	Screenshot_20221119_154217.png
Views:	136
Size:	45.4 KB
ID:	666751

      Let me know if you think the /boot drive is too small and how much you recommend it should be - I should be able to go through that article you posted without issue. I backup my entire /home folder in the worse-case scenario via Kup (At least that what I think it's called)
      Last edited by Meanmelter; Nov 22, 2022, 05:45 PM.

      Comment


        #4
        Hard to believe removing modules from initramfs made it larger. On my laptop where I encountered a similar problem it went from 110MB to 60MB. I wonder why your results were different. Are you using the Ubuntu supplied dkms nVidia driver or downloading and installing from nVidia?

        I haven't used a separated boot drive in ages but I would want at least enough room for 4 kernels so about 800MB? My 22.04 install with 5.15.0-52 and -53 uses 250mb without nVidia or AMD drivers.

        As far as the post and info, far better to include as much relevant info to your issue from the get-go rather than wait for others to ask for it. You'll get more responses that way. Most people don't want to have to drag details out of a poster. For example, putting your system specs in your sig can be very helpful. Mine is supposed to be there, but I'm having trouble with my sig image and that's where I put the basic system specs....

        BTW, Welcome to KFN

        Please Read Me

        Comment


          #5
          Wait... Have my screenshots not been showing up on my forum posts this whole time!? I opened the thread today and they were all missing - I know for sure my initial post and second post had screenshots with system specs and examples I was talking about in the post... That is very annoying. I am going to try and re-upload them I guess?
          EDIT: Done. Hopefully now my issue makes more sense?

          Here is an LS -laS of my /boot directory with modules set to DEP. It is not full now, but once a few updates roll out I will update the thread again with the results.
          Click image for larger version

Name:	Screenshot_20221122_185132.png
Views:	138
Size:	477.7 KB
ID:	666753
          Last edited by Meanmelter; Nov 22, 2022, 05:58 PM.

          Comment


            #6
            Your posts in this thread have images.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


            • oshunluvr
              oshunluvr commented
              Editing a comment
              Not sure who you're talking to.

              I believe there pics weren't showing because they had less than 3 posts prior to the very last post.

              My sig pic is still not updating when I change it. The one that I cant seem to get rid over is two years old now. Going now to try again...

            #7
            I suspect your pics didn't show initially because you were under the post count that allows a user to post pics.

            Regardless, it looks to me like you have enough room in /boot as long as you do proper maintenance. You should be keeping only the last two kernels and removing any that are older. If you use the command line to update/full-upgrade with apt, then it should remove the oldest one with the "autoremove" command. Based on your pic above, you have -53, -52, and -50 installed.
            Code:
            uname -r
            will list the kernel in use. It should be -53. Run this:
            Code:
            sudo apt autoremove
            and it should automagically remove -50.
            Last edited by oshunluvr; Nov 23, 2022, 08:35 AM.

            Please Read Me

            Comment

            Working...
            X