How can I set a Fedora 13 chroot inside of Fedora 16

asked 2012-10-05 22:57:35 -0600

Mohan G gravatar image

updated 2013-06-03 06:46:35 -0600


My host is Fedora-16 and I am trying to create a fedora-13 system inside chroot.

I am doing the following steps:

export CHROOT=/media/TestVol/
cd /tmp/
mkdir -p $CHROOT/var/lib/rpm
rpm --rebuilddb --root=$CHROOT
rpm -i --root=$CHROOT --nodeps fedora-release-13-1.noarch.rpm 
yum --installroot=$CHROOT install -y rpm-build yum  # This FAILS

It works fine until the last step, giving error about GPG key issue. It works if I use the same command with --nogpgcheck flag. Can anyone point me what is the issue and how to solve it ?

Also, I would like to assign a IP-address to the chroot environment and run services like httpd. Please let me know how it can be done.


edit retag flag offensive close merge delete


Please post the specific error you are getting.

mether gravatar imagemether ( 2012-10-05 23:49:55 -0600 )edit

It sounds like you really want to do more than just have a chrooted filesystem tree — you want to run a whole Fedora under the other one. Take a look at this question about containers, which might be a good approach. Or, you could look at KVM-based virtualization, which is the typical way to do this these days.

mattdm gravatar imagemattdm ( 2012-10-06 07:44:58 -0600 )edit

@Mohan — is there a key file at that location? If so, run rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386.

mattdm gravatar imagemattdm ( 2012-10-08 11:35:09 -0600 )edit

If there's not a lot of IO, VM overhead can be pretty low. But look at the link I posted above — containers don't have even that overhead. It's really the right way to do this.

mattdm gravatar imagemattdm ( 2012-10-08 12:51:58 -0600 )edit

Import them all. RPM won't mind.

mattdm gravatar imagemattdm ( 2012-10-09 08:15:37 -0600 )edit