Changes between Version 6 and Version 7 of ChrootSetup

Show
Ignore:
Timestamp:
02/03/09 20:58:06 (13 years ago)
Author:
allison
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChrootSetup

    v6 v7  
    66 
    77 * Install the schroot package. 
    8  
     8{{{ 
    99 $ sudo aptitude install schroot 
     10}}} 
    1011 
    1112 * Create a directory for the chroot instances 
    12  
     13{{{ 
    1314 $ sudo mkdir /var/chroot 
     15}}} 
    1416 
    1517== Debian Sid == 
     
    1719(I tend to use the mirror ftp.osuosl.org instead of ftp.debian.org, pick your favorite.) 
    1820 
    19  * Manually download the debootstrap package 
    20  
    21 (or the latest at <http://ftp.debian.org/debian/pool/main/d/debootstrap/>) 
    22  
     21 * Manually download the debootstrap package (or the latest at <http://ftp.debian.org/debian/pool/main/d/debootstrap/>) 
     22{{{ 
    2323 $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.7_all.deb 
     24}}} 
    2425 
    2526 * Manually install it: 
    26  
     27{{{ 
    2728 $ sudo dpkg --install debootstrap_1.0.7_all.deb 
     29}}} 
    2830 
    2931 * Edit /etc/schroot/schroot.conf and add the following lines: 
    30  
    3132{{{ 
    3233 [sid] 
     
    3839 root-groups=root 
    3940}}} 
     41 
    4042 * Set up a chroot environment using debootstrap: 
    41  
     43{{{ 
    4244 $ sudo debootstrap sid /var/chroot/sid http://ftp.debian.org/debian/ 
     45}}} 
    4346 
    4447(to run a 32bit chroot on a 64bit install, add the option "--arch i386") 
    4548 
    4649 * Copy over some configuration files from the base install to the chroot environment: 
    47  
     50{{{ 
    4851 $ sudo cp /etc/resolv.conf /var/chroot/sid/etc/resolv.conf 
     52}}} 
    4953 
    5054 * (optional) Add the following lines to /var/chroot/sid/etc/apt/sources.list to expand the list of available packages: 
    51  
     55{{{ 
    5256 deb http://ftp.debian.org/debian sid contrib 
     57}}} 
    5358 
    5459 * Start up the chroot environment: 
    55  
     60{{{ 
    5661 $ sudo chroot /var/chroot/sid 
     62}}} 
    5763 
    5864 * Get the latest versions of the package list and some core packages: 
    59  
    6065{{{ 
    6166 # aptitude update 
     
    6873 
    6974 * (optional) Setup text for the command-line prompt, to display when running in chroot: 
    70  
     75{{{ 
    7176 # echo sid > /etc/debian_chroot 
     77}}} 
    7278 
    7379 * Leave the chroot environment: 
    74  
    75  # exit 
     80{{{ 
     81 # exit 
     82}}} 
    7683 
    7784 * Set up users, groups, gpg, and sudo access in chroot: 
     
    8592 $ sudo cp /etc/sudoers /var/chroot/sid/etc/ 
    8693 
    87  $ sudo chroot /var/chroot/sid/[[BR]] 
    88  # dpkg-reconfigure passwd[[BR]] 
    89  # passwd <your user>[[BR]] 
    90  # mkdir /home/<your user>[[BR]] 
    91  # chown <your user> /home/<your user>[[BR]] 
    92  # chgrp <your user> /home/<your user>[[BR]] 
     94 $ sudo chroot /var/chroot/sid/ 
     95 # dpkg-reconfigure passwd 
     96 # passwd <your user> 
     97 # mkdir /home/<your user> 
     98 # chown <your user> /home/<your user> 
     99 # chgrp <your user> /home/<your user> 
    93100 # exit 
    94101 
     
    98105 
    99106 * Set up the environment for debuild, add the following lines to /var/chroot/sid/home/<your user>/.devscripts: 
    100  
    101107{{{ 
    102108 DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i -I" 
     
    105111 
    106112And in wherever you set environment variables for shell sessions: 
    107  
     113{{{ 
    108114 export DH_ALWAYS_EXCLUDE='.svn' 
     115}}} 
    109116 
    110117 * Done 
     
    112119== Ubuntu Intrepid == 
    113120 
    114  * Manually download the debootstrap package for Intrepid 
    115  
    116 (or the latest at <http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/>) 
    117  
     121 * Manually download the debootstrap package for Intrepid (or the latest at <http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/>) 
     122{{{ 
    118123 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.10ubuntu1~intrepid1_all.deb 
     124}}} 
    119125 
    120126 * Manually install it: 
    121  
     127{{{ 
    122128 $ sudo dpkg --install debootstrap_1.0.10ubuntu1~intrepid1_all.deb 
     129}}} 
    123130 
    124131 * Edit /etc/schroot/schroot.conf and add the following lines: 
    125  
    126132{{{ 
    127133 [intrepid] 
     
    134140}}} 
    135141 
     142 
    136143 * Set up a chroot environment using debootstrap: 
    137  
     144{{{ 
    138145 $ sudo debootstrap --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/ 
     146}}} 
    139147 
    140148(to run a 32bit chroot on a 64bit install, add the option "--arch i386") 
    141149 
    142150 * (Probably skip this step for intrepid) Copy over some configuration files from the base install to the chroot environment (substituting if your install is a different release): 
    143  
    144151{{{ 
    145152 $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf 
     
    149156 
    150157 * Start up the chroot environment: 
    151  
     158{{{ 
    152159 $ sudo chroot /var/chroot/intrepid 
     160}}} 
    153161 
    154162 * Get the latest versions of the package list and some core packages: 
    155  
    156163{{{ 
    157164 # apt-get update 
     
    164171 
    165172 * (optional) Setup text for the command-line prompt, to display when running in chroot: 
    166  
     173{{{ 
    167174 # echo intrepid > /etc/debian_chroot 
     175}}} 
    168176 
    169177 * Leave the chroot environment: 
    170  
    171  # exit 
     178{{{ 
     179 # exit 
     180}}} 
    172181 
    173182 * (optional) Set up users, groups, and sudo access in chroot: 
    174  
    175183{{{ 
    176184 $ sudo cp /etc/passwd /var/chroot/intrepid/etc/