Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Trying to clean up /boot with no luck :-(

  1. #1
    Join Date
    Jul 2009
    Location
    Denmark
    Posts
    20

    Default Trying to clean up /boot with no luck :-(

    hello - not entirely sure that this belongs here - if not, sorry.

    I am trying to clean up my /boot directory as it has run full

    Found a suggested approach using

    rpm -qa |grep ^kernel

    followed by

    rpm -e kernel-x.x.x-x.fc16.x86_64 kernel-devel-x.x.x-x.fc16.x86_64

    using all but the most recent kernel found

    luckily this system was not important - as I am unable to boot after doing so

    Q1: What is the recommended / OpenSuSE-way to do this?
    Q2: is there a way to recover the system after my attempt to do the house keeping? It's a virtual host (KVM)

    thanks in advance
    Jens

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,817
    Blog Entries
    15

    Default Re: Trying to clean up /boot with no luck :-(

    Quote Originally Posted by jens_middelfart View Post
    hello - not entirely sure that this belongs here - if not, sorry.

    I am trying to clean up my /boot directory as it has run full

    Found a suggested approach using

    rpm -qa |grep ^kernel

    followed by

    rpm -e kernel-x.x.x-x.fc16.x86_64 kernel-devel-x.x.x-x.fc16.x86_64

    using all but the most recent kernel found

    luckily this system was not important - as I am unable to boot after doing so

    Q1: What is the recommended / OpenSuSE-way to do this?
    Q2: is there a way to recover the system after my attempt to do the house keeping? It's a virtual host (KVM)

    thanks in advance
    Jens
    Hi
    Sure your in the right forum since you have fedora kernels?

    On openSUSE 13.1 there is a configuration change you can make to the zypper config to only keep the latest kernel. In saying that the systemd service purge-kernels.service should clean it up, else run this manually....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,798

    Default Re: Trying to clean up /boot with no luck :-(

    With a default openSUSE install if you opt for a separate boot partition you need to allow space for 3 kernels, this is about 400- 500 meg. You can adjust the zypper configuration so that old kernels are not kept. Basically when a new kernel is installed therr can be as many as 3 kernels once the newest successfully boots the oldest is removed.

  4. #4

    Default Re: Trying to clean up /boot with no luck :-(

    I just wish they had a release note about having multiple kernels enabled by default , oh well life goes on....


    Any way to edit zypp.conf

    First make a backup.

    Code:
    cp -v /etc/zypp/zypp.conf /etc/zypp/zypp.conf.orig
    Now to edit it.

    Code:
    printf '%s\n' 'g/^multiversion/s/^/# /' w | ed -s /etc/zypp/zypp.conf
    check what is in there.

    Code:
    grep '^[^#[]' /etc/zypp/zypp.conf
    Remove the other kernels that you do not use and you should only have one kernel installed at a time. The question is can you live with just one kernel installed? I can .
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,798

    Default Re: Trying to clean up /boot with no luck :-(

    As long a the new kernel does not break something. It really is nice to have a drop back/

    I believe the kernel policy is in the release notes. But it did start with 12.3 I think

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Trying to clean up /boot with no luck :-(

    On 2014-07-03 05:36, gogalthorp wrote:
    >
    > As long a the new kernel does not break something. It really is nice to
    > have a drop back/


    Indeed.

    But auto-creation of initrd can be a problem some times.

    > I believe the kernel policy is in the release notes. But it did start
    > with 12.3 I think


    Or earlier. The autopurge was a later addition.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  7. #7
    Join Date
    Jul 2009
    Location
    Denmark
    Posts
    20

    Default Re: Trying to clean up /boot with no luck :-(

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Sure your in the right forum since you have fedora kernels?

    On openSUSE 13.1 there is a configuration change you can make to the zypper config to only keep the latest kernel. In saying that the systemd service purge-kernels.service should clean it up, else run this manually....

    - Actually, I just copy/paste'd :-)
    I was unable to access the history on the box with the problem since it couldn't boot :-)

  8. #8
    Join Date
    Jul 2009
    Location
    Denmark
    Posts
    20

    Default Re: Trying to clean up /boot with no luck :-(

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Sure your in the right forum since you have fedora kernels?

    On openSUSE 13.1 there is a configuration change you can make to the zypper config to only keep the latest kernel. In saying that the systemd service purge-kernels.service should clean it up, else run this manually....

    Hi - yeah, I realised that some time ago, but I forgot to change the boot partition size for this (and frankly, a couple of other) system. So rather than making a fresh install I tried to get around with some cleaning.
    Seemed quite reasonable .... at least before I tried to do it :-)

  9. #9
    Join Date
    Jul 2009
    Location
    Denmark
    Posts
    20

    Default Re: Trying to clean up /boot with no luck :-(

    Quote Originally Posted by jetchisel View Post
    I just wish they had a release note about having multiple kernels enabled by default , oh well life goes on....


    Any way to edit zypp.conf

    First make a backup.

    Code:
    cp -v /etc/zypp/zypp.conf /etc/zypp/zypp.conf.orig
    Now to edit it.

    Code:
    printf '%s\n' 'g/^multiversion/s/^/# /' w | ed -s /etc/zypp/zypp.conf
    check what is in there.

    Code:
    grep '^[^#[]' /etc/zypp/zypp.conf
    Remove the other kernels that you do not use and you should only have one kernel installed at a time. The question is can you live with just one kernel installed? I can .
    - Thanks, I'll try this ASAP on another system.
    In fact, I don't mind allocating 500 MB boot (or 1G) - on the other hand I'm pretty sure I'll never use other kernels.
    What bothers me is wheter updating would also fill the 1G eventually

    -- jens

  10. #10

    Default Re: Trying to clean up /boot with no luck :-(

    Quote Originally Posted by jens_middelfart View Post
    What bothers me is wheter updating would also fill the 1G eventually
    Shouldn't happen.
    By default only the two most recent kernels are kept.

    Older ones should be removed automatically by that purge-kernels.service.
    Check that this is enabled:
    Code:
    systemctl status purge-kernels.service
    (or YaST->System->Services Manager)

    Btw, what you wrote in your first post would work on openSUSE as well, i.e. "rpm -qa|grep ^kernel" to get a list of the installed kernels, then run "rpm -e kernel-desktop-3.11.10-10" f.e. to remove a specific one.
    Or use YaST->Software Management, if you click on the "Versions" tab below the package list, you can install/remove specific versions.

    Of course you have to keep at least one kernel to be able to boot.

    The easiest way to recover the system would be to boot from an installation CD/DVD and select "Upgrade an existing installation". You might even de-select all packages to be installed (click on "Software" on the overview screen) except for the kernel.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •