Last active
December 20, 2015 07:09
-
-
Save tjhartmann/6090793 to your computer and use it in GitHub Desktop.
Using yum to build chroot
This file contains hidden or 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
mkdir /path/to/chroot | |
rpm --root /path/to/chroot --initdb | |
wget http://repo_url/centos-release-version.rpm | |
rpm -i --nodeps --root /path/to/chroot /path/to/centos-release-version.rpm | |
yum --installroot=/path/to/chroot --nogpgcheck install -y yum rpm-build | |
# -or- | |
yum --installroot=/path/to/chroot --nogpgcheck groupinstall -y Base | |
# to use yum inside the chroot | |
mount --bind /proc /path/to/chroot/proc | |
mount --bind /dev /path/to/chroot/dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment