Results 1 to 4 of 4

Thread: Purge-kernels not working

  1. #1

    Default Purge-kernels not working

    Hi guys, how ya doing?

    I have this problem in the purge-kernels service that means I am slowly filling up my openSUSE partition with old kernels. I ran systemctl status purge-kernels and this is what I got:

    Code:
    purge-kernels.service - Purge old kernels
       Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled)
       Active: inactive (dead)
               start condition failed at Sat 2014-05-17 15:24:54 CEST; 29min ago
               ConditionPathExists=/boot/do_purge_kernels was not met
    What can I do to reactivate it?

    Thanks for reading and have a very nice day.

  2. #2

    Default Re: Purge-kernels not working

    Quote Originally Posted by Karmovorotin View Post
    Hi guys, how ya doing?

    I have this problem in the purge-kernels service that means I am slowly filling up my openSUSE partition with old kernels. I ran systemctl status purge-kernels and this is what I got:

    Code:
    purge-kernels.service - Purge old kernels
       Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled)
       Active: inactive (dead)
               start condition failed at Sat 2014-05-17 15:24:54 CEST; 29min ago
               ConditionPathExists=/boot/do_purge_kernels was not met
    What can I do to reactivate it?
    It is activated.
    But it is only run at boot if the file /boot/do_purge_kernels exists. This gets created when you install/update a kernel package.
    You can create it yourself of course to trigger the start of the purge-kernel script:
    Code:
    sudo touch /boot/do_purge_kernels
    Or just run the script yourself:
    Code:
    sudo /sbin/purge-kernels
    What kernels do you have installed btw? There only 2 in openSUSE 13.1 yet.
    Or are you running Tumbleweed?
    There's a known problem with the purge-kernels script in that it cannot cope with Tumbleweed's kernel versioning. (I don't know whether this is fixed yet, but I think not)
    The same is true for the kernels from the Kernel:stable repo I believe.

    You can uninstall unneeded kernel packages manually yourself as well though.
    Just select the kernel package in YaST->Software Management and click on the "Versions" tab below the package list to list all available/installed versions.
    Or specify the exact version to zypper, f.e.:
    Code:
    sudo zypper rm kernel-desktop-3.11.6-4.1
    Last edited by wolfi323; 17-May-2014 at 08:04.

  3. #3

    Default Re: Purge-kernels not working

    Quote Originally Posted by wolfi323 View Post
    It is activated.
    But it is only run at boot if the file /boot/do_purge_kernels exists. This gets created when you install/update a kernel package.
    You can create it yourself of course to trigger the start of the purge-kernel script:
    Code:
    sudo touch /boot/do_purge_kernels
    Or just run the script yourself:
    Code:
    sudo /sbin/purge-kernels
    What kernels do you have installed btw? There only 2 in openSUSE 13.1 yet.
    Or are you running Tumbleweed?
    There's a known problem with the purge-kernels script in that it cannot cope with Tumbleweed's kernel versioning. (I don't know whether this is fixed yet, but I think not)
    The same is true for the kernels from the Kernel:stable repo I believe.

    You can uninstall unneeded kernel packages manually yourself as well though.
    Just select the kernel package in YaST->Software Management and click on the "Versions" tab below the package list to list all available/installed versions.
    Or specify the exact version to zypper, f.e.:
    Code:
    sudo zypper rm kernel-desktop-3.11.6-4.1
    I added the Kernel_stable repo and right now I have 3.14 kernels. If it's a bad idea I can just remove it and revert to 3.11.

    I have several versions of the 3.14, so maybe the wisest thing is to remove the Kernel_stable repo and revert to the official 3.11, and then uninstall all 3.14 kernels. If you could help me do it without breaking anything I'd be most grateful.

    Thank you very much for your help!

  4. #4

    Default Re: Purge-kernels not working

    Quote Originally Posted by Karmovorotin View Post
    I added the Kernel_stable repo and right now I have 3.14 kernels. If it's a bad idea I can just remove it and revert to 3.11.
    Well, I wouldn't necessarily call it "a bad idea", but as I said, the purge-kernels script does not work with those package versions unfortunately.
    And it's unlikely to be fixed any more, because mkinitrd (which contains that script) is dead and has been replaced by dracut in Factory.

    So you _could_ try out dracut, it should be fixed there. I have no idea about dracut's status though.
    But better use the latest version from here:
    http://software.opensuse.org/downloa...package=dracut
    The one included in openSUSE 13.1 does not even have a purge-kernels script yet.

    Or have a look here:
    https://bugzilla.novell.com/show_bug.cgi?id=820367
    This also includes a patch that should fix the issue, which is part of latest dracut's purge-kernels. As /sbin/purge-kernels is only a script, you can easily change it yourself accordingly.
    Just open it in a text editor (as root), f.e. with:
    Code:
    kdesu kwrite /sbin/purge-kernels
    Just remove line 151:
    Code:
        return ($ver1 eq substr($ver2, 0, length($ver1)));
    and replace it with the following lines:
    Code:
        return 1 if $ver1 eq $ver2;
        # copied from kernel-source/rpm/kernel-spec-macros
        $ver2 =~ s/\.[0-9]+($|\.[^.]*[^.0-9][^.]*$)/$1/;
        return $ver1 eq $ver2;
    I have several versions of the 3.14, so maybe the wisest thing is to remove the Kernel_stable repo and revert to the official 3.11, and then uninstall all 3.14 kernels. If you could help me do it without breaking anything I'd be most grateful.
    I already told you how to uninstall specific kernel versions, see my previous post.

    Regarding your conflicts, I cannot say much without reading the exact messages.
    Last edited by wolfi323; 17-May-2014 at 09:50.

Posting Permissions

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