Professional Web Applications Themes

Removing kernels - Linux Setup, Configuration & Administration

After the systems been running for a while, I now have several kernel, and kernel source installed. How can I remove the unneeded ones? Thanks...

Sponsored Links
  1. #1

    Default Removing kernels


    After the systems been running for a while, I now have several kernel, and
    kernel source installed. How can I remove the unneeded ones?

    Thanks


    Sponsored Links
    Coyote Guest

  2. #2

    Default Re: Removing kernels

    Coyote <dsrmyshortsaracnet.com> wrote:
    > After the systems been running for a while, I now have several kernel, and
    > kernel source installed. How can I remove the unneeded ones?
    "man rm".

    And don't boot 'em or compile 'em afterwards.

    Peter
    Peter T. Breuer Guest

  3. #3

    Default Re: Removing kernels

    Coyote wrote:
    > After the systems been running for a while, I now have several kernel, and
    > kernel source installed. How can I remove the unneeded ones?
    >
    > Thanks
    >
    >
    Well,, if you are running a Red Hat type system, why not try using rpm,
    which is perhaps how you got all those kernels in the first place.
    Remove all but the one you are running and the one before it.

    rpm -e kernel-smp-2.4.20-18.7

    for example.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 73926.
    /( )\ Shrewsbury, New Jersey [url]http://counter.li.org[/url]
    ^^-^^ 3:00pm up 29 min, 2 users, load average: 1.39, 1.26, 0.78

    Jean-David Beyer Guest

  4. #4

    Default Re: Removing kernels

    Peter T. Breuer wrote:
    >
    >
    > Coyote <dsrmyshortsaracnet.com> wrote:
    >
    >> After the systems been running for a while, I now have several kernel,
    >> and
    >> kernel source installed. How can I remove the unneeded ones?
    >
    > "man rm".
    >
    > And don't boot 'em or compile 'em afterwards.
    >
    > Peter
    Peter you know better than that, get it right it's rm -rf peter
    Baho Utot Guest

  5. #5

    Default Re: Removing kernels

    Jan Ceuleers wrote:
    > John Winters wrote:
    >
    >>In article <bi2tic023u6enews4.newsguy.com>,
    >>Coyote <dsrMYSHORTSaracnet.com> wrote:
    >>
    >>>After the systems been running for a while, I now have several kernel, and
    >>>kernel source installed. How can I remove the unneeded ones?
    >>
    >>rm ?
    >>
    >>If you want more specific advice, give more details.
    Hi

    Whenever removing a kernel image wothout adding a new won't cause
    troules to lilo except in the case you reference the deleted kernel (of
    course ;^) )

    However the kernel images are NOT disk consuming ( in the case you
    built them with compression) so IMHO it's better to keep them in order
    to restore the system if the new kernel gives you troubles.

    So : instead of deleting the kernel just move it to a special folder,
    edit /etc/lilo.conf in order not to reference the moved kernel and the
    rerun lilo paying attention to what he says.

    Greetz,

    Gus


    PD : For more hint try kernel-howto/ System Administrator Guide
    (SAG)/ google ...

    PDD : This advice is given 'as is' with no warranty ;^)

    Gustavo Perez Guest

  6. #6

    Default Re: Removing kernels

    >
    > However the kernel images are NOT disk consuming ( in the case you
    > built them with compression) so IMHO it's better to keep them in order
    > to restore the system if the new kernel gives you troubles.
    >
    > So : instead of deleting the kernel just move it to a special folder,
    > edit /etc/lilo.conf in order not to reference the moved kernel and the
    > rerun lilo paying attention to what he says.
    >
    > Greetz,
    >
    > Gus
    >
    >
    > PD : For more hint try kernel-howto/ System Administrator Guide (SAG)/
    > google ...
    >
    > PDD : This advice is given 'as is' with no warranty ;^)
    >
    Keep in mind that directories like /lib/modules/'erased kernel
    version' can be removed ONLY if no other kernel with the same version is
    running in your system.

    Moreover a nice option which is very usefull is EXTRAVERSION in the
    makefile provided to build the kernel. Using allways a different
    EXTRAVERSION will ensure that only one kernel is using the modules
    stored in /lib/modules/'kernel version'.EXTRAVERSION, so when deleting a
    kernel you may remove the associated modules directory.

    Luck,

    Gus

    Gustavo Perez Guest

  7. #7

    Default Re: Removing kernels

    Thanks. That's what I was looking for.

    I didn't think that rm was the way to go ;-)

    Dirk


    "Jean-David Beyer" <jdbeyerexit109.com> wrote in message
    news:3F4517B7.5080100exit109.com...
    > Coyote wrote:
    > > After the systems been running for a while, I now have several kernel,
    and
    > > kernel source installed. How can I remove the unneeded ones?
    > >
    > > Thanks
    > >
    > >
    >
    > Well,, if you are running a Red Hat type system, why not try using rpm,
    > which is perhaps how you got all those kernels in the first place.
    > Remove all but the one you are running and the one before it.
    >
    > rpm -e kernel-smp-2.4.20-18.7
    >
    > for example.
    >
    > --
    > .~. Jean-David Beyer Registered Linux User 85642.
    > /V\ Registered Machine 73926.
    > /( )\ Shrewsbury, New Jersey [url]http://counter.li.org[/url]
    > ^^-^^ 3:00pm up 29 min, 2 users, load average: 1.39, 1.26, 0.78
    >

    Coyote Guest

  8. #8

    Default Re: Removing kernels

    In article <3F451F84.C771465Acomputer.org>,
    Jan Ceuleers <janspam.ceuleerscomputer.org> wrote:
    >
    >John Winters wrote:
    >>
    >> In article <bi2tic023u6enews4.newsguy.com>,
    >> Coyote <dsrMYSHORTSaracnet.com> wrote:
    >> >
    >> >After the systems been running for a while, I now have several kernel, and
    >> >kernel source installed. How can I remove the unneeded ones?
    >>
    >> rm ?
    >>
    >> If you want more specific advice, give more details.
    >
    >Simply removing kernels may be dangerous, in that doing so will cause
    >lilo (when subsequently run on an unmodified lilo.conf) to fail, leaving
    >the system in an unbootable state.
    Not true. This will only happen if you delete a *current* kernel.
    The danger of course is that you can delete a current kernel and your
    system will still boot perfectly happy for a while (since LILO has
    made a note of where on the disc it is and the space hasn't been
    re-used), only to fail oddly later on when the space is re-cycled.

    John
    --
    The Linux Emporium - the source for Linux in the UK
    See [url]http://www.linuxemporium.co.uk/[/url]

    We had a woodhenge here once but it rotted.
    John Winters Guest

  9. #9

    Default Re: Removing kernels

    John Winters wrote:
    > In article <3F451F84.C771465Acomputer.org>,
    > Jan Ceuleers <janspam.ceuleerscomputer.org> wrote:
    >
    >>John Winters wrote:
    >>
    >>>In article <bi2tic023u6enews4.newsguy.com>,
    >>>Coyote <dsrMYSHORTSaracnet.com> wrote:
    >>>
    >>>>After the systems been running for a while, I now have several kernel, and
    >>>>kernel source installed. How can I remove the unneeded ones?
    >>>
    >>>rm ?
    >>>
    >>>If you want more specific advice, give more details.
    >>
    >>Simply removing kernels may be dangerous, in that doing so will cause
    >>lilo (when subsequently run on an unmodified lilo.conf) to fail, leaving
    >>the system in an unbootable state.
    >
    >
    > Not true. This will only happen if you delete a *current* kernel.
    > The danger of course is that you can delete a current kernel and your
    > system will still boot perfectly happy for a while (since LILO has
    > made a note of where on the disc it is and the space hasn't been
    > re-used), only to fail oddly later on when the space is re-cycled.
    Been there. Done that. Someone *else* had relocated the kernel, in a
    boot floppy image, and never run LILO for their moved kernel. So when I
    over-wrote that old block with a new file, *wham*.

    Nico Kadel-Garcia Guest

Similar Threads

  1. nvidia driver with two kernels
    By Zach Warren in forum Linux Setup, Configuration & Administration
    Replies: 2
    Last Post: July 31st, 06:44 AM
  2. 3 questions about pre-compiled kernels in woody
    By Paul E Condon in forum Debian
    Replies: 1
    Last Post: July 29th, 12:30 AM
  3. Switching stable kernels dhcp confusion
    By Adrian Zimmer in forum Debian
    Replies: 0
    Last Post: July 28th, 05:00 PM
  4. Patches for version 2.0.xx series kernels, and the 2.4.20
    By Gregg C Levine in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: July 23rd, 03:04 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139