#include <infodrom.style>
#include <debian.style>

<page title="Installing Debian with only 4MB">

<h1 align=center>Installing Debian with only 4MB</h1>

<blockquote>
This document is copyright (C) 2001 Jens Scheidtmann.
You may freely distribute and alter this document under the
GNU Public License 2 or above.
</blockquote>

<p><em>Version 0.1</em>

<h3>Prerequisites</h3>

<ul>

<li> A normal computer with some free disk space. Not only free space in
  a partition, but an area of your hard disk without a partition. It
  should run Debian of course.

<li> A notebook or computer with &gt;= 4 MB RAM (and &lt; 8 MB) with an HD of
  &gt;= 300 MB, a parallel port and a floppy drive.

<li> a LapLink cable (at least this howto assumes it, but you sure can
  use other means to connect the two computers).

<li> An Internet connection or a Debian Install CD Set.

<li> A version of the smalllinux boot/root disks (search freshmeat.net).

</ul>

<h3>Outline of the Process</h3>

<ol>

<li> First you will use your normal computer and prepare a tarball of
     the Debian base system.

<li> Then you will boot the notebook with boot/root disks, partition its
     hard disks and transfer the prepared tarball to it.

<li> Make it bootable from the notebooks HD.

<li> Start using Debian on your notebook.

     <b>Note:</b> Before following the process described here, you can
     try to install Debian from the installation disk set. Make sure
     that you replace the kernel on the boot disk with a kernel which
     does not consume so much memory.  I don't know exactly where I
     ran into problems (because I did this install described in here a
     while ago), but I tried hard and fell back on the approach
     described in this howto, so good look and please tell me if you
     get it working.

</ol>

<h3>Phase I</h3>

<p>Prepare the Tarball.

<ol>

<li> Boot into smalllinux on your Notebook.

<li> Look at your notebook and find out how big the HD is using
   fdisk. Decide how many space you will reserve for swapping and how
   many space is left for the linux partition.

   <p>Use plenty of swap space! Mine is 35 MB. You should make it at
   least 20 MB big, because this partition will first contain a copy
   of the tarball we prepared on the normal computer.

   <p>So partition the disk according to your choices. Format BOTH
   partitions as ext2.

<li> Create a partition with a comparable size as the final linux
   partition on your normal computer. The exact size does not matter.

<li> Install the Debian base system into this partion using the install
   floppies, a CD of your installation CD set or use whatever
   is your preferred way to install Debian.

<li> Boot into your normal Linux System and mount the partition. Make a
   nice tarball out of it (as root), while preserving permissions:

<pre>
    # cd /mnt/point; tar cvpzf /tmp/ball.tar .
</pre>

</ol>

<h3>Phase II</h3>

<p>Once you got the tarball, you can proceed by making a network
connection
between the two computers.

<ol>

<li> Take a break.

<li> Connect the two computers with your LapLink Cable.

<li> Make sure the kernel of your normal computer has got the "plip"
   module available or compiled in.

<li> Edit /etc/hosts and add two lines for your normal computer and your
   notebook:

<pre>
    192.168.0.1     father
    192.169.0.2     baby
</pre>

<li>Fire the connection up on your normal computer:

<pre>
    # ifconfig plip0 father pointopoint baby up
</pre>

  <p>If you are still using a 2.0.X kernel use plip1 instead. You will
  then have to add a route, too: "route add baby dev plip1".

<li> Similarly fire the connection up using smalllinux from the
   notebook. Here you will have to use "plip1", raw IP adresses and
   add a route.

   <p>You should now be able to send pings between the two computers.

<li> mount the supposed swap partition as ext2 and open an ftp
   connection to
   your normal computer. Download ball.tar into the swap partition.

<li> mount the final linux partition and extract the tarball into it:

<pre>
    # cd /mnt/point/final; tar xvzpf /where/ever/it/is/ball.tar
</pre>

<li> umount the swap partition and do a mkswap with it.

</ol>

<h3>Phase III</h3>

<p>Now the Debian base system is installed on the laptop, you now have to
make it bootable.

<ol>

<li> Prepare a bootfloppy for you notebook by dd-ing the smalllinux
   kernel onto a floppy disk. Set the correct boot device (the final
   partition) with rdev:

<pre>
    # dd if=smalllinux.kernel of=/dev/fd0
    # rdev /dev/fd0 /dev/correct.partition
</pre>

<li> Start the notebook with it and keep your fingers crossed that
   everything went alright and you don't get a kernel panic.

<li> Copy the kernel to your harddisk, edit lilo.conf and run lilo.

<li> Check wether the notebook starts without problems.

</ol>

<h3>Phase IV</h3>

<p>Use the notebook. Here are some tips:

<ul>

<li> Compile a lightweight 2.0.x kernel on your normal computer using
  kernel-tools. If it takes more than 500 k it is not lightweight.
  "dpkg -i" it on the notebook. (fdisk -l will not work, but hey, who
  cares.)

<li> ftp /etc/apt/sources.list and /var/state/apt/lists/* from your
  normal computer. Read /usr/share/doc/apt/offline.txt.gz and use the
  wget method, but ftp the packages directly to
  <code>/var/cache/apt/archives</code>.

  <p>Try to avoid installing, because apt-get install swaps to death.

<li> zgv is a svgalib picture viewer, and bmv is a svgalib ghostscript
  frontend.

<li> emacs20 works but takes ages to start.

<li> I even installed tetex.

<li> There is a "tiny X" out somewhere, but I haven't tried it yet and I
  don't know when I will.

</ul>

<!-- Jens Scheidtmann <JensScheidtmann@web.de> -->
<author>&copy; 2001, Jens Scheidtmann</author>

</page>

# Local variables:
# mode: indented-text
# mode: iso-accents
# end:
