Changes between Version 23 and Version 24 of ChrootSetup
- Timestamp:
- 02/07/10 12:17:02 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ChrootSetup
v23 v24 119 119 * Done 120 120 121 == Ubuntu Intrepid ==121 == Ubuntu Lucid == 122 122 123 123 * Manually download the debootstrap package for Intrepid (or the latest at <http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/>) 124 124 {{{ 125 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0. 10ubuntu1~intrepid1_all.deb125 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.20_all.deb 126 126 }}} 127 127 128 128 * Manually install it: 129 129 {{{ 130 $ sudo dpkg --install debootstrap_1.0. 10ubuntu1~intrepid1_all.deb130 $ sudo dpkg --install debootstrap_1.0.20_all.deb 131 131 }}} 132 132 133 133 * Edit /etc/schroot/schroot.conf and add the following lines: 134 134 {{{ 135 [ intrepid]136 description=Ubuntu intrepid137 location=/var/chroot/ intrepid135 [lucid] 136 description=Ubuntu lucid 137 location=/var/chroot/lucid 138 138 priority=3 139 139 users=<your user> … … 146 146 * Set up a chroot environment using debootstrap: 147 147 {{{ 148 $ sudo debootstrap --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/148 $ sudo debootstrap --variant=buildd lucid /var/chroot/lucid http://archive.ubuntu.com/ubuntu/ 149 149 }}} 150 150 … … 161 161 }}} 162 162 163 * Copy over some configuration files from the base install to the chroot environment(substituting if your install is a different release):163 * Run a diff comparing some configuration files from the base install to the chroot environment, you may want to copy some lines from them, or copy them over entirely (substituting if your install is a different release): 164 164 {{{ 165 165 $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf … … 170 170 * Manually mount system directories: 171 171 {{{ 172 $ sudo mount -t proc proc-chroot /var/chroot/ intrepid/proc173 $ sudo mount -t devpts devpts-chroot /var/chroot/ intrepid/dev/pts172 $ sudo mount -t proc proc-chroot /var/chroot/lucid/proc 173 $ sudo mount -t devpts devpts-chroot /var/chroot/lucid/dev/pts 174 174 }}} 175 175 176 176 Or, if you prefer to have them always mounted (I don't), add the following entries to your main /etc/fstab: 177 177 {{{ 178 proc-chroot /var/chroot/ intrepid/proc proc defaults 0 0179 devpts-chroot /var/chroot/ intrepid/dev/pts devpts defaults 0 0178 proc-chroot /var/chroot/lucid/proc proc defaults 0 0 179 devpts-chroot /var/chroot/lucid/dev/pts devpts defaults 0 0 180 180 }}} 181 181 182 182 * Start up the chroot environment: 183 183 {{{ 184 $ sudo chroot /var/chroot/ intrepid184 $ sudo chroot /var/chroot/lucid 185 185 }}} 186 186 … … 189 189 # apt-get update 190 190 # apt-get install language-pack-en # for locales 191 # apt-get install dialog 191 # apt-get install dialog # must have 'universe' enabled in /etc/apt/sources.list 192 192 # apt-get install dh-make automake pbuilder lintian \ 193 193 wget devscripts sudo dput … … 198 198 * (optional) Setup text for the command-line prompt, to display when running in chroot: 199 199 {{{ 200 # echo intrepid > /etc/debian_chroot200 # echo lucid > /etc/debian_chroot 201 201 }}} 202 202 … … 206 206 }}} 207 207 208 * (optional) Set up users, groups, and sudo access in chroot: 209 {{{ 210 $ sudo cp /etc/passwd /var/chroot/intrepid/etc/ 211 $ sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow \ 212 | sudo tee /var/chroot/intrepid/etc/shadow 213 $ sudo cp /etc/group /var/chroot/intrepid/etc/ 214 $ sudo cp /etc/hosts /var/chroot/intrepid/etc/ 215 $ sudo cp /etc/sudoers /var/chroot/intrepid/etc/ 216 217 $ sudo chroot /var/chroot/intrepid/ 208 * (optional) Set up users, groups, and sudo access in chroot. Compare /etc/passwd, /etc/group/, /etc/hosts, and /etc/sudoers from the base machine to the equivalent /var/chroot/lucid/etc/* in the chroot. Copy your user and group to the chroot files. Also copy the 'admin' group for and add 'admin' access in the chroot sudoers file. Setup the home directory for your user: 209 {{{ 210 211 $ sudo chroot /var/chroot/lucid/ 218 212 # dpkg-reconfigure passwd 219 213 # passwd <your user>