Zovirl Industries

Mark Ivey’s weblog

How to configure Bering offline

The Bering installation instructions explain how to configure Bering on the firewall machine itself, by using the lrcfg program and backing up the files to the floppy disks. Sometimes I find it more convenient to edit configuration files on my desktop computer, and then copy the new image to floppy disk. (I have a linux desktop, by the way. I’m not sure how to do this on windows)

Here’s how I do it:

  1. Mount the disk image as a loopback filesystem:
    $ mkdir mount_directory
    $ mount -o loop -o umask=000 diskimage.bin mount_directory
    
  2. Some files, like syslinux.cfg, can be edited directly
  3. lrp packages need to be uncompressed before they can be edited. This has to happen in a temporary directory outside the mounted disk image, since there won’t be enough room inside the mount directory:
    $ mkdir package_directory
    $ cd package_directory
    $ tar -zxvf ../mount_directory/package.lrp
    
  4. After editing files in the package, re-compress it and replace the original lrp file:
    $ tar -cvf package.tar *
    $ gzip -9 package.tar
    $ cp package.tar.gz ../mount_directory/package.lrp
    
  5. Finally, unmount the image:
    $ umount mount_directory
    

If you want to test your images before unmounting them, call sync first to make sure the images are up to date.