dnl $OpenBSD: xfer,v 1.42 2005/04/27 03:07:16 jsg Exp $ Installation is supported from several media types, including: CD-ROM FFS partitions (for upgrades only) Tape FTP HTTP Not all methods are supported on all SPARC Systems and some of them work only with the floppy or the miniroot installation. If you have the OpenBSD CD-ROM distribution (and a CD-ROM drive), you may be able to boot from it, or from the supplied bootable CD-ROM mini image. However, not all SPARC systems support booting from CD-ROM, and the current boot image is only known to work on sun4c and sun4m architecture workstations. If you can boot from the CD-ROM, you are home free and can proceed to the installation steps. If not, you will need to do some setup work to prepare a bootable image: either a floppy, hard drive, tape, or compatible net boot server. In addition to the bootable image, you also need to consider how to access the binary distribution sets to actually install the system. Although you can access the distribution sets directly from the CD-ROM or from one of the FTP mirrors over the internet, you may wish to transfer the sets to a local FTP server, or copy them to a partition on the target system's disk or onto a SCSI tape. OpenBSDXferFloppyFromDOS OpenBSDXferFloppyFromUNIX Creating a bootable hard disk using SunOS, Solaris or other Un*x-like system: If you don't have a floppy drive you can copy the floppy installation image "floppy{:--:}OSrev.fs" or the mini-root "miniroot{:--:}OSrev.fs" onto the hard disk you intend to boot on. Traditionally, the way to do this is to use dd(1) to place the bootable filesystem image in the "swap" partition of the disk (while running in single user mode), and then booting from that partition. Using the "b" partition allows you to boot without overwriting any useful parts of the disk; you can also use another partition, but don't use the "a" or "c" partition without understanding the disk label issues described below under "incompatible systems". This requires that you be running SunOS, Solaris, OpenBSD, or NetBSD, which have a compatible view of SunOS disk labels and partitions. Use the dd(1) utility to copy the file to the hard drive. The command would likely be, under SunOS: dd if=floppy{:--:}OSrev.fs of=/dev/rsd0b bs=36b - or - dd if=miniroot{:--:}OSrev.fs of=/dev/rsd0b bs=36b and under Solaris: dd if=floppy{:--:}OSrev.fs of=/dev/rdsk/c0t0d0s1 bs=36b - or - dd if=miniroot{:--:}OSrev.fs of=/dev/rdsk/c0t0d0s1 bs=36b The blocksize is arbitrary as long as it's a multiple of 512 bytes and within the maximum supported by the driver, i.e. bs=126b may not work for all cases. Again, device/partition names may vary, depending on the OS involved. If you are preparing the hard drive on an incompatible system or don't care about the hard disk contents, you can also install the bootable image starting at the beginning of the disk. This lets you prepare a bootable hard-drive even if don't have a working operating system on your SPARC, but it is important to understand that the bootable image installed this way includes a "disk label" which can wipe out any pre-existing disk labels or partitioning for the drive. The floppy image is used only for booting, and can be placed in a partition that will be overwritten during the install process, since it actually runs off a ram-disk image in the kernel. In contrast the miniroot is a normal unix root filesystem and you must place it in a partition that will not be overwritten until you've completed the installation process. To copy the floppy image to the whole disk, overwriting labels: Under SunOS: dd if=floppy{:--:}OSrev.fs of=/dev/rsdXc bs=36b and under Solaris: dd if=floppy{:--:}OSrev.fs of=/dev/rdsk/c0tXd0s2 bs=36b Two notes - X should be replaced by the unit number of the target disk, which is most likely *not* the disk/partition that's your current root partition. Again names may vary depending on the OS involved. Second, after doing this, the disklabel will be one that would be appropriate for a floppy, i.e. one partition of 2880 blocks, and you'll probably want to change that later on. If you're starting with a virgin disk and trying to do this under SunOS or Solaris, use format(8/1M) and newfs(8/1M) to set up the partitions and mark the intended partition as an normal partition type. If you're using OpenBSD, perhaps on another architecture, OpenBSD will create a "fictitious label" that will let you access the whole disk. To copy the floppy image to the hard disk, preserving SunOS, Solaris, NetBSD or OpenBSD labels: Under SunOS: dd if=floppy{:--:}OSrev.fs of=/dev/rsdXc bs=1b skip=1 seek=1 and Solaris: dd if=floppy{:--:}OSrev.fs of=/dev/rdsk/c0tXd0s2 \ bs=1b skip=1 seek=1 You need to be sure that your version of dd(1) supports the skip and seek operands, otherwise you can try a technique like: dd if=/dev/rsdXc of=/tmp/label bs=1b count=1 dd if=floppy{:--:}OSrev.fs of=/dev/rsdXc bs=36b dd if=/tmp/label of=/dev/rsdXc bs=1b count=1 In either case, you've created a situation where the disk label and the filesystem information don't agree about the partition size and geometry, however the results will be usable. Creating a network bootable setup using SunOS or other Un*x-like system: The details of setting up a network bootable environment vary considerably, depending on the network's host. Extract the OpenBSD diskless(8) man page from the man{:--:}OSrev.tgz distribution set or see the copy on the OpenBSD web page. You will also need to reference the relevant man pages or administrators guide for the host system. Basically, you will need to set up reverse-arp (rarpd) and boot parameter (rpc.bootparamd) information and make the OpenBSD bootblock, kernel/miniroot partition, and a swap file available as required by the netboot setup. OpenBSDXferPrelude OpenBSDXferBootTape(xbase xetc xfont xserv xshare,bsd.rd obs=8k conv=sync,boot obs=8k conv=sync) OpenBSDXferFFS