PDA

View Full Version : Can I remove the kernel packages?



trojanfoe
20th January 2009, 01:50 AM
Hi there, I have compiled the vanilla 2.6.28 kernel with just the bits I need for my system and I would like to know if I can remove the Fedora kernel packages? I suspect not as there are probably dependencies with other packages. I have just installed from the kernel source directory and to do this properly I will probably have to create a package and install it in order to satisfy these dependencies? That's the way it's done under Ubuntu - is it the same under Fedora?

Cheers,
Andy

Hlingler
20th January 2009, 04:05 AM
Actually, you might be surprised at the relatively small number of packages that require a kernel to be present. However, since the default is now to keep three kernels, you might consider just doing so, unless that defeats your purpose. In which case, you had better get your compile done right....

V

sidebrnz
20th January 2009, 07:18 AM
It's been a long time since I've needed to compile a kernel. (Back when I started with Linux, sonny, you upgraded your kernel from a source tarball and liked it!) However, I do remember that there was an option to:

make clean

which cleaned things up, getting rid of all the .o files left behind by the compile. Don't know if that's what you need, but it does clear up some space if that's what you're after.

trojanfoe
20th January 2009, 09:09 AM
It's been a long time since I've needed to compile a kernel. (Back when I started with Linux, sonny, you upgraded your kernel from a source tarball and liked it!) However, I do remember that there was an option to:

make clean

which cleaned things up, getting rid of all the .o files left behind by the compile. Don't know if that's what you need, but it does clear up some space if that's what you're after.

No I just want to remove unnecessary packages from the system despite the fact that I have more than enough disk space - I think it's an obsessive-compulsive thing :)

Make clean won't help - that just cleans the objects from a built kernel directory - I want the equivalent of 'dpkg --purge linux-image-X.Y.Z' in Fedoraland.

Cheers,
Andy

trojanfoe
20th January 2009, 09:11 AM
Actually, you might be surprised at the relatively small number of packages that require a kernel to be present. However, since the default is now to keep three kernels, you might consider just doing so, unless that defeats your purpose. In which case, you had better get your compile done right....

V


Thanks for the reply. I will investigate building a vanilla kernel into a Fedora package - the whole reason I've installed Fedora at home is because we are considering it at work and building and sharing a custom package will be the only way to go in that situation.

Cheers,
Andy

trojanfoe
20th January 2009, 09:53 PM
Well I've decided to stick with the stock Fedora kernel, configuring it to personal taste and building it from the SRPM. However I am getting a complaint when trying to install that the currently installed kernel (of the same kernel release and Fedora release number) is newer than the custom kernel I'm trying to install. I have edited the buildid value and even hacked the kernel.spec file to replace the -REVISION value supplied by Fedora. Can anyone enlighten me as to how the rpm system evaluates the version number and comes to this conclusion? (my custom revision is '-andy02' compared with '-159' which should mean my revision is later?)

Cheers,
Andy

Hlingler
20th January 2009, 10:32 PM
No, it's number-then-alpha, so -159 precedes -andy* (the '1' precedes the 'a').

The full explanation: https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Package_Version

V

trojanfoe
21st January 2009, 01:58 AM
Many thanks once again Hlingler - I have switched back to the original kernel.spec file and simply used the date and all is well.

Cheers,
Andy