Installing CentOS in chroot under Debian/Ubuntu

If it doesn't fit in another category, ask it here.
Post Reply
daniel_summers
Posts: 4
Joined: 2006/05/01 02:04:25
Location: Albuquerque, NM, USA
Contact:

Installing CentOS in chroot under Debian/Ubuntu

Post by daniel_summers » 2007/08/07 04:02:41

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. ;)

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Installing CentOS in chroot under Debian/Ubuntu

Post by toracat » 2007/08/07 16:02:36

Using virtualization software is not an option for you? vmware server, virtualbox, etc. ?

daniel_summers
Posts: 4
Joined: 2006/05/01 02:04:25
Location: Albuquerque, NM, USA
Contact:

Re: Installing CentOS in chroot under Debian/Ubuntu

Post by daniel_summers » 2007/08/07 23:03:30

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.

michaelnel
Posts: 1478
Joined: 2006/05/29 16:50:11
Location: San Francisco, CA

Re: Installing CentOS in chroot under Debian/Ubuntu

Post by michaelnel » 2007/08/07 23:52:40

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!

daniel_summers
Posts: 4
Joined: 2006/05/01 02:04:25
Location: Albuquerque, NM, USA
Contact:

Re: Installing CentOS in chroot under Debian/Ubuntu

Post by daniel_summers » 2007/08/08 02:00:16

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.

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Installing CentOS in chroot under Debian/Ubuntu

Post by toracat » 2007/08/08 03:10:13

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.

Post Reply

Return to “CentOS 4 - Miscellaneous Questions”