/[d-i]/trunk/manual/en/appendix/chroot-install.xml
ViewVC logotype

Diff of /trunk/manual/en/appendix/chroot-install.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/installer/doc/manual/en/appendix/chroot-install.xml revision 28245 by fjpop-guest, Tue Jun 7 19:10:03 2005 UTC trunk/manual/en/appendix/chroot-install.xml revision 39614 by fjp, Mon Aug 7 15:50:11 2006 UTC
# Line 7  Line 7 
7  <para>  <para>
8    
9  This section explains how to install &debian; from an existing  This section explains how to install &debian; from an existing
10  Unix or Linux system, without using the ncurses-based, menu-driven  Unix or Linux system, without using the menu-driven installer as
11  installer as explained in the rest of the manual. This "cross-install"  explained in the rest of the manual. This <quote>cross-install</quote>
12  HOWTO has been requested by users switching to &debian; from  HOWTO has been requested by users switching to &debian; from
13  Red Hat, Mandrake, and SUSE. In this section some familiarity with  Red Hat, Mandrake, and SUSE. In this section some familiarity with
14  entering *nix commands and navigating the file system is assumed. In  entering *nix commands and navigating the file system is assumed. In
# Line 20  command entered in the Debian chroot. Line 20  command entered in the Debian chroot.
20    
21  Once you've got the new Debian system configured to your preference,  Once you've got the new Debian system configured to your preference,
22  you can migrate your existing user data (if any) to it, and keep on  you can migrate your existing user data (if any) to it, and keep on
23  rolling. This is therefore a "zero downtime" &debian;  rolling. This is therefore a <quote>zero downtime</quote> &debian;
24  install. It's also a clever way for dealing with hardware that  install. It's also a clever way for dealing with hardware that
25  otherwise doesn't play friendly with various boot or installation  otherwise doesn't play friendly with various boot or installation
26  media.  media.
# Line 38  or at least 300MB if you plan to install Line 38  or at least 300MB if you plan to install
38    
39  </para><para>  </para><para>
40    
41  To create file systems on your partitions. For example, to create an  Create file systems on your partitions. For example, to create an
42  ext3 file system on partition <filename>/dev/hda6</filename> (that's  ext3 file system on partition <filename>/dev/hda6</filename> (that's
43  our example root partition):  our example root partition):
44    
45  <informalexample><screen>  <informalexample><screen>
# Line 50  To create an ext2 file system instead, o Line 50  To create an ext2 file system instead, o
50    
51  </para><para>  </para><para>
52    
53  Initialize and activate swap (substitute the partition number for  Initialize and activate swap (substitute the partition number for
54  your intended Debian swap partition):  your intended Debian swap partition):
55    
56  <informalexample><screen>  <informalexample><screen>
# Line 70  referenced later below. Line 70  referenced later below.
70  </screen></informalexample>  </screen></informalexample>
71    
72  </para>  </para>
73    <note><para>
74    
75    If you want to have parts of the filesystem (e.g. /usr) mounted on
76    separate partitions, you will need to create and mount these directories
77    manually before proceding with the next stage.
78    
79    </para></note>
80    </sect2>    </sect2>
81    
82    <sect2>    <sect2>
83    <title>Install <command>debootstrap</command></title>    <title>Install <command>debootstrap</command></title>
84  <para>  <para>
85    
86  The tool that the Debian installer uses, which is recognized as the  The utility used by the Debian installer, and recognized as the
87  official way to install a Debian base system, is  official way to install a Debian base system, is
88  <command>debootstrap</command>. It uses <command>wget</command> and  <command>debootstrap</command>. It uses <command>wget</command> and
89  <command>ar</command>, but otherwise depends only on  <command>ar</command>, but otherwise depends only on
90  <classname>/bin/sh</classname>. Install <command>wget</command> and  <classname>/bin/sh</classname> and basic Unix/Linux tools<footnote>
91    
92    <para>
93    
94    These include the GNU core utilities and commands like <command>sed</command>, <command>grep</command>, <command>tar</command> and <command>gzip</command>.
95    
96    </para>
97    
98    </footnote>. Install <command>wget</command> and
99  <command>ar</command> if they aren't already on your current system,  <command>ar</command> if they aren't already on your current system,
100  then download and install <command>debootstrap</command>.  then download and install <command>debootstrap</command>.
101    
102  </para><para>  </para>
103    
104  If you have an rpm-based system, you can use alien to convert the  <!-- The files linked to here are from 2004 and thus currently not usable
105  .deb into .rpm, or download an rpm-ized version at  <para>
106    
107    If you have an rpm-based system, you can use alien to convert the
108    .deb into .rpm, or download an rpm-ized version at
109  <ulink url="http://people.debian.org/~blade/install/debootstrap"></ulink>  <ulink url="http://people.debian.org/~blade/install/debootstrap"></ulink>
110    
111  </para><para>  </para>
112    -->
113    
114    <para>
115    
116  Or, you can use the following procedure to install it  Or, you can use the following procedure to install it
117  manually. Make a work folder for extracting the .deb into:  manually. Make a work folder for extracting the .deb into:
# Line 114  the binaries. Line 135  the binaries.
135  # zcat /full-path-to-work/work/data.tar.gz | tar xv  # zcat /full-path-to-work/work/data.tar.gz | tar xv
136  </screen></informalexample>  </screen></informalexample>
137    
138    </para><para>
139    
140    Note that running <command>debootstrap</command> may require you to have
141    a minimal version of <classname>glibc</classname> installed (currently
142    GLIBC_2.3). <command>debootstrap</command> itself is a shell script, but
143    it calls various utilities that require <classname>glibc</classname>.
144    
145  </para>  </para>
146    </sect2>    </sect2>
147    
# Line 125  the binaries. Line 153  the binaries.
153  from the archive when you run it. You can substitute any Debian  from the archive when you run it. You can substitute any Debian
154  archive mirror for <userinput>http.us.debian.org/debian</userinput> in  archive mirror for <userinput>http.us.debian.org/debian</userinput> in
155  the command example below, preferably a mirror close to you  the command example below, preferably a mirror close to you
156  network-wise. Mirrors are listed at  network-wise. Mirrors are listed at
157  <ulink url="http://www.debian.org/misc/README.mirrors"></ulink>.  <ulink url="http://www.debian.org/misc/README.mirrors"></ulink>.
158    
159  </para><para>  </para><para>
# Line 136  of the http URL: <userinput>file:/cdrom/ Line 164  of the http URL: <userinput>file:/cdrom/
164    
165  </para><para>  </para><para>
166    
167  Substitute one of the following for <replaceable>ARCH</replaceable>  Substitute one of the following for <replaceable>ARCH</replaceable>
168  in the <command>debootstrap</command> command:  in the <command>debootstrap</command> command:
169    
170  <userinput>alpha</userinput>,  <userinput>alpha</userinput>,
171  <userinput>arm</userinput>,  <userinput>arm</userinput>,
172  <userinput>hppa</userinput>,  <userinput>hppa</userinput>,
173  <userinput>i386</userinput>,  <userinput>i386</userinput>,
174  <userinput>ia64</userinput>,  <userinput>ia64</userinput>,
175  <userinput>m68k</userinput>,  <userinput>m68k</userinput>,
176  <userinput>mips</userinput>,  <userinput>mips</userinput>,
177  <userinput>mipsel</userinput>,  <userinput>mipsel</userinput>,
178  <userinput>powerpc</userinput>,  <userinput>powerpc</userinput>,
179  <userinput>s390</userinput>, or  <userinput>s390</userinput>, or
180  <userinput>sparc</userinput>.  <userinput>sparc</userinput>.
181    
# Line 167  Now you've got a real Debian system, tho Line 195  Now you've got a real Debian system, tho
195  <command>Chroot</command> into it:  <command>Chroot</command> into it:
196    
197  <informalexample><screen>  <informalexample><screen>
198  # chroot /mnt/debinst /bin/bash  # LANG= chroot /mnt/debinst /bin/bash
199  </screen></informalexample>  </screen></informalexample>
200    
201  </para>  </para>
# Line 188  Here is a sample you can modify to suit: Line 216  Here is a sample you can modify to suit:
216  # /etc/fstab: static file system information.  # /etc/fstab: static file system information.
217  #  #
218  # file system    mount point   type    options                  dump pass  # file system    mount point   type    options                  dump pass
219  /dev/XXX         /             ext2    defaults                 0    0  /dev/XXX         /             ext3    defaults                 0    1
220  /dev/XXX         /boot         ext2    ro,nosuid,nodev          0    2  /dev/XXX         /boot         ext3    ro,nosuid,nodev          0    2
221    
222  /dev/XXX         none          swap    sw                       0    0  /dev/XXX         none          swap    sw                       0    0
223  proc             /proc         proc    defaults                 0    0  proc             /proc         proc    defaults                 0    0
# Line 197  proc             /proc         proc    d Line 225  proc             /proc         proc    d
225  /dev/fd0         /mnt/floppy   auto    noauto,rw,sync,user,exec 0    0  /dev/fd0         /mnt/floppy   auto    noauto,rw,sync,user,exec 0    0
226  /dev/cdrom       /mnt/cdrom    iso9660 noauto,ro,user,exec      0    0  /dev/cdrom       /mnt/cdrom    iso9660 noauto,ro,user,exec      0    0
227    
228  /dev/XXX         /tmp          ext2    rw,nosuid,nodev          0    2  /dev/XXX         /tmp          ext3    rw,nosuid,nodev          0    2
229  /dev/XXX         /var          ext2    rw,nosuid,nodev          0    2  /dev/XXX         /var          ext3    rw,nosuid,nodev          0    2
230  /dev/XXX         /usr          ext2    rw,nodev                 0    2  /dev/XXX         /usr          ext3    rw,nodev                 0    2
231  /dev/XXX         /home         ext2    rw,nosuid,nodev          0    2  /dev/XXX         /home         ext3    rw,nosuid,nodev          0    2
232  </screen></informalexample>  </screen></informalexample>
233    
234  Use <userinput>mount -a</userinput> to mount all the file systems you  Use <userinput>mount -a</userinput> to mount all the file systems you
# Line 212  file systems individually use: Line 240  file systems individually use:
240  </screen></informalexample>  </screen></informalexample>
241    
242  You can mount the proc file system multiple times and to arbitrary  You can mount the proc file system multiple times and to arbitrary
243  locations, though /proc is customary. If you didn't use  locations, though <filename>/proc</filename> is customary. If you didn't use
244  <userinput>mount -a</userinput>, be sure to mount proc before  <userinput>mount -a</userinput>, be sure to mount proc before continuing:
 continuing:  
245    
246  <informalexample><screen>  <informalexample><screen>
247  # mount -t proc proc /proc  # mount -t proc proc /proc
248  </screen></informalexample>  </screen></informalexample>
249    
250    </para><para>
251    
252    The command <userinput>ls /proc</userinput> should now show a non-empty
253    directory. Should this fail, you may be able to mount proc from outside
254    the chroot:
255    
256    <informalexample><screen>
257    # mount -t proc proc /mnt/debinst/proc
258    </screen></informalexample>
259    
260  </para>  </para>
261     </sect3>     </sect3>
262    
# Line 233  To configure your keyboard: Line 270  To configure your keyboard:
270  # dpkg-reconfigure console-data  # dpkg-reconfigure console-data
271  </screen></informalexample>  </screen></informalexample>
272    
273    </para><para>
274    
275    Note that the keyboard cannot be set while in the chroot, but will be
276    configured for the next reboot.
277    
278  </para>  </para>
279     </sect3>     </sect3>
280    
# Line 242  To configure your keyboard: Line 284  To configure your keyboard:
284    
285  To configure networking, edit  To configure networking, edit
286  <filename>/etc/network/interfaces</filename>,  <filename>/etc/network/interfaces</filename>,
287  <filename>/etc/resolv.conf</filename>, and  <filename>/etc/resolv.conf</filename>,
288  <filename>/etc/hostname</filename>.  <filename>/etc/hostname</filename> and
289    <filename>/etc/hosts</filename>.
290    
291  <informalexample><screen>  <informalexample><screen>
292  # editor /etc/network/interfaces  # editor /etc/network/interfaces
293  </screen></informalexample>  </screen></informalexample>
294    
295  Here are some simple examples from  Here are some simple examples from
# Line 255  Here are some simple examples from Line 298  Here are some simple examples from
298  <informalexample><screen>  <informalexample><screen>
299  ######################################################################  ######################################################################
300  # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)  # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
301  # See the interfaces(5) manpage for information on what options are  # See the interfaces(5) manpage for information on what options are
302  # available.  # available.
303  ######################################################################  ######################################################################
304    
# Line 310  interface name (eth0, eth1, etc.) that y Line 353  interface name (eth0, eth1, etc.) that y
353     </sect3>     </sect3>
354    
355     <sect3>     <sect3>
    <title>Configure Timezone, Users, and APT</title>  
 <para>  
   
 Set your timezone, add a normal user, and choose your <command>apt</command>  
 sources by running  
   
 <informalexample><screen>  
 # /usr/sbin/base-config new  
 </screen></informalexample>  
   
 </para>  
    </sect3>  
   
    <sect3>  
356     <title>Configure Locales</title>     <title>Configure Locales</title>
357  <para>  <para>
358    
359  To configure your locale settings to use a language other than  To configure your locale settings to use a language other than
360  English, install the locales support package and configure it:  English, install the <classname>locales</classname> support package
361    and configure it:
362    
363  <informalexample><screen>  <informalexample><screen>
364  # apt-get install locales  # aptitude install locales
365  # dpkg-reconfigure locales  # dpkg-reconfigure locales
366  </screen></informalexample>  </screen></informalexample>
367    
368  NOTE: Apt must be configured before, ie. during the base-config phase.  NOTE: <classname>apt</classname> must be configured beforehand by creating
369    a sources.list and running <command>aptitude update</command>.
370  Before using locales with character sets other than ASCII or latin1,  Before using locales with character sets other than ASCII or latin1,
371  please consult the appropriate localization HOWTO.  please consult the appropriate localization HOWTO.
372    
# Line 351  If you intend to boot this system, you p Line 382  If you intend to boot this system, you p
382  and a boot loader. Identify available pre-packaged kernels with  and a boot loader. Identify available pre-packaged kernels with
383    
384  <informalexample><screen>  <informalexample><screen>
385  # apt-cache search kernel-image  # apt-cache search <phrase condition="classic-kpkg">kernel</phrase><phrase condition="common-kpkg">linux</phrase>-image
386  </screen></informalexample>  </screen></informalexample>
387    
388  Then install your choice using its package name.  Then install your choice using its package name.
389    
390  <informalexample><screen>  <informalexample><screen>
391  # apt-get install kernel-image-<replaceable>2.X.X-arch-etc</replaceable>  # aptitude install <phrase condition="classic-kpkg">kernel</phrase><phrase condition="common-kpkg">linux</phrase>-image-<replaceable>&kernelversion;-arch-etc</replaceable>
392  </screen></informalexample>  </screen></informalexample>
393    
394  </para>  </para>
# Line 368  Then install your choice using its packa Line 399  Then install your choice using its packa
399  <para>  <para>
400    
401  To make your &debian; system bootable, set up your boot loader to load  To make your &debian; system bootable, set up your boot loader to load
402  the installed kernel with your new root partition. Note that debootstrap  the installed kernel with your new root partition. Note that
403  does not install a boot loader, though you can use apt-get inside your  <command>debootstrap</command> does not install a boot loader, though you
404  Debian chroot to do so.  can use <command>aptitude</command> inside your Debian chroot to do so.
405    
406  </para><para arch="i386">  </para><para arch="x86">
407    
408  Check <userinput>info grub</userinput> or <userinput>man  Check <userinput>info grub</userinput> or <userinput>man
409  lilo.conf</userinput> for instructions on setting up the  lilo.conf</userinput> for instructions on setting up the
# Line 383  add an entry for the Debian install to y Line 414  add an entry for the Debian install to y
414  edit it there. After you are done editing, call lilo (remember it will use  edit it there. After you are done editing, call lilo (remember it will use
415  <filename>lilo.conf</filename> relative to the system you call it from).  <filename>lilo.conf</filename> relative to the system you call it from).
416    
417  </para><para arch="i386">  </para><para arch="x86">
418    
419  Here is a basic <filename>/etc/lilo.conf</filename> as an example:  Here is a basic <filename>/etc/lilo.conf</filename> as an example:
420    
421  <informalexample><screen>  <informalexample><screen>
422  boot=/dev/hda6  boot=/dev/hda6
423  root=/dev/hda6  root=/dev/hda6
424  install=/boot/boot-menu.b  install=menu
425  delay=20  delay=20
426  lba32  lba32
427  image=/vmlinuz  image=/vmlinuz
# Line 422  image=/vmlinux Line 453  image=/vmlinux
453  label=Debian  label=Debian
454  </screen></informalexample>  </screen></informalexample>
455    
456  On some machines, you may need to use <userinput>ide0:</userinput>  On some machines, you may need to use <userinput>ide0:</userinput>
457  instead of <userinput>hd:</userinput>.  instead of <userinput>hd:</userinput>.
458    
459  </para>  </para>
460    </sect2>    </sect2>

Legend:
Removed from v.28245  
changed lines
  Added in v.39614

  ViewVC Help
Powered by ViewVC 1.1.5