2. Building Custom Installation Media

2.1. Motivation

We need to install Debian onto some hardware which is not supported by any of the debian installation sets. To overcome this, we make a custom installation floppy.

2.2. Prepartion

Stuff you'll need:

Files:

rescue.bin, root.bin, a kernel configuration file from the "bf" branch of Debian, and a Linux kernel.

You will also need two floppy disks. 1.44 MB, 3.5 inch. Don't try this with your old 5.25 floppies. You've been warned.

100-200MB of spare hard drive space, to compile the kernel.

A compiler. GCC 2.95 is highly recommended.

2.3. Compiling the Kernel

Rename kernel-config to .config in the kernel source directory. Run

make oldconfig

Accept the defaults for every question. The kernel-config file is designed for a 2.4.18 kernel. We need to let it know about the new options available in 2.4.22. You can either

  1. press "ENTER" for every option

  2. /usr/bin/yes "" | make oldconfig

then

make menuconfig

You will defintely need msdos filesystem support - the boot floppy uses this. Also, include support for your network card, and whatever other hardware you might need to install the operating system. Turn on the "experimental code" option in the kernel.

Enable the PDC20271 ("PROMISE PDC202{68|69|70|71|75|76|77} support") under the "ATA/IDE/MFM/RLL support" menu. We had to enable the high-memory support option in the "Processor type and features" menu, because we were in the enviable position of having 1GB of RAM. You may need to delete other options for now; getting the kernel small enough to fit onto an install floppy is tricky. The existing kernel is 1,263,339 bytes long, and your custom kernel should be no bigger than that. Compile the kernel with

make dep && make modules && make bzImage

make may lie about the kernel image being too big. Check the file size with:

ls -l arch/i386/boot/bzImage

2.4. Putting it together

Mounting the image:

mount -o loop rescue.bin /mnt

copy bzImage to linux.bin under /mnt

gzip -9 < System.Map > /mnt/sys_map.gz

Not necessary but nice:

gzip -9 < .config > /mnt/config.gz

update debian.txt to indicate new kernel version. umount /mnt.

fdformat /dev/fd0

dd if=rescue.bin of=/dev/fd0

dd if=root.bin of=/dev/fd0