Table of Contents
Version 0.0.1 is out
Release 0.0.1 is ready for download.
This is an initial release of yumbootstrap.
yumbootstrap is a tool for installing Yum-based distributions (Red Hat, CentOS, Fedora) in a chroot directory. Idea behind it is stolen from Debian's debootstrap.
The tool requires Yum to be installed in parent operating system (already true for Red Hat derivatives, apt-get install yum on Debians).
examples of use
Assuming you have already installed yumbootstrap, you have some example suites in /etc/yumbootstrap/suites: centos-5, centos-6 and some Fedoras.
# /usr/sbin/yumbootstrap --list-suites ... centos-5 centos-6 ... fedora-19 fedora-20 # /usr/sbin/yumbootstrap --verbose centos-6 /mnt/chroot/centos-6-chroot
Since the newly installed chroot doesn't share networking (/etc/resolv.conf) or repositories configuration with parent, it could be easier to use yumbootstrap's configuration.
# CHROOT=/mnt/chroot/centos-6-chroot # /usr/sbin/yumbootstrap --verbose --no-scripts centos-6 $CHROOT # yum --installroot=$CHROOT -c $CHROOT/yumbootstrap/yum.conf install ... # /usr/sbin/yumbootstrap --verbose --just-scripts $CHROOT
There's also a possibility to add own packages or package groups in command line:
# /usr/sbin/yumbootstrap --verbose --include=openssh-server --group=Core centos-6 /mnt/chroot/centos-6-chroot
- multilib support
- installation of architecture different than parent's (mainly: i686 under x86_64)
- installing Red Hat 6 under Red Hat 5 parent doesn't work (Yum has problems finding parts of repository metadata)
- Red Hat Network can't be used directly as a repository, you need to make a local mirror
- Fedora installation under Debian 6 (Squeeze) fails; it works flawlessly for Debian 7 (Wheezy)
- Red Hat 4 didn't provide Yum metadata on their installation media, so you will need add it manually; CentOS 4, on the other hand, is installable with no further work (it used Yum already)
How to download
Canonical repository location is at jarowit.
git clone http://dozzie.jarowit.net/code/yumbootstrap.git
There is a supplementary location at GitHub.
git clone https://github.com/dozzie/yumbootstrap
How to install
NOTE: Installation process is tested for building packages. If you want to make mess in your system by omitting package system, you are on your own.
You need casual package building tools for your distribution, either rpm-build (RPMs) or dpkg-dev with fakeroot (DEBs).
- Prepare source RPM (non-root privileges are fine here)
- Build binary RPM (unless you've taken care of building as non-root, you
need to be root here)
rpmbuild --rebuild yumbootstrap-*.src.rpm
- Install package with its dependencies (exact path should be printed by previous step); most probably it will be located in /usr/src/redhat/RPMS/noarch/yumbootstrap-*.rpm
- Build binary package
dpkg-buildpackage -b -uc
- Install package (../yumbootstrap*.deb) with its dependencies