CryptedNets.org

Making an OpenBSD bootable RAMDISK_CD

by on Oct.14, 2005, under OpenBSD

This is a work in progress, do not follow these directions without having the capability of continuing on your own.

Steps:

  1. You need a working openbsd machine on which to compile and build ISO images.
  2. Make a directory in which to keep the cd’s contents, such as /home/livecd or
    similar. If you can make this a separate partition, so you can boot it for testing, all the better.
  3. Untar base37.tgz and etc37.tgz in this directory.
  4. Make sure the kernel sources (/usr/src/sys) are installed on the machine.
  5. cd into /usr/src/sys/arch/i386/conf and copy the kernel config file GENERIC to CDBOOT or similar.
  6. edit the file CDBOOT. Replace the include of ../../conf/GENERIC with the contents of that file.
  7. make the following changes to CDBOOT:
    1. add the options RAMDISK_HOOKS and MINIROOTSIZE=3560 to support ramdisks
    2. comment out the line config bsd swap generic, as there will be no disk to swap to
    3. add the line config bsd root on cd0c to allow for / on the cd
  8. run the command “config CDBOOT”
  9. cd into ../compile/CDBOOT and run make depend and then make
  10. copy this kernel into /home/livecd
  11. edit the file /usr/src/distrib/i386/common/Makefile.inc, replacing the lines
            strip ${.OBJDIR}/boot
            strip -R .comment ${.OBJDIR}/boot
    

    with the line

    strip --strip-all -R .comment -K cngetc bsd.strip
    
  12. cd into /usr/src/distrib/i386/floppies
  13. create the directory CDBOOT as a copy of ramdisk_cd
  14. edit the makefile in CDBOOT, changing the line RAMDISK=RAMDISK_CD to RAMDISK=CDBOOT
  15. do a make in /usr/src/distrib/crunch and then /usr/src/distrib, to setup some prerequisites, then do a make in /usr/src/distrib/i386/CDBOOT. copy cdrom35.fs to /home/livecd/boot.img, this is the image you need to make the cd properly bootable.
  16. change /etcs to make booting work right
    1. Edit the CD version of /etc/rc to mount the floppy on /etc, then run
      /etc/rc off the floppy or run the installer if it doesn’t exist.
    2. edit the floppy version of /etc/rc to mount the appropriate filesystems.
    3. edit the CD version of /etc/fstab to include the cd and the floppy
    4. edit the floppy version of /etc/fstab to include the cd and floppy, and
      all ramdisk filesystems
  17. Create an etc floppy, or include the installer script and related files.
  18. Create the ISO image using the command: mkisofs -b cdrom37.fs -c boot.catalog -R -v -o OBSDCD.iso /home/livecd
:

Leave a Reply


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

CryptedNets.org is proudly powered by

Entries (RSS) and Comments (RSS)
Register - Login

Visit our friends!

A few highly recommended friends...