-
-
Save Myer921/5b87f12369e18646a1bbb9f92eb7d622 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