[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating a sid chroot area?



In Thu, 1 Mar 2001 14:21:38 -0600 Ben cum veritate scripsit :

> 
> Hi.  I don't suppose anyone could point me to a set of instructions for 
> creating a sid chroot area?  I want to test some build dependencies.  I
> have 
> already tried using debootstrap to make a woody chroot but this barfs
> around 
> console-data each time.
> 
> Any help would be appreciated - thanks,
> 


mkdir chroot && cd chroot && tar xvfzp /path/to/base2_2.tgz && \
chroot `pwd` bin/bash

then you have a potato chroot, at your liberty to upgrade to 
unstable. 


This kind of script is nice... put this into your chroot's /etc/init.d/

#!/bin/sh -e
# hacked version of Adam Heath's code by Junichi Uekawa 22 Oct. 2000
# modified 25 oct 2000
if [ -e /etc/init.d/$(basename $0) ]; then
  # inside chroot
  hostname -F /etc/hostname
  HOME=/root
  exec /bin/sh --login
else 
  # starting outside the chroot
  dir=$(realpath $(dirname $0))/../..
  files="/etc/resolv.conf /etc/hosts /etc/hostname"
  for f in $files; do
	cp $f $dir/$f
  done
  mount proc -t proc $dir/proc || echo "Warning: failed mounting proc"
  chroot $dir /etc/init.d/$(basename $0)
  umount $dir/proc
fi


--
dancer@debian.org : Junichi Uekawa   http://www.netfort.gr.jp/~dancer
GPG Fingerprint : 17D6 120E 4455 1832 9423  7447 3059 BF92 CD37 56F4



Reply to: