[kwlug-disc] One distro, another kernel?

Paul Nijjar paul_nijjar at yahoo.ca
Mon Apr 12 12:47:49 EDT 2010


On Mon, Apr 12, 2010 at 12:17:12PM -0400, Richard Weait wrote:
> How wrong is this?
> 
> Could one, for example, run Ubuntu on a Centos kernel?

In principle, yes. I can think of two strategies to try this out: 

0. Get the CentOS kernel sources that are patched with specific CentOS
features. Then compile that kernel on your Ubuntu box with
kernel-package. This will give you a .deb that you can install on your
Ubuntu machine as a "custom" kernel. 

You could keep pace with the CentOS kernel tree as much as you wanted,
but you would need to recompile that kernel every so often. 

Of course this is not EXACTLY a CentOS kernel, but it should be
configured pretty closely to one. Maybe that is good enough for
government work.

I guess you could try the "alien" utility to install the CentOS 
.rpm files directly, but that sounds like a world of pain. 

1. As Chris suggested, you could make a CentOS chroot environment. If
you chroot into that environment you would be running the old Ubuntu
kernel in the CentOS directory tree. That is not a perfect solution
but it would illustrate some things that break right away. 

If your question was the other way around I would have recommended
running debootstrap to generate a Ubuntu chroot. 

Five seconds of intense websearching gives me "Mock" as one
possibility and "febootstrap" as another: 

http://fedoraproject.org/wiki/Extras/MockTricks
http://rwmj.wordpress.com/2009/03/19/febootstrap-fedora-equivalent-of-debootstrap/

Things I would expect would break: udev stuff, RAID configurations,
GRUB locations (especially if one system uses GRUB 2). 

-- 
http://pnijjar.freeshell.org





More information about the kwlug-disc mailing list