3.2. Installing the Software

m0n0wall is designed to boot and run from either a CD image or a CompactFlash (CF) card or IDE hard disk. After downloading the appropriate image file, prepare the CD or CF.

3.2.1. Preparing a bootable CD

You can run m0n0wall on a standard PC with a CD-ROM drive and a floppy drive. A hard disk is not required. m0n0wall will boot from the CD and run from memory. The floppy is used only to store your m0n0wall configuration. If you want to run m0n0wall on a standard PC with a hard disk rather than a CD, follow the directions in the next section.

  • Download the ISO image as described in Getting the Software.

  • Burn the ISO image onto a CD-R (or -RW):

    • FreeBSD (ATAPI recorder):

      burncd -s max -e data cdrom-xxx.iso fixate
    • Linux (ATAPI w/ SCSI emulation):

      First, determine your burning device's SCSI ID/LUN with the following command:

      linuxbox# cdrecord --scanbus
      Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
      Linux sg driver version: 3.1.25
      Using libscg version 'schily-0.8'.
      scsibus0:
          0,0,0   100) 'LITE-ON ' 'COMBO LTC-48161H' 'KH0F' Removable CD-ROM
      

      Note the SCSI ID/LUN is 0,0,0. Burn the image as in the following example (replacing <max speed> with the speed of your burner):

      cdrecord --dev=0,0,0 --speed=<max speed> cdrom-xxx.iso
    • Windows: use your favorite burning program (e.g. Nero) to record the ISO image (2048 bytes/sector, Mode-1)

  • Format a standard 1.44 MB diskette with MS-DOS/FAT file system.

    • FreeBSD:

      fdformat -f 1440 /dev/fd0 && newfs_msdos -L "m0n0wallcfg" -f 1440 /dev/fd0

      Note: you can omit the fdformat step if the floppy disk is already (low-level) formatted.

    • Windows:

      format A:

Make sure your m0n0wall PC is set to boot from CD-ROM and not from floppy.

3.2.2. Preparing a CompactFlash or IDE Hard Disk

You can run m0n0wall on a system which uses a CompactFlash (CF) card as its primary disk, such as the Soekris boxes, or on a standard PC with an IDE hard disk. m0n0wall will load from the CF card or disk and then run from memory. It does not swap to the CF card or disk, nor does it write anything to it except when you change and save your configuration.

  • Download the appropriate raw CF/IDE image as described in Getting the Software.

  • Write the image to a sufficiently large CF card or disk (at least 5 MB). Extra space on the CF card or disk is ignored; there is no benefit to using one larger than the image size.

    • FreeBSD:

      gzcat net45xx-xxx.img | dd of=/dev/rad[n] bs=16k

      where n = the ad device number of your CF card or IDE disk (check dmesg); use net48xx-xxx.img for net4801, wrap-xxx.img for WRAP, and generic-pc-xxx.img for an IDE disk on a PC instead of net45xx-xxx.img.

      Ignore the warning about trailing garbage - it's because of the digital signature.

    • Linux:

      gunzip -c net45xx-xxx.img | dd of=/dev/hdX bs=16k

      where X = the IDE device name of your CF card or IDE disk (check with hdparm -i /dev/hdX) - some adapters, particularly USB, may show up under SCSI emulation as /dev/sdX.

      Ignore the warning about trailing garbage - it's because of the digital signature.

    • Windows:

      physdiskwrite [-u] net45xx-xxx.img

      where physdiskwrite is v0.3 or later of the physdiskwrite program available from the m0n0wall web site physdiskwrite page. Use the -u flag (without the square brackets) if the target disk is > 800 MB - make very sure you've selected the right disk!!

      To ensure you have selected the appropriate disk, run physdiskwrite prior to inserting the media you're planning to write, and make note of its output.

      physdiskwrite v0.5 by Manuel Kasper <mk@neon1.net>
      
      Searching for physical drives...
      
      Information for \\.\PhysicalDrive0:
            Windows:       cyl: 14593
                           tpc: 255
                           spt: 63
            C/H/S:         16383/16/63
            Model:         ST3120026A
            Serial number: 3JT1V2FS
            Firmware rev.: 3.06

      You now know the drives currently in the system, so you know which you don't want to use. Make note of the model and serial number. Add the drive or CompactFlash card you wish to write to, and run physdiskwrite again. You'll now see an additional drive in the output, and by referring back to when you ran the command earlier, you will know by process of elimination which drive is the one you want to write.

3.2.3. Alternative means of installation

For alternative means of installing m0n0wall, see the Installation section of the Other Documentation chapter.