Changes between Version 28 and Version 29 of ChrootSetup

Show
Ignore:
Timestamp:
04/29/11 17:21:48 (11 years ago)
Author:
allison
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChrootSetup

    v28 v29  
    2121 * Manually download the debootstrap package (or the latest at <http://ftp.debian.org/debian/pool/main/d/debootstrap/>) 
    2222{{{ 
    23  $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.20_all.deb 
     23 $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.30_all.deb 
    2424}}} 
    2525 
    2626 * Manually install it: 
    2727{{{ 
    28  $ sudo dpkg --install debootstrap_1.0.20_all.deb 
     28 $ sudo dpkg --install debootstrap_1.0.30_all.deb 
    2929}}} 
    3030 
     
    119119 * Done 
    120120 
    121 == Ubuntu Lucid == 
     121== Ubuntu Oneiric == 
    122122 
    123123 * Manually download the debootstrap package for Intrepid (or the latest at <http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/>) 
    124124{{{ 
    125  $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.20_all.deb 
     125 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.29ubuntu1_all.deb 
    126126}}} 
    127127 
    128128 * Manually install it: 
    129129{{{ 
    130  $ sudo dpkg --install debootstrap_1.0.20_all.deb 
     130 $ sudo dpkg --install debootstrap_1.0.29ubuntu1_all.deb 
    131131}}} 
    132132 
     
    134134{{{ 
    135135 [lucid] 
    136  description=Ubuntu lucid 
    137  location=/var/chroot/lucid 
     136 description=Ubuntu oneiric 
     137 location=/var/chroot/oneiric 
    138138 priority=3 
    139139 users=<your user> 
     
    146146 * Set up a chroot environment using debootstrap: 
    147147{{{ 
    148  $ sudo debootstrap --variant=buildd lucid /var/chroot/lucid http://archive.ubuntu.com/ubuntu/ 
     148 $ sudo debootstrap --variant=buildd oneiric /var/chroot/oneiric http://archive.ubuntu.com/ubuntu/ 
    149149}}} 
    150150 
     
    152152 
    153153{{{ 
    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 
    162157 
    163158 * 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): 
    164159{{{ 
    165  $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf 
    166  $ 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.list 
     160 $ 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 
    168163}}} 
    169164 
     
    176171Or, if you prefer to have them always mounted (I don't), add the following entries to your main /etc/fstab: 
    177172{{{ 
    178 proc-chroot /var/chroot/lucid/proc proc defaults 0 0 
    179 devpts-chroot /var/chroot/lucid/dev/pts devpts defaults 0 0  
     173proc-chroot /var/chroot/oneiric/proc proc defaults 0 0 
     174devpts-chroot /var/chroot/oneiric/dev/pts devpts defaults 0 0  
    180175}}} 
    181176 
    182177 * Start up the chroot environment: 
    183178{{{ 
    184  $ sudo chroot /var/chroot/lucid 
     179 $ sudo chroot /var/chroot/oneiric 
    185180}}} 
    186181 
     
    198193 * (optional) Setup text for the command-line prompt, to display when running in chroot: 
    199194{{{ 
    200  # echo lucid > /etc/debian_chroot 
     195 # echo oneiric > /etc/debian_chroot 
    201196}}} 
    202197 
     
    206201}}} 
    207202 
    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/ 
    211206}}} 
    212207 
     
    214209{{{ 
    215210 
    216  $ sudo chroot /var/chroot/lucid/ 
     211 $ sudo chroot /var/chroot/oneiric/ 
    217212 # dpkg-reconfigure passwd 
    218213 # passwd <your user> 
     
    222217 # exit 
    223218 
    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>/. 
    226221 
    227222}}}