Fandom

OpenBSD Wiki

Creating a custom OpenBSD RAM disk

34pages on
this wiki
Add New Page
Talk0 Share

IngredientsEdit

  • One OpenBSD system with enough space to build a release and with the compilers install set installed. This guide assumes you have OpenBSD 4.6.
  • The src.tar.gz for your OpenBSD version.
  • The sys.tar.tgz for your OpenBSD version.
  • The cdboot and cdbr files for your OpenBSD version.

Disclaimer (or: My lawyer made me do it)Edit

This guide is just that – a guide. No responsibility is taken, implied or otherwise, for any liability for any damage whatsoever, be it immediate, as a residual effect or otherwise, caused by following this guide. OpenBSD’s developers will not answer any support requests regarding any issues that arise from following this guide. If it breaks, you get to keep both pieces.

InstructionsEdit

  1. Unpack the src.tar.gz and sys.tar.gz into the /usr/src directory.
  2. Compile and install crunchgen:
# cd /usr/src/usr.sbin/crunchgen
# make && make install
  1. Compile the special tools used in the ramdisk:
# cd /usr/src/distrib/special
# make
  1. Edit /usr/src/distrib/i386/ramdisk_cd/list.local and add the path to the program you wish to add. For instance, to add rsh to the ram disk, add the following to the lines like it:
LINK instbin                                    bin/rsh
  1. Build the ram disk:
# cd /usr/src/distrib/i386/ramdisk_cd
# make
  1. Build an iso image:
# mkdir isofiles
# cp /path/to/your/cdbr isofiles
# cp /path/to/your/cdboot isofiles
# mkdir isofiles/{etc,4.6/i386}
# cp bsd.rd isofiles/etc/4.6/i386
# mkhybrid –r –V "OpenBSD 4.6 Backup" –b cdbr \
> –c boot.cat –o cd46.iso > isofiles/
  1. Burn the CD, or fire it up in your favourite VM.
  2. Profit!

Other usesEdit

  • You could also use the bsd.rd image and pxeboot from your CD and boot systems over a network using this ram disk you created.
  • You could add additional drivers to the ramdisk kernel to support devices needed to install your system. Be sure to modify /usr/src/sys/arch/i386/RAMDISK_CD to add the drivers you require. If the drivers aren't in GENERIC, this will necessitate a full release build, which is beyond the scope of this document.
  • You could modify the install scripts to perform a certain purpose. I created one that would allow the user to backup and restore their entire system to a central server.

Final wordEdit

Above all, you are responsible for whatever you do when you follow this guide. If it breaks, you get to keep both pieces.

In any case, good luck and have fun – that’s what it’s all about.

AccoladesEdit

Source: Creating a custom OpenBSD RAM Disk

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.