Changes between Version 6 and Version 7 of ChrootSetup
- Timestamp:
- 02/03/09 20:58:06 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ChrootSetup
v6 v7 6 6 7 7 * Install the schroot package. 8 8 {{{ 9 9 $ sudo aptitude install schroot 10 }}} 10 11 11 12 * Create a directory for the chroot instances 12 13 {{{ 13 14 $ sudo mkdir /var/chroot 15 }}} 14 16 15 17 == Debian Sid == … … 17 19 (I tend to use the mirror ftp.osuosl.org instead of ftp.debian.org, pick your favorite.) 18 20 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 {{{ 23 23 $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.7_all.deb 24 }}} 24 25 25 26 * Manually install it: 26 27 {{{ 27 28 $ sudo dpkg --install debootstrap_1.0.7_all.deb 29 }}} 28 30 29 31 * Edit /etc/schroot/schroot.conf and add the following lines: 30 31 32 {{{ 32 33 [sid] … … 38 39 root-groups=root 39 40 }}} 41 40 42 * Set up a chroot environment using debootstrap: 41 43 {{{ 42 44 $ sudo debootstrap sid /var/chroot/sid http://ftp.debian.org/debian/ 45 }}} 43 46 44 47 (to run a 32bit chroot on a 64bit install, add the option "--arch i386") 45 48 46 49 * Copy over some configuration files from the base install to the chroot environment: 47 50 {{{ 48 51 $ sudo cp /etc/resolv.conf /var/chroot/sid/etc/resolv.conf 52 }}} 49 53 50 54 * (optional) Add the following lines to /var/chroot/sid/etc/apt/sources.list to expand the list of available packages: 51 55 {{{ 52 56 deb http://ftp.debian.org/debian sid contrib 57 }}} 53 58 54 59 * Start up the chroot environment: 55 60 {{{ 56 61 $ sudo chroot /var/chroot/sid 62 }}} 57 63 58 64 * Get the latest versions of the package list and some core packages: 59 60 65 {{{ 61 66 # aptitude update … … 68 73 69 74 * (optional) Setup text for the command-line prompt, to display when running in chroot: 70 75 {{{ 71 76 # echo sid > /etc/debian_chroot 77 }}} 72 78 73 79 * Leave the chroot environment: 74 75 # exit 80 {{{ 81 # exit 82 }}} 76 83 77 84 * Set up users, groups, gpg, and sudo access in chroot: … … 85 92 $ sudo cp /etc/sudoers /var/chroot/sid/etc/ 86 93 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> 93 100 # exit 94 101 … … 98 105 99 106 * Set up the environment for debuild, add the following lines to /var/chroot/sid/home/<your user>/.devscripts: 100 101 107 {{{ 102 108 DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i -I" … … 105 111 106 112 And in wherever you set environment variables for shell sessions: 107 113 {{{ 108 114 export DH_ALWAYS_EXCLUDE='.svn' 115 }}} 109 116 110 117 * Done … … 112 119 == Ubuntu Intrepid == 113 120 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 {{{ 118 123 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.10ubuntu1~intrepid1_all.deb 124 }}} 119 125 120 126 * Manually install it: 121 127 {{{ 122 128 $ sudo dpkg --install debootstrap_1.0.10ubuntu1~intrepid1_all.deb 129 }}} 123 130 124 131 * Edit /etc/schroot/schroot.conf and add the following lines: 125 126 132 {{{ 127 133 [intrepid] … … 134 140 }}} 135 141 142 136 143 * Set up a chroot environment using debootstrap: 137 144 {{{ 138 145 $ sudo debootstrap --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/ 146 }}} 139 147 140 148 (to run a 32bit chroot on a 64bit install, add the option "--arch i386") 141 149 142 150 * (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 144 151 {{{ 145 152 $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf … … 149 156 150 157 * Start up the chroot environment: 151 158 {{{ 152 159 $ sudo chroot /var/chroot/intrepid 160 }}} 153 161 154 162 * Get the latest versions of the package list and some core packages: 155 156 163 {{{ 157 164 # apt-get update … … 164 171 165 172 * (optional) Setup text for the command-line prompt, to display when running in chroot: 166 173 {{{ 167 174 # echo intrepid > /etc/debian_chroot 175 }}} 168 176 169 177 * Leave the chroot environment: 170 171 # exit 178 {{{ 179 # exit 180 }}} 172 181 173 182 * (optional) Set up users, groups, and sudo access in chroot: 174 175 183 {{{ 176 184 $ sudo cp /etc/passwd /var/chroot/intrepid/etc/