NDC Logical Firewall - Using USB Flash Memory Instead of Floppy


There are three good reasons to use USB flash memory instead of floppies:

  1. They're bigger.
  2. They're faster.
  3. They're probably more reliable.

Obtaining and Configuring Gibraltar - USB Flash Memory Variation

Note: This is a slight variation on the main floppy-based instructions for obtaining and configuring Gibraltar.

  1. Download the ISO image of a Gibraltar 2.5, 2.4.1, 2.3, 2.2, 2.0, 1.1, 1.0 or 0.99.8a system from http://www.gibraltar.at/, uncompress it and burn it onto a CDROM. (At the Gibraltar homepage, click "Get Gibraltar" then "Download").
  2. Copy the uw-setup shell script onto an empty USB Flash Memory Stick and then connect it to the firewall PC.
  3. Set the BIOS of the firewall PC to boot first from CDROM (not floppy or USB).
  4. Boot the Gibraltar CDROM and at the first prompt, type: fastboot to skip waiting for the not-yet-created configuration.
  5. At the unix login prompt, login as user "root" (use password "gibraltar" if prompted).
  6. Type: "loadkezs us" (to undo Austrian keyboard mapping where typing "z" gives you the "y" you want!)
  7. Type: "mount /dev/sda1 /mnt"
  8. Type: "/mnt/uw-setup" and answer the questions. (You can run uw-setup as often as you wish).
  9. Type: "echo /dev/sda1 > /etc/gibraltar/config_source".
  10. Type either: "save-config" or "reboot" to save your configuration to the USB flash memory stick. (You should eventually reboot once after running uw-setup to incorporate additional ramdisk it configures.)
  11. Remember that elsewhere in this documentation, references to "floppy" should now be understood to be your USB memory stick (except as noted below for "uw-restore").

Some Notes about USB Flash Memory on Gibraltar

When Gibraltar boots, if it doesn't find a configuration floppy, it will automatically look for its configuration on a USB flash memory stick. If it finds and loads a configuration from USB memory stick, it will remember that (in "/etc/gibraltar/config_source") and "save-config" will subsequently save to it by default. The following information is generally only needed when saving a configuration to a USB memory stick the first time (when it is not already set as the default target of "save-config").

USB memory sticks show up on Gibraltar as SCSI devices. If your USB memory stick was connected when Gibraltar booted OR if you have no other SCSI devices attached to your system, the first USB memory stick you connect will always be known as device "/dev/sda1" and you can skip the next paragraph.

If you have other SCSI devices AND your USB memory stick was not connected when the system booted things get a bit ugly but you can type: "cat /proc/scsi/scsi" to see which SCSI devices are present and in what order they were assigned to linux device names (the first one is "sda1", second one is "sdb1", etc.). Substitute that device for "sda1" in the paragraph below. (This should only be necessary until you boot with your USB memory stick connected.

If you have a USB memory stick connected to your Gibraltar system but your configuration was not loaded from USB (when you booted), you can run: "save-config  --target=usb  --to=/dev/sda1" to force "save-config" to write to your USB memory stick. (You would typically only need this long form of "save-config" when initially configuring a system or when switching from a configuration on floppy to one on USB memory stick).

One "gotcha" worth noting is that linux will probably notice if you try to alternate between two different kinds of USB memory (if they are different brands) and will assign each a different device ("sda1" or "sdb1", etc.) however if they are similar enough, linux may not detect the difference and that can bite you too (if there are differences, such as in capacity).

Using "uw-restore" with USB memory sticks

After the initial configuration, the only other time you need to do anything differently when using USB memory sticks instead of floppies is when using "uw-restore". By default, "uw-restore" reads from floppy. Beginning with "uw-setup" version 1.64, if you'd like "uw-restore" to read from a USB memory stick instead, tell it which device to restore from like this:

"RESTORE_FROM=/dev/sda1 uw-restore"

Corey Satten
Email -- corey @ u.washington.edu
Web -- http://staff.washington.edu/corey/
Date -- Mon Jan 28 12:27:33 PST 2008