Changes between Version 28 and Version 29 of ChrootSetup
- Timestamp:
- 04/29/11 17:21:48 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ChrootSetup
v28 v29 21 21 * Manually download the debootstrap package (or the latest at <http://ftp.debian.org/debian/pool/main/d/debootstrap/>) 22 22 {{{ 23 $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0. 20_all.deb23 $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.30_all.deb 24 24 }}} 25 25 26 26 * Manually install it: 27 27 {{{ 28 $ sudo dpkg --install debootstrap_1.0. 20_all.deb28 $ sudo dpkg --install debootstrap_1.0.30_all.deb 29 29 }}} 30 30 … … 119 119 * Done 120 120 121 == Ubuntu Lucid==121 == Ubuntu Oneiric == 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.2 0_all.deb125 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.29ubuntu1_all.deb 126 126 }}} 127 127 128 128 * Manually install it: 129 129 {{{ 130 $ sudo dpkg --install debootstrap_1.0.2 0_all.deb130 $ sudo dpkg --install debootstrap_1.0.29ubuntu1_all.deb 131 131 }}} 132 132 … … 134 134 {{{ 135 135 [lucid] 136 description=Ubuntu lucid137 location=/var/chroot/ lucid136 description=Ubuntu oneiric 137 location=/var/chroot/oneiric 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 lucid /var/chroot/lucidhttp://archive.ubuntu.com/ubuntu/148 $ sudo debootstrap --variant=buildd oneiric /var/chroot/oneiric http://archive.ubuntu.com/ubuntu/ 149 149 }}} 150 150 … … 152 152 153 153 {{{ 154 $ sudo debootstrap --arch i386 --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/ 155 }}} 156 157 To create an lpia (Ubuntu Mobile) chroot, add the option "--arch lpia", and change the archive URL to 'ports.ubuntu.com': 158 159 {{{ 160 $ sudo debootstrap --arch lpia --variant=buildd intrepid /var/chroot/intrepid-lpia http://ports.ubuntu.com/ 161 }}} 154 $ sudo debootstrap --arch i386 --variant=buildd oneiric /var/chroot/oneiric http://archive.ubuntu.com/ubuntu/ 155 }}} 156 162 157 163 158 * 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 159 {{{ 165 $ sudo cp /etc/resolv.conf /var/chroot/ intrepid/etc/resolv.conf166 $ sudo cp /etc/apt/sources.list /var/chroot/ intrepid/etc/apt/167 $ sudo sed -i s/<your install>/ intrepid/g /var/chroot/intrepid/etc/apt/sources.list160 $ sudo cp /etc/resolv.conf /var/chroot/oneiric/etc/resolv.conf 161 $ sudo cp /etc/apt/sources.list /var/chroot/oneiric/etc/apt/ 162 $ sudo sed -i s/<your install>/oneiric/g /var/chroot/oneiric/etc/apt/sources.list 168 163 }}} 169 164 … … 176 171 Or, if you prefer to have them always mounted (I don't), add the following entries to your main /etc/fstab: 177 172 {{{ 178 proc-chroot /var/chroot/ lucid/proc proc defaults 0 0179 devpts-chroot /var/chroot/ lucid/dev/pts devpts defaults 0 0173 proc-chroot /var/chroot/oneiric/proc proc defaults 0 0 174 devpts-chroot /var/chroot/oneiric/dev/pts devpts defaults 0 0 180 175 }}} 181 176 182 177 * Start up the chroot environment: 183 178 {{{ 184 $ sudo chroot /var/chroot/ lucid179 $ sudo chroot /var/chroot/oneiric 185 180 }}} 186 181 … … 198 193 * (optional) Setup text for the command-line prompt, to display when running in chroot: 199 194 {{{ 200 # echo lucid> /etc/debian_chroot195 # echo oneiric > /etc/debian_chroot 201 196 }}} 202 197 … … 206 201 }}} 207 202 208 * (optional) Set up users, groups, and sudo access in chroot. Compare /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, 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 sudoers and add 'admin' access in the chroot sudoers file. Copy the hosts file from the base machine into the chroot.209 {{{ 210 $ sudo cp /etc/hosts /var/chroot/ lucid/etc/203 * (optional) Set up users, groups, and sudo access in chroot. Compare /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, and /etc/sudoers from the base machine to the equivalent /var/chroot/oneiric/etc/* in the chroot. Copy your user and group to the chroot files. Also copy the 'admin' group for sudoers and add 'admin' access in the chroot sudoers file. Copy the hosts file from the base machine into the chroot. 204 {{{ 205 $ sudo cp /etc/hosts /var/chroot/oneiric/etc/ 211 206 }}} 212 207 … … 214 209 {{{ 215 210 216 $ sudo chroot /var/chroot/ lucid/211 $ sudo chroot /var/chroot/oneiric/ 217 212 # dpkg-reconfigure passwd 218 213 # passwd <your user> … … 222 217 # exit 223 218 224 $ cp ~/.bashrc /var/chroot/ lucid/home/<your user>/.225 $ cp -r ~/.gnupg /var/chroot/ lucid/home/<your user>/.219 $ cp ~/.bashrc /var/chroot/oneiric/home/<your user>/. 220 $ cp -r ~/.gnupg /var/chroot/oneiric/home/<your user>/. 226 221 227 222 }}}