flashrd
flashrd is an OpenBSD installer with an eye towards larger flash devices.
The primary targets are USB key, Flash disk module, Compact Flash adapter, or hard disk.
The flashrd installation is targeted towards infrastructure equipment.
It installs a complete OpenBSD system with "one-touch" upgrade capability. The system stays mounted read-only during normal operation,
with writes directed towards a memory filesystem, eliminating the need for
frequent disk writes.
This greatly reduces the potential for both boot
failure due to a dirty filesystem and for flash corruption from repeated writes.
It boots from a ramdisk to make in-place upgrades easy and complete.
flashrd allows the disk filesystem to be used in a read-write manner as well.
All memory filesystems can be easily eliminated from the flashrd configuration
by changing parameters at the top of the flashrd script.
A flashrd image can be used in an application where many copies of the same
machine run concurrently.
If your servers don't experience frequent changes, the advantage
of using the flashrd scheme is that upgrades are fast and trivial across your server farm,
once your primary flashrd upgrade image is created.
flashrd images can be created based on any running system, they don't have to be default OpenBSD system releases. Your setup could be as simple as mounting the filesystem tree of the system you want to copy under /mnt. Then, just use /mnt as your file source.
flashrd works within 128MB RAM and 1GB flash hosting a default OpenBSD/i386 or OpenBSD/amd64 installation. To hold more than one version of a system on the flash at any given time, a 2GB or larger flash is recommended.
Feedback is welcome.
Do you like using OpenBSD? Do you want to continue to get high-quality releases? Please buy CDs to support the OpenBSD project. Buy them for each machine, or donate directly to the project. This is the only way OpenBSD gets funding to continue the project.
- Frequently Asked Questions about flashrd
- Old versions of flashrd
- Disk images (latest 2009/09/04) generated by flashrd (these are fully ready binary images)
- flashrd-20090904.tar.gz (for OpenBSD 4.5, 4.6) - I appreciate feedback and bug reports
- Fix -disk option in flashrd parent script by giving umount up to 30 seconds (for slow flash) (and fix test exit status that skews mkdist end)
- Stop zeroing out full vnd image in mkboot and mkdist, makes flashrd runs significantly faster with slow disk or flash
- Stop using kernel auto-disklabel for boot image, instead create our own disklabel with 63 sectors/track (higher chance of image compatibility for folks not able to run growimg)
- Make /flash/old revert-on-failure more likely to work in stand/rc
- 2009/09/02 release notes
- Make default image 950MB instead of 1024MB so it actually fits on any "1GB" flash card
- Make /root a 50MB partition so that you can persistently save things like ssh keys (added root to vnddirs)
- Fix -disk option in cfgflashrd
- Fix error reporting for invocation of vnconfig -u when disk specified
- Remove POOL_DEBUG from kernel config before compiling for speed (this option is only enabled during development cycles, delete this out of mkkern if you want -current kernels with POOL_DEBUG)
- Copy rc.shutdown as example to preserve tardirs on reboot
- Mount source image rdonly with growimg, makes failure recovery easier
- 2009/07/27 release notes:
- Clean up error handling by adding a 'fallback harness' to scripts, improves readability significantly
- While there, clean up some fall back handling and force unmounts in the harness
- Include elfrdsetroot.c with flashrd (user no longer required to have a local source tree just to run cfgflashrd)
- 2009/07/22 release notes:
- Add option to configure serial console to cfgflashrd
- Add architecture check for elfrdsetroot to cfgflashrd (elfrdsetroot only works for kernels on the same archtecture that it was compiled on)
- Installation instruction [English] [Italiano] for flashrd.
- flashrd-20090904.tar.gz package contents description
- nsh: command line interface for OpenBSD routers
- flashdist: Read-only mounts with 32MB RAM and 32MB flash