Changes between Version 2 and Version 3 of ChrootSetup
- Timestamp:
- 12/13/08 00:00:45 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ChrootSetup
v2 v3 106 106 * Done 107 107 108 == Ubuntu Gutsy==108 == Ubuntu Intrepid == 109 109 110 * Manually download the debootstrap package for Gutsy110 * Manually download the debootstrap package for Intrepid 111 111 112 112 (or the latest at <http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/>) 113 113 114 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0. 7~gutsy1_all.deb114 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.10ubuntu1~intrepid1_all.deb 115 115 116 116 * Manually install it: 117 117 118 $ sudo dpkg --install debootstrap_1.0. 7~gutsy1_all.deb118 $ sudo dpkg --install debootstrap_1.0.10ubuntu1~intrepid1_all.deb 119 119 120 120 * Edit /etc/schroot/schroot.conf and add the following lines: 121 121 122 [ gutsy]123 description=Ubuntu gutsy124 location=/var/chroot/ gutsy122 [intrepid] 123 description=Ubuntu intrepid 124 location=/var/chroot/intrepid 125 125 priority=3 126 126 users=<your user> … … 130 130 * Set up a chroot environment using debootstrap: 131 131 132 $ sudo debootstrap --variant=buildd gutsy /var/chroot/gutsyhttp://archive.ubuntu.com/ubuntu/132 $ sudo debootstrap --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/ 133 133 134 134 (to run a 32bit chroot on a 64bit install, add the option "--arch i386") 135 135 136 * Copy over some configuration files from the base install to the chroot environment (substituting if your install is a different release):136 * (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): 137 137 138 $ sudo cp /etc/resolv.conf /var/chroot/ gutsy/etc/resolv.conf139 $ sudo cp /etc/apt/sources.list /var/chroot/ gutsy/etc/apt/140 $ sudo sed -i s/<your install>/ gutsy/g /var/chroot/gutsy/etc/apt/sources.list138 $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf 139 $ sudo cp /etc/apt/sources.list /var/chroot/intrepid/etc/apt/ 140 $ sudo sed -i s/<your install>/intrepid/g /var/chroot/intrepid/etc/apt/sources.list 141 141 142 142 * Start up the chroot environment: 143 143 144 $ sudo chroot /var/chroot/ gutsy144 $ sudo chroot /var/chroot/intrepid 145 145 146 146 * Get the latest versions of the package list and some core packages: 147 147 148 # apt-get update # ignore gpg errors for now149 # apt-get install gnupg150 # apt-get update # get rid of gpg errors151 # apt-get install build-essential dh-make automake pbuilder lintian \152 wget debconf devscripts sudo perl patch153 148 # apt-get update 154 # apt-get install dialog language-pack-en # for locales 149 # apt-get install dh-make automake pbuilder lintian \ 150 wget devscripts sudo 151 # apt-get update 152 # apt-get install language-pack-en # for locales 155 153 # apt-get install vim 156 154 157 155 * (optional) Setup text for the command-line prompt, to display when running in chroot: 158 156 159 # echo gutsy> /etc/debian_chroot157 # echo intrepid > /etc/debian_chroot 160 158 161 159 * Leave the chroot environment: … … 165 163 * (optional) Set up users, groups, and sudo access in chroot: 166 164 167 $ sudo cp /etc/passwd /var/chroot/ gutsy/etc/165 $ sudo cp /etc/passwd /var/chroot/intrepid/etc/ 168 166 $ sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow \ 169 | sudo tee /var/chroot/ gutsy/etc/shadow170 $ sudo cp /etc/group /var/chroot/ gutsy/etc/171 $ sudo cp /etc/hosts /var/chroot/ gutsy/etc/172 $ sudo cp /etc/sudoers /var/chroot/ gutsy/etc/167 | sudo tee /var/chroot/intrepid/etc/shadow 168 $ sudo cp /etc/group /var/chroot/intrepid/etc/ 169 $ sudo cp /etc/hosts /var/chroot/intrepid/etc/ 170 $ sudo cp /etc/sudoers /var/chroot/intrepid/etc/ 173 171 174 $ sudo chroot /var/chroot/ gutsy/172 $ sudo chroot /var/chroot/intrepid/ 175 173 # dpkg-reconfigure passwd 176 174 # passwd <your user>