Created
February 20, 2014 15:23
-
-
Save ldx/9116170 to your computer and use it in GitHub Desktop.
Build a chroot with a CentOS 6.5 base install.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Build a chroot with a CentOS 6.5 base install. | |
# | |
CHROOT=/tmp/chroot | |
mkdir -p $CHROOT | |
mkdir -p $CHROOT/var/lib/rpm | |
rpm --rebuilddb --root=$CHROOT | |
wget http://fr2.rpmfind.net/linux/centos/6.5/updates/x86_64/Packages/centos-release-6-5.el6.centos.11.2.x86_64.rpm | |
rpm -i --root=$CHROOT --nodeps centos-release-6-5.*.rpm | |
yum --installroot=$CHROOT install -y rpm-build yum | |
mkdir -p $CHROOT/proc | |
mount --bind /proc $CHROOT/proc | |
mkdir -p $CHROOT/dev | |
mount --bind /dev $CHROOT/dev | |
mkdir -p $CHROOT/etc | |
cp /etc/resolv.conf $CHROOT/etc/resolv.conf | |
mkdir -p $CHROOT/root | |
cp $CHROOT/etc/skel/.??* $CHROOT/root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://vault.centos.org/6.5/updates/x86_64/Packages/centos-release-6-5.el6.centos.11.2.i686.rpm
http://vault.centos.org/6.5/updates/i386/Packages/centos-release-6-5.el6.centos.11.2.i686.rpm