21 Jan 2004 wardv   » (Journeyer)

Debian install CD

Rolling your own Debian (net) install cd is not difficult. If you ever need to install Debian on a machine but need special drivers for some of its hardware (say, a raid controller or a network card), you can make your own install cd with custom kernel like this:

  • Start from David Kimdon's bf2.4-3.0.23-mini.iso image (2.4.18 rescue/boot set with base system; 37MB)
        mount -o loop bf2.4-3.0.23-mini.iso /cdrom
        mkdir /cd2; 
        cd /cd2
        (tar cvf - /cdrom/* /cdrom/.disk /cdrom/.xlp | tar xvf -)
        mv cdrom/* .
        mv cdrom/.disk .
        mv cdrom/.xlp .
        rmdir cdrom
  • in the 'boot' subdirectory you will find rescue.bin. This is a bootable floppy image. It contains the kernel + root file system (which will be loaded in ram).
        mount -o loop rescue.bin /floppy
  • replace config.gz with a gzipped copy of the .config of your custom, tweaked kernel
  • replace linux.bin with your arch/i386/boot/bzImage (make sure it is not too big - it needs to fit on the floppy image!)
  • replace sys_map.gz with a gzipped copy of your System.map
  • Edit the 'install.sh' file, and update the VERSION parameter on line 10 to reflect the version of your kernel
  • Also edit 'debian.txt', update the kernel version
  • Unmount the floppy image
        umount /floppy

  • The last step is to modify dists/woody/main/disks-i386/current/bf2.4/drivers.tgz. First extract that file:
        tar xzvf drivers.tgz
    The modules.tgz file needs to be replaced with a tgz archive of the /lib/modules/your-kernel directory. Make the archive:
        tar cvzf modules.tgz /lib/modules/your-kernel
    Then recreate the drivers.tgz file and remove the other files:
        rm drivers.tgz
        tar cvzf drivers.tgz install.sh modconf.tgz modcont modules.tgz pcmcia.tgz type.txt
        rm install.sh modconf.tgz modcont modules.tgz pcmcia.tgz type.txt
  • Time to make a new bootable el-torito image of the new boot cd:
        cd /
        mkisofs -r -b boot/rescue.bin -c boot.catalog -o debian-bf24-2424.iso /cd2/
  • burn it - don't be wasteful and use a CD-RW rather than a CD-R!
  • boot it, sit back and enjoy !

    Remote Debian Install

    I needed to install Debian on a couple of HP BL20p's in a colocation thousands of km away. Enter the iLO (integrated Lights-Out) that these blade servers come with - complete with a remote console and 'virtual media'. Both are Java applets - and both work fine from a Debian workstation. The virtual media option allows the mounting of a floppy (image) or a cdrom in a machine with web browser, which shows up as a usb floppy/cdrom in the blade server. Brilliant concept, right?

    I couldn't get the virtual media to work with Firebird or Konqueror and my JVM 1.4.2. With the static Opera .deb's from opera.com, it works fine - provided you run Opera as root in order to access your cdrom.

    The remote console worked in all browsers I tried.

    Doing a dual-floppy boot/root install from stock Woody install images doesn't work - the kernel on the boot disk doesn't recognize the floppy change. But with the bf2.4 iso image it worked fine - though I had to swap its kernel for a 2.4.24 with support for the SmartArray 5i controller and the Broadcom 5700 gigabit ethernet card.

    There's something amazing about doing an OS install from another continent...


    If you ever need to drive a truck through Boston, avoid Memorial Drive. It's got lots of height restrictions - not necessarily indicated before it is too late to take an alternative road. Trust me, backing op on Mem Drive is not fun. And as I found out afterwards, driving a truck there is apparently illegal - though in typical Bostonian fashion, that was not indicated in any clear way...

  • Latest blog entries     Older blog entries

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!