Page 1 of 1

Installing CentOS in chroot under Debian/Ubuntu

Posted: 2007/08/07 04:02:41
by daniel_summers
A little background on this seemingly odd request... :) I used to run White Box Enterprise Linux x86_64, and would provide x86_64 EL-based RPMs for the xine project. I now have a box running Ubuntu Feisty Fawn AMD64, and I'd like to resume building these binaries - I'm still getting over 100 downloads a month from RPMs that are approaching 2 years old.

I installed the "rpm" package in Ubuntu, which gave me rpmbuild. My normal process for making these RPMs was "rpmbuild -ta [tarball]", and it "just worked." Under Ubuntu, though, it's giving me an error like it can't find the spec file. Even when I specify the spec file, I get the error. So, I assume the package is hosed.

Googling brought me to rpmstrap, a script that will supposedly create a bare-bones rpm-based distro environment. However, it's outdated and no longer maintained (and maintenance is necessary - the version numbers of the RPMs it downloads are hard-coded).

I know that cross-platform building is possible using chroot. I thing it would also give me a better chance of the output actually working on an EL distribution, as it would be built against EL kernel headers. I've downloaded the CentOS 4.5 DVD, but now I'm stuck - what do I need to do to create a directory that can be used as a chroot jail? I've Googled that question, but the most hits I get is how to install Gentoo on Gentoo - not quite what I'm looking for. ;)

Re: Installing CentOS in chroot under Debian/Ubuntu

Posted: 2007/08/07 16:02:36
by toracat
Using virtualization software is not an option for you? vmware server, virtualbox, etc. ?

Re: Installing CentOS in chroot under Debian/Ubuntu

Posted: 2007/08/07 23:03:30
by daniel_summers
Hmm - last time I looked at VMWare, it cost money. Looks like it's free now - I'll give that a shot! Thanks for the suggestion.

Re: Installing CentOS in chroot under Debian/Ubuntu

Posted: 2007/08/07 23:52:40
by michaelnel
VMware is not free. Far from it. That said, at least for me, it's worth it on my personal workstation, and it works great!

Re: Installing CentOS in chroot under Debian/Ubuntu

Posted: 2007/08/08 02:00:16
by daniel_summers
From http://www.vmware.com/products/server/

"Begin enjoying the benefits of server virtualization with the free VMware Server."

But, the install gets to the point where it wants to build the "vmmon" module, and dies. :( The pages it points me to are ones that say "Installing on unsupported Linux distributions" or "Installing an unsupported guest OS", which isn't what I'm trying to do.

Do you think it would be worth building "rpm" from source on this box, then seeing if the resultant rpmbuild would run? It just doesn't make sense that the package is there, but doesn't work.

Re: Installing CentOS in chroot under Debian/Ubuntu

Posted: 2007/08/08 03:10:13
by toracat
Do you have kernel header files (include files)? I think some modules need to be built during the installation and that's when it failed.