tags 394929 + pending
thanks

Hi Wiktor,

Thanks for the extensive review. Partly because of that it took a while 
for me to get around to it, but I've now patched the appendix based on 
your suggestions.

Some comments in the text below. Attached is the diff I have applied.
Feel free to comment.

Cheers,
FJP

On Monday 23 October 2006 23:45, Wiktor Wandachowicz wrote:
> Overall experience with the current incarnation of the installation
> guide with regard to appendix "D.3. Installing Debian GNU/Linux from a
> Unix/Linux System" is that it's missing sevaral steps ore some of them
> are misleading. Similar problems are also mirrored in the Ubuntu's
> instalation guide, which I already reported in their BTS [1].

That's not so strange as Ubuntu bases their installation guide on ours.

> For default desktop installation it's about 2,7GB. 

Yes, but the text talks about installing X, not a full desktop 
environment.

> D.3.4. Configure The Base System
>
> Before chrooting into newly installed envirnoment, it's advisable to
> mount /dev directory of the host system inside chroot. From within
> a running Linux installation this can be done via:
>
> # mount -o bind /dev /mnt/debian/dev        #### suggested
> # LANG=C chroot /mnt/debian /bin/bash

> This step ensures that all device nodes are actually accessible, or
> else a grub installation may later fail (and it typically does). The
> reason is that in static Debian /dev there are only nodes created by
> debotstrap, extracted from its /usr/lib/debootstrap/devices.tar.gz
> file.

I wonder if this is also a good idea if the current system is running an 
older kernel or if it is a totally different distribution.
Bind-mounting kind of assumes that the target environment is compatible 
with the environment from which the install is being done.

Alternative suggestions and discussion welcome.

> D.3.4.2. Configure Keyboard            #### suggested removal
>
> The mentioned command:
>
> # dpkg-reconfigure console-data        #### PROBLEM HERE!
>
> results in an error, as console-data is not installed at this point
> by the bootstrap (package could not be found). It could be installed
> manually, but on the other hand this step is not necessary - see
> D.3.4.5.

What do you mean that it could not be found? That debootstrap should 
install it but did not or that that was the error returned by 
dpkg-reconfigure?

I'm also going to stay with console-data for Etch as Debian has not yet 
switched to console-setup. (Will probably happen for Lenny.)
I've added an "aptitude install console-data" for now.

> D.3.4.5. Configure Locales and Keyboard        #### suggested new
> section
>
> System-wide locale settings are placed in /etc/environment file. The
> d-i does put a LANG= line there, but the guide completely leaves this
> file alone. Consider adding LANGUAGE= and LANG= settings here:

AFAIK the LANG parameter will be set by dpkg-reconfigure locales and 
LANGUAGE is really optional, so personally I don't think this needs to be 
documented. (At least, it will set /etc/default/locale which is replacing
/etc/environment.)

> D.3.5. Install a Kernel
>
> # apt-cache search linux-image
>
> Prior to the installation of kernel, it would be wise to set some
> options in /etc/kernel-img.conf for better integration with automatic
> kernel update procedure:
>
> # cat > /etc/kernel-img.conf <<EOF             #### suggested
> # Kernel Image management overrides            #### suggested
> # See kernel-img.conf(5) for details           #### suggested
> do_symlinks = yes                              #### suggested
> relative_links = yes                           #### suggested
> do_bootloader = no                             #### suggested
> do_bootfloppy = no                             #### suggested
> do_initrd = yes                                #### suggested
> link_in_boot = no                              #### suggested
> EOF                                            #### suggested
>
> If the above aren't set, kernel installation mercilesly warns about
> missing "do_symlinks = yes" entry in /etc/kernel-img.conf file.

This is very dangerous advise. With the example you give, the bootloader 
will not be run after kernel updates, which will result in unbootable 
systems in a lot of cases (including lilo). The default behavior is quite 
same IMO, but I've added some comments about that file.

> With the correct setting in place the kernel installation goes
> smoothly:
>
> # apt-get install linux-image-2.6.17-arch-etc        #### correction!
>
> Note the "apt-get" invocation above, instead of "aptitude". Is aptitude
> necessary for this at all?

No, but is perfectly interchangeable with apt-get and is now the preferred 
utility for package management.

> It can be beneficial for some users to (optionally) install kernel
> headers at this point

People doing debootstraps should be able to figure that out for 
themselves.

> I hope this documentation effort will be useful and I wholeheartedly
> welcome all constructive criticism upon it.

Yes, definitely useful. Thanks!

Index: chroot-install.xml
===================================================================
--- chroot-install.xml	(revision 43555)
+++ chroot-install.xml	(working copy)
@@ -33,8 +33,9 @@
 
 With your current *nix partitioning tools, repartition the hard
 drive as needed, creating at least one filesystem plus swap. You
-need at least 150MB of space available for a console only install,
-or at least 300MB if you plan to install X.
+need around 350MB of space available for a console only install,
+or about 1GB if you plan to install X (more if you intend to
+install destop environments like GNOME or KDE).
 
 </para><para>
 
@@ -43,7 +44,7 @@
 our example root partition):
 
 <informalexample><screen>
-# mke2fs -j /dev/hda6
+# mke2fs -j /dev/<replaceable>hda6</replaceable>
 </screen></informalexample>
 
 To create an ext2 file system instead, omit <userinput>-j</userinput>.
@@ -54,9 +55,9 @@
 your intended Debian swap partition):
 
 <informalexample><screen>
-# mkswap /dev/hda5
+# mkswap /dev/<replaceable>hda5</replaceable>
 # sync; sync; sync
-# swapon /dev/hda5
+# swapon /dev/<replaceable>hda5</replaceable>
 </screen></informalexample>
 
 Mount one partition as <filename>/mnt/debinst</filename> (the
@@ -66,7 +67,7 @@
 
 <informalexample><screen>
 # mkdir /mnt/debinst
-# mount /dev/hda6 /mnt/debinst
+# mount /dev/<replaceable>hda6</replaceable> /mnt/debinst
 </screen></informalexample>
 
 </para>
@@ -161,6 +162,7 @@
 in the <command>debootstrap</command> command:
 
 <userinput>alpha</userinput>,
+<userinput>amd64</userinput>,
 <userinput>arm</userinput>,
 <userinput>hppa</userinput>,
 <userinput>i386</userinput>,
@@ -174,7 +176,7 @@
 
 <informalexample><screen>
 # /usr/sbin/debootstrap --arch ARCH &releasename; \
-     /mnt/debinst http://http.us.debian.org/debian
+     /mnt/debinst http://ftp.us.debian.org/debian
 </screen></informalexample>
 
 </para>
@@ -185,12 +187,19 @@
 <para>
 
 Now you've got a real Debian system, though rather lean, on disk.
-<command>Chroot</command> into it:
+<command>chroot</command> into it:
 
 <informalexample><screen>
-# LANG= chroot /mnt/debinst /bin/bash
+# LANG=C chroot /mnt/debinst /bin/bash
 </screen></informalexample>
 
+After chrooting you may need to set the terminal definition to be
+compatible with the Debian base system, for example:
+
+<informalexample><screen>
+# export TERM=<replaceable>xterm-collor</replaceable>
+</screen></informalexample>
+
 </para>
 
    <sect3>
@@ -215,8 +224,8 @@
 /dev/XXX         none          swap    sw                       0    0
 proc             /proc         proc    defaults                 0    0
 
-/dev/fd0         /mnt/floppy   auto    noauto,rw,sync,user,exec 0    0
-/dev/cdrom       /mnt/cdrom    iso9660 noauto,ro,user,exec      0    0
+/dev/fd0         /media/floppy auto    noauto,rw,sync,user,exec 0    0
+/dev/cdrom       /media/cdrom  iso9660 noauto,ro,user,exec      0    0
 
 /dev/XXX         /tmp          ext3    rw,nosuid,nodev          0    2
 /dev/XXX         /var          ext3    rw,nosuid,nodev          0    2
@@ -232,6 +241,18 @@
 # mount /path   # e.g.: mount /usr
 </screen></informalexample>
 
+Current Debian systems have mountpoints for removable media under
+<filename>/media</filename>, but keep compatibility symlinks in
+<filename>/</filename>. Create these as as needed, for example:
+
+<informalexample><screen>
+# cd /media
+# mkdir cdrom0
+# ln -s cdrom0 cdrom
+# cd /
+# ln -s media/cdrom
+</screen></informalexample>
+
 You can mount the proc file system multiple times and to arbitrary
 locations, though <filename>/proc</filename> is customary. If you didn't use
 <userinput>mount -a</userinput>, be sure to mount proc before continuing:
@@ -254,20 +275,19 @@
    </sect3>
 
    <sect3>
-   <title>Configure Keyboard</title>
+   <title>Setting Timezone</title>
 <para>
 
-To configure your keyboard:
+An option in the file <filename>/etc/default/rcS</filename> determines
+whether the system will interpret the hardware clock as being set to UTC
+or local time. The following command allow you to set that and choose
+your timezone.
 
 <informalexample><screen>
-# dpkg-reconfigure console-data
+# editor /etc/default/rcS
+# tzconfig
 </screen></informalexample>
 
-</para><para>
-
-Note that the keyboard cannot be set while in the chroot, but will be
-configured for the next reboot.
-
 </para>
    </sect3>
 
@@ -337,6 +357,20 @@
 # echo DebianHostName &gt; /etc/hostname
 </screen></informalexample>
 
+And a basic <filename>/etc/hosts</filename> with IPv6 support:
+
+<informalexample><screen>
+127.0.0.1 localhost DebianHostName
+
+# The following lines are desirable for IPv6 capable hosts
+::1     ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+ff02::3 ip6-allhosts
+</screen></informalexample>
+
 If you have multiple network cards, you should arrange the names of
 driver modules in the <filename>/etc/modules</filename> file into the
 desired order. Then during boot, each card will be associated with the
@@ -346,23 +380,52 @@
    </sect3>
 
    <sect3>
-   <title>Configure Locales</title>
+   <title>Configure Apt</title>
 <para>
 
+Debootstrap will have created a very basic
+<filename>/etc/apt/sources.list</filename> that will allow installing
+additional packages. However, you may want to add some additional sources,
+for example for source packages and security updates:
+
+<informalexample><screen>
+deb-src http://ftp.us.debian.org/debian etch main
+
+deb http://security.debian.org/ etch/updates main
+deb-src http://security.debian.org/ etch/updates main
+</screen></informalexample>
+
+Make sure to run <userinput>aptitude update</userinput> after you have
+made changes to the sources list.
+
+</para>
+   </sect3>
+
+   <sect3>
+   <title>Configure Locales and Keyboard</title>
+<para>
+
 To configure your locale settings to use a language other than
 English, install the <classname>locales</classname> support package
-and configure it:
+and configure it. Currently the use of UTF-8 locales is recommended.
 
 <informalexample><screen>
 # aptitude install locales
 # dpkg-reconfigure locales
 </screen></informalexample>
 
-NOTE: <classname>apt</classname> must be configured beforehand by creating
-a sources.list and running <command>aptitude update</command>.
-Before using locales with character sets other than ASCII or latin1,
-please consult the appropriate localization HOWTO.
+To configure your keyboard (if needed):
 
+<informalexample><screen>
+# aptitude install console-data
+# dpkg-reconfigure console-data
+</screen></informalexample>
+
+</para><para>
+
+Note that the keyboard cannot be set while in the chroot, but will be
+configured for the next reboot.
+
 </para>
    </sect3>
   </sect2>
@@ -372,7 +435,7 @@
 <para>
 
 If you intend to boot this system, you probably want a Linux kernel
-and a boot loader. Identify available pre-packaged kernels with
+and a boot loader. Identify available pre-packaged kernels with:
 
 <informalexample><screen>
 # apt-cache search linux-image
@@ -385,6 +448,15 @@
 </screen></informalexample>
 
 </para>
+<note><para>
+
+The configuration file <filename>/etc/kernel-img.conf</filename> influences
+the installation and upgrade of pre-packaged Debian kernels. A default file
+will be created when you first install a Debian kernel image. For additional
+information about this file, consult its man page which will be available
+after installing the <classname>kernel-package</classname> package.
+
+</para></note>
   </sect2>
 
   <sect2>
@@ -404,11 +476,25 @@
 add an entry for the Debian install to your existing grub
 <filename>menu.lst</filename> or <filename>lilo.conf</filename>.  For
 <filename>lilo.conf</filename>, you could also copy it to the new system and
-edit it there. After you are done editing, call lilo (remember it will use
+edit it there. After you are done editing, call <command>lilo</command>
+(remember it will use
 <filename>lilo.conf</filename> relative to the system you call it from).
 
 </para><para arch="x86">
 
+Installing and setting up <classname>grub</classname> is as easy as:
+
+<informalexample><screen>
+# apt-get install grub
+# grub-install /dev/<replaceable>XXX</replaceable>
+# update-grub
+</screen></informalexample>
+
+The last command will create a sane and working
+<filename>/boot/grub/menu.lst</filename>.
+
+</para><para arch="x86">
+
 Here is a basic <filename>/etc/lilo.conf</filename> as an example:
 
 <informalexample><screen>
@@ -451,4 +537,32 @@
 
 </para>
   </sect2>
+
+  <sect2>
+<title>Finishing touches</title>
+<para>
+
+As mentioned earlier, the installed system will be very basic. If you would
+like to make the system a bit more mature, there is an easy method to
+packages of <quote>standard</quote> priority:
+
+<informalexample><screen>
+# tasksel install standard
+</screen></informalexample>
+
+Of course, you can also just use <command>aptitude</aptitude> to install
+packages individually.
+
+</para><para>
+
+After the installation there will be a lot of downloaded packages in
+<filename>/var/cache/apt/archives/</filename>. You can free up some
+diskspace by running:
+
+<informalexample><screen>
+# aptitude clean
+</screen></informalexample>
+
+</para>
+  </sect2>
  </sect1>

Attachment: pgpLQqpxYvy0W.pgp
Description: PGP signature

Reply via email to