/home/shakir

Building a Gentoo and Debian chroot Environment

Posted on 29 Nov, 2006, categorized under 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
  • Create a chroot folder
  • mkdir chroot-gentoo
  • Extract it
  • sudo tar xvjf stage3-i686-2006.1.tar.bz2 -C chroot-gentoo
  • Mount proc and dev
  • sudo mount -o bind /dev chroot-gentoo/dev
    sudo mount -o bind /proc chroot-gentoo/proc
  • And possibly some other directories too
  • sudo mount -bind /usr/portage chroot-gentoo/usr/portage
  • And that’s it, you can start chrooting now
  • sudo chroot chroot-gentoo /bin/bash
  • You might want to install some essential packages
  • emerge --sync
    emerge vim 
    
  • Exit when you’re done
  • exit
  • Dont forget to unmount what you have mounted
  • sudo umount chroot-gentoo/dev chroot-gentoo/proc chroot-gentoo/usr/portage

You can have a debian chroot system too

  • Install essential package
  • as root

    echo "dev-util/debootstrap ~x86" >> /etc/portage/package.keywords
    emerge debootstrap 
  • Populate 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/proc
  • Start chrooting now
  • sudo chroot chroot-debian /bin/bash
  • Install your favorite packages
  • apt-get update
    apt-get install <list your package here>
  • Exit once done playing with the chroot environment
  • exit
  • Clean up some mess
  • sudo umount chroot-debian/dev chroot-debian/proc

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.





Looking for something else? Search Google.

1 Response to "Building a Gentoo and Debian chroot Environment"

1 | Installing Voyage Linux in Wrap2c | /home/shakir

December 11th, 2007 at 8:22 am

Avatar

[...] 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 [...]

Comment Form


  • si perda: wah.. boleh kasi need for speed test power skali... boleh layan network race ni...
  • Faiz: wah....harganya berapa?
  • shakir: Hmm, I have no lab and that actually was my living room :D Sure I'll move them to one of my available rooms at home and make it a lab, but that'll be
  • peja: whoaaa..at least u have ur own lab...look interesting!
  • Qing Ru: He looks really cute! Fatherhood must have been quite rewarding :)
  • shakir: Chris: Thanks, I've updated the post.
  • shakir: tak cukup banyak guinea pig yang dah try and comment on the wimax service, and so I'll just wait :D
  • shakir: Vadim: Yup, but I prefer to just install dosbox and play the game rather than re-installing my system with 32 bit Linux :D
  • Vadim: 2shakir: wine doesn't support 64-bit linux. You have to use 32-bit linux if you want to use wine.
  • kevler: yerp ...dalam 2 hari nih jer ..aku dah kesan 2 BMW X6 , kat puchong dan jalan ampang ..giler laa lawa



Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. Inappropriate comments will be deleted at the authors discretion. All code samples (if any, ever) are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Personal (Blogs) - TOP.ORG