[vox-tech] Kernel compiles with a dash of debian magic

David Hummel dhml at comcast.net
Wed Jan 26 15:44:39 PST 2005


On Wed, Jan 26, 2005 at 01:54:00PM -0800, Richard Burkhart wrote:
> 
> I'm trying to learn the arcane art of kernel compiles ... my goal is to 
> get ndiswrapper compiled as a module, operational, and driving a linksys 
> wireless card.
> 
> Thanks to a guide at http://www.osnews.com/story.php?news_id=2949 I've 
> got the 'compile' part down, using make-kpkg to build the kernel image 
> as a .deb file and automagically install it.

As long as you understand the traditional way to compile the kernel, the
Debian kernel-package way is a good way to compile and manage your
kernels.  Don't be discouraged from doing it this way.

> Of *course* there's something I'll do wrong.  Last night's attempt to 
> build a trimmed 2.4.29 kernel is kernel panic'ing in the boot process.  
> Sooo ... time to try again. Except --  how do I get rid of the damaged 
> kernel & modules so I can try again? 
> 
> The guide at  http://newbiedoc.sourceforge.net/system/kernel-pkg.html 
> suggests the command "dpkg -P /boot/(kernel image name)" to uninstall 
> it.  That didn't work  

No, that document says:

# dpkg -P kernel-image-2.4.18.030309

which is correct.

> Trying to remove the kernel through 'dpkg (-r / -P) [kernel image .deb 
> name]' isn't doing anything either.  (I read the dpkg manpage and 
> guessed at that part).
> 
> - Is there a way through dpkg to clear out my damaged 2.4.29 kernel (w) 
> any of its other wreckage (modules, etc).

Yes:

$ dpkg --purge kernel-image-2.4.29-xxx

The argument to --purge is the package name, not the package file name.

> - Where on the filesystem do I need to go through to manually remove 
> the flipping thing?  (The kernel image, the modules directory, the 
> entries in GRUB, etc.)?

You shouldn't have to do this since the above command should work, but
as Pete said, everything listed by:

$ dpkg -L kernel-image-2.4.29-xxx

which will include:

/boot/config-2.4.29-xxx
/boot/vmlinuz-2.4.29-xxx
/boot/System.map-2.4.29-xxx
/lib/modules/2.4.29-xxx/
/usr/share/doc/kernel-image-2.4.29-xxx/

And of course modify your boot loader's config:

grub: /boot/grub/menu.lst
lilo: /etc/lilo.conf

-David


More information about the vox-tech mailing list