Changes between Version 23 and Version 24 of ChrootSetup

Show
Ignore:
Timestamp:
02/07/10 12:17:02 (12 years ago)
Author:
allison
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChrootSetup

    v23 v24  
    119119 * Done 
    120120 
    121 == Ubuntu Intrepid == 
     121== Ubuntu Lucid == 
    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.10ubuntu1~intrepid1_all.deb 
     125 $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.20_all.deb 
    126126}}} 
    127127 
    128128 * Manually install it: 
    129129{{{ 
    130  $ sudo dpkg --install debootstrap_1.0.10ubuntu1~intrepid1_all.deb 
     130 $ sudo dpkg --install debootstrap_1.0.20_all.deb 
    131131}}} 
    132132 
    133133 * Edit /etc/schroot/schroot.conf and add the following lines: 
    134134{{{ 
    135  [intrepid] 
    136  description=Ubuntu intrepid 
    137  location=/var/chroot/intrepid 
     135 [lucid] 
     136 description=Ubuntu lucid 
     137 location=/var/chroot/lucid 
    138138 priority=3 
    139139 users=<your user> 
     
    146146 * Set up a chroot environment using debootstrap: 
    147147{{{ 
    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/ 
    149149}}} 
    150150 
     
    161161}}} 
    162162 
    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): 
    164164{{{ 
    165165 $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf 
     
    170170 * Manually mount system directories: 
    171171{{{ 
    172  $ sudo mount -t proc proc-chroot /var/chroot/intrepid/proc 
    173  $ sudo mount -t devpts devpts-chroot /var/chroot/intrepid/dev/pts 
     172 $ sudo mount -t proc proc-chroot /var/chroot/lucid/proc 
     173 $ sudo mount -t devpts devpts-chroot /var/chroot/lucid/dev/pts 
    174174}}} 
    175175 
    176176Or, if you prefer to have them always mounted (I don't), add the following entries to your main /etc/fstab: 
    177177{{{ 
    178 proc-chroot /var/chroot/intrepid/proc proc defaults 0 0 
    179 devpts-chroot /var/chroot/intrepid/dev/pts devpts defaults 0 0  
     178proc-chroot /var/chroot/lucid/proc proc defaults 0 0 
     179devpts-chroot /var/chroot/lucid/dev/pts devpts defaults 0 0  
    180180}}} 
    181181 
    182182 * Start up the chroot environment: 
    183183{{{ 
    184  $ sudo chroot /var/chroot/intrepid 
     184 $ sudo chroot /var/chroot/lucid 
    185185}}} 
    186186 
     
    189189 # apt-get update 
    190190 # 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 
    192192 # apt-get install dh-make automake pbuilder lintian \ 
    193193 wget devscripts sudo dput 
     
    198198 * (optional) Setup text for the command-line prompt, to display when running in chroot: 
    199199{{{ 
    200  # echo intrepid > /etc/debian_chroot 
     200 # echo lucid > /etc/debian_chroot 
    201201}}} 
    202202 
     
    206206}}} 
    207207 
    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/ 
    218212 # dpkg-reconfigure passwd 
    219213 # passwd <your user>