flashrd
flashrd creates OpenBSD images tailored for embedded hardware devices and for executing
from a virtualized environment.
- 1.8 release notes
- Flense kernel config to control text size (avoid memory corruption for current amd64 layout)
- Make /etc more friendly when read-only (regarding random.seed and resolv.conf)
- Use proper 64K size for host.random
- Make it easy to use clang to build kernel (requires source tree patches for clang flags)
- More error checking and small bug fixes
- Import Paul Suh's builder update (including better documentation for the builder feature)
- 1.7 release notes
- flashrd -l <blocks> actually works now <p0lar@dot1q.net>
- Dynamically allocate vnds <p0lar@dot1q.net>
- Adapt to number of cpus for kernel compile <bconway@rcesoftware.com>
- Fix boot error case <bconway@rcesoftware.com>
- Adapt to OpenBSD 5.6
- resolv.conf moves out of /etc with static link if var is a tmpfs
- Bug fixes for resiliency
- 1.6 release notes
- Remove all vestiges of C/H/S user interface and use -l <blocks> instead
- Force LBA mode for MBR on disk images
- Feed disklabel with disktab file instead of formatted output
- Use disktab for vnconfig to allow non-512 byte sector size for images
- Accommodate alternate sector sizes in disklabel by scaling fsize
- Remove more assumptions of 512 byte sector size
- 1.5 release notes
- Clean up rc.flashrd.onetime a bit
- Move from mfs to tmpfs for OpenBSD 5.5
- Create random seed on flash during image creation, image copy and boot time for OpenBSD 5.5
- Use 64 sector offset everywhere in vague attempt to help with 4K sector alignment
- Update installboot arguments for OpenBSD 5.5
- Change all sizes in rc.flashrd.sub to megabytes instead of 512-byte sectors
- Don't reboot unless 'onetime' tgz actually exists, this was old behavior, back again
- 1.4 release notes
- Script cleanup and bugfixes from Andrew Fresh <andrew@afresh1.com>
- Keyboard encoding support in cfgflashrd by William-os4y <william.os4y@gmail.com>
- flashrd builder from by Paul Suh <paul.suh@ps-enable.com>
- A series of scripts to allow easy deployment of new systems and upgrades across multiple boxes
- Minor fixes and enhancements for OpenBSD 5.4 release
- Remove the need for amd64_include_pmap_h.diff as OpenBSD 5.4 defaults to NKL2_KIMG_ENTRIES=16
- The mktemp command now requires a template with at least six random characters, satisfy it
- 1.3 release notes
- Easier "in-place" upgrades to new images, using onetime.tgz. Now just add one line to your rc.conf.local, rc.local and/or rc.shutdown files that get unpacked from onetime.tgz. No hand-merging of any flashrd bootstrap or shutdown code during upgrade.
- Consolidation of vardirs/tardirs variables and better explanation (built-in to rc.flashrd.sub) of what goes where.
- 1.2 release notes
- From Fred C <fred@bsdhost.net>
- Quite a bit of ksh script cleanup in several areas, see github history and diffs for full details
- Real option handling improves previous hack-job, allows options out-of-order in flashrd and cfgflashrd
- Ability to use TMPDIR base so temp files can be put somewhere other than /tmp
- Move onetime.tgz to its own /etc/rc script, so that onetime.tgz can update
/etc/rc.conf.local itself
- A fix and cfgflashrd additions by Paul Suh <paul.suh@ps-enable.com>
- Keep output for last run command in a file that can be viewed, instead of sending to /dev/null
- Clean up flashrd script output some
- If TMPDIR defined, make a directory for all tmp files within TMPDIR
- Let /etc auto-size instead of using a minimum 50MB
- 1.1 release notes
- In rc.shutdown, delete sockets from MFS directories, instead of trying (and failing) to avoid them. Re-archiving MFS directories now works properly even when a directory contains only a socket (and is otherwise empty).
- 1.0 release notes
- Use crunchgen and cut ramdisk size nearly in half for bootstrap utils (this means you must have a full OpenBSD source tree to use flashrd)
- Cut out EISA and PCMCIA devices from kernel config, and any remaining ISA devices which use dma (le)
- Fix tar postitional reference in rc.shutdown
- 2012/08/31 release notes
- Don't archive sockets. This ruins the return value that we depend on from tar. Thanks to Russell Sutherland for making me aware of this problem and testing my fixes.
- 2012/08/27 release notes
- Fix to not display extraneous crap on boot, during root disk auto-detection
- 2012/08/26 release notes
- The combination of disk autodetection with onetime.tgz allows you to use one openbsd.vnd image across a wide variety of machines while keeping local customizations available on each flash under separate cover. There is basically no reason to ever modify the vnd file or run cfgflashrd with this version of flashrd!
- Completely remove references to /flash from fstab; this is handled only from stand/rc now
- Add bnx firmwares (and raise ramdisk size to 8000 blocks to accommodate)
- Add disk autodetection routine which locates openbsd.vnd across sd3a, sd2a, sd1a, sd0a, wd3a, wd2a, wd1a, wd0a in that order (last match wins, if there is a better order for your common configuration, i'd like to know)
- Avoid moving tardir (such as var.tar) in place for next run if tar was not successful in re-compacting the directory
- Make default free space 50% of total space used for vnddirs, this makes openbsd.vnd overflow 1GB on amd64 but the vnd file has holes for free space so you can still actually use this on a 1GB flash (although it's not recommended, you'll have problems if you try to use free space the disk doesn't have)
- New onetime and onboot upgrade unpack options
- Put /flash/onetime.tgz on the disk and the files inside it will be copied to openbsd.vnd upon boot, only once
- Put /flash/onboot.tgz on the disk and the files inside it will be copied upon each boot cycle
- Wait 30 seconds if any tardirs are re-compacted on shutdown, before allowing shutdown. This is very likely to be completely unnecessary, but done in the same spirit as umountwait. This will be removed in a future release.
- Tardirs are only re-compacted on shutdown if noted in /etc/rc.shutdown. Some flashrd releases did this automatically, which was never inteded behavior.
- to use this on OpenBSD/amd64 (5.0 - 5.2), you must apply a simple patch to /usr/src/sys/arch/amd64/include/pmap.h before running flashrd (or use a pre-built disk image)
- 2012/05/23 release notes
- raise NKPTP on i386 to 16 to allow larger ramdisk to work properly on MP kernels
- set NKL2_KIMG_ENTRIES to 16 on amd64 for the same on amd64, now amd64 boots again with a fat ramdisk attached
- growimg was slightly broken in the last release due to a missing quotation mark, fixed now
- to use this on OpenBSD/amd64 release 5.0 or 5.1, you must apply a simple patch to/usr/src/sys/arch/amd64/include/pmap.h before running flashrd (or use a pre-built disk image)
- 2012/05/21 release notes
- update to latest elfrdsetroot (from OpenBSD 5.1) which allows for cfgflashrd of i386 images on amd64 workstation (and vice versa)
- always use in-kernel disk geometry for real disks in growimg, otherwise the kernel will complain if growimg supplies a geometry different than detected
- 2011/04/21 release notes
- switch from svnd to vnd (Only for OpenBSD 5.0, 4.9 release and earlier should use the previous version of flashrd!)
- 2011/03/03 release notes
- /etc/rc was slightly reorganized in 4.9, reflect these changes, don't untar tardirs twice, still ok on 4.8 too
- fix rc.shutdown too (so we don't extract before re-compacting tardirs)
- 2010/10/01 release notes
- Add -mp, -sp and -tz options to cfgflashrd (to set mp, sp as primary kernel, and to set time zone)
- Add NKPTP=8 to kernel config to accommodate kernel+ramdisk up to 32MB (problem and resolution gleaned from flashboot README)
- Strip isadma and related devices from the kernel to accommodate kernel+ramdisk that uses the full first 16MB of memory
- Note that OpenBSD/amd64 4.8 users will need kernel patches to work around GCC4 store "optimizations"
- 2010/04/02 release notes
- Fix usage with no tardirs and/or mfsdirs defined
- Add /sbin/reboot to ramdisk rdroot (to reboot cleanly if the system fails to load)
- Add most networking firmware to ramdisk rdroot (so USB NICs, USB RS232 work without unplug/replug)
- Add make clean to kernel compilation (only runs if config utility says that kernel options have changed)
- Add detail to kernel compilation phase for less patient people (make depend, make clean, make)
- 2009/09/04 release notes
- 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)