Wednesday November 29, 2006 00:51
Building a Gentoo and Debian chroot Environment
Posted by as Information Insemination
If you’re wondering how to create a chroot environment in the first place while reading my previous post, then this post is for you.
Gentoo:
- Download gentoo stage 3 installer
wget http://mirror.gentoo.gr.jp/releases/x86/2006.1/stages/stage3-i686-2006.1.tar.bz2
mkdir chroot-gentoo
sudo tar xvjf stage3-i686-2006.1.tar.bz2 -C chroot-gentoo
sudo mount -o bind /dev chroot-gentoo/dev sudo mount -o bind /proc chroot-gentoo/proc
sudo mount -bind /usr/portage chroot-gentoo/usr/portage
sudo chroot chroot-gentoo /bin/bash
emerge --sync emerge vimExit when you're done exitDont forget to unmount what you have mounted sudo umount chroot-gentoo/dev chroot-gentoo/proc chroot-gentoo/usr/portageYou can have a debian chroot system too
- Install essential package
as root
echo "dev-util/debootstrap ~x86" >> /etc/portage/package.keywords emerge debootstrapPopulate your chroot folder using debootstrap debootstrap sid chroot-debian http://mirror.pacific.net.au/debian/Mount proc and dev sudo mount -o bind /dev chroot-debian/dev sudo mount -o bind /proc chroot-debian/procStart chrooting now sudo chroot chroot-debian /bin/bashInstall your favorite packages apt-get update apt-get install <list your package here>Exit once done playing with the chroot environment exitClean up some mess sudo umount chroot-debian/dev chroot-debian/procJust do whatever you wish with your chroot environment, and you can just delete the chroot folder when you realized that you messed up too much already.
2 Responses to Building a Gentoo and Debian chroot Environment
Installing Voyage Linux in Wrap2c | /home/shakir
December 11th, 2007 at 8:22 am
[...] of installing Debian or or Gentoo as what I basicly describe in my previous post, I’m gonna just install Voyage, a minimal Debian based distro customised for [...]
Talal
August 5th, 2010 at 7:23 pm
Wat do you mean by “Just do whatever you wish with your chroot environment, and you can just delete the chroot folder when you realized that you messed up too much already.”
Nice Website!