Personal tools
You are here: Home Software OpenBSD Creating a OpenBSD bootable CD-ROM on a Mac
Document Actions

Creating a OpenBSD bootable CD-ROM on a Mac

by Maki Kato last modified 2006-04-16 19:55

This article describes how to create a bootable CD-ROM for installing OpenBSD onto mvme88k hardware from a Apple Macintosh with OS/X 10.4

The following was origitally written by Tim McIntosh, and confirmed by Maki on 3.9(pre-release snapshot). You can find the relavent files in the folder this article is in, as well as a pre-compiled installboot.

INSTRUCTIONS

(0) Build installboot cross-hosted on Darwin:

% cd sys/arch/mvme88k/stand

(0a) Apply patch cross-mac.diff [see below]

- This updates stand/Makefile.inc, stand/installboot/{Makefile, installboot.c} to allow cross-building.

(0b) Unpack 88k header subset from crossinc.tgz in sys/arch/mvme88k/stand/installboot/ [see below]

- I kludged the makefile to insert installboot/crossinc/ as an include path, so it grabs the OpenBSD 88k headers as-needed & the rest come from Darwin. There's got to be a better way to accomplish the same thing without duplicating the headers, but I'm not sure how to do it right now.

% cd installboot
% tar zvxf crossinc.tgz
% bsdmake (should build OK with 1 warning)


(1) Create CD image with (Darwin) UFS file system (Darwin UFS works fine):

[Note - the path I'm using for the CD image is "/Documents/CD\ Images/openbsd88k.dmg"]

(1a) Create initial image; don't attach:

[Note - 300MB is larger than needed, 250MB is too small. I haven't calculated the optimal size.]

% hdiutil create -megabytes 300 /Documents/CD\ Images/openbsd88k.dmg
...............................................................................................................
created: /Documents/CD Images/openbsd88k.dmg

(1b) Attach image without mounting:

% hdiutil attach -nomount /Documents/CD\ Images/openbsd88k.dmg
/dev/disk2 Apple_partition_scheme
/dev/disk2s1 Apple_partition_map
/dev/disk2s2 Apple_HFS

(1c) Create new "whole disk" UFS file system:

[Note - substitute appropriate disk device here, as returned by hdiutil, above]

% newfs /dev/disk2
Warning: 768 sector(s) in last cylinder unallocated
disk2: 614400 sectors in 356 cylinders of 54 tracks, 32 sectors
300.0MB in 23 cyl groups (16 c/g, 13.50MB/g, 3264 i/g)
super-block backups (for fsck -b #) at:
32, 27712, 55392, 83072, 110752, 138432, 166112, 193792,
221472, 249152, 276832, 304512, 332192, 359872, 387552, 415232,
442912, 470592, 498272, 525952, 553632, 581312, 608992,

(1d) Mount file system (for some reason, it seems you need to detach first):

% hdiutil detach /dev/disk2
"disk2" unmounted.
"disk2" ejected.

% hdiutil attach /Documents/CD\ Images/openbsd88k.dmg
/dev/disk2 /Volumes/untitled

[Note - substitute appropriate mount point for /Volumes/untitled below, as indicated by 'hdiutil attach']

(1e) Remove MacOS trash folder (optional step)

% cd /Volumes/untitled
% sudo rm -rf .Trashes ._.Trashes


(2) Copy installation files to CD image:

(2a) Copy files to installation directory:

[Note - CWD here is 3.7 installation download directory (parent of mvme88k/ install set directory)]

mkdir /Volumes/untitled/3.7
pax -r -w mvme88k /Volumes/untitled/3.7

(2b) Copy stage2 boot & kernel to root of image:

% cd /Volumes/untitled
% cp 3.7/mvme88k/bootsd boot

% cp 3.7/mvme88k/bsd.rd bsd (for RAM-disk root)
--OR--
% cp 3.7/mvme88k/bsd . (for CD root - TBD - panicked when I tried it; assumed due to having no 'init' in the file system)

(2c) (optional - CD root FS only) Copy files needed to make CD usable as root:

/sbin/init
TBD - what else is needed here besides init?

(2d) File system should now look like this:

% find .
.
./3.7
./3.7/mvme88k
./3.7/mvme88k/MD5
./3.7/mvme88k/bsd
./3.7/mvme88k/tftpboot
./3.7/mvme88k/xetc37.tgz
./3.7/mvme88k/etc37.tgz
./3.7/mvme88k/xshare37.tgz
./3.7/mvme88k/base37.tgz
./3.7/mvme88k/xbase37.tgz
./3.7/mvme88k/man37.tgz
./3.7/mvme88k/xfont37.tgz
./3.7/mvme88k/CKSUM
./3.7/mvme88k/bsd.rd
./3.7/mvme88k/netboot
./3.7/mvme88k/stboot
./3.7/mvme88k/game37.tgz
./3.7/mvme88k/comp37.tgz
./3.7/mvme88k/misc37.tgz
./3.7/mvme88k/installboot
./3.7/mvme88k/INSTALL.mvme88k
./3.7/mvme88k/index.txt
./3.7/mvme88k/bootst
./3.7/mvme88k/bootsd
./3.7/mvme88k/bootxx
./boot
./bsd


(3) Install CD boot block (same as HD)

(3a) Run installboot

% cd .../sys/arch/mvme88k/stand/installboot

% ./installboot -v /Volumes/untitled/boot /Volumes/untitled/3.7/mvme88k/bootxx /dev/rdisk2
boot: /Volumes/untitled/boot
proto: /Volumes/untitled/3.7/mvme88k/bootxx
device: /dev/rdisk2
cdevice: /dev/rdisk2
modifying vid.
/Volumes/untitled/3.7/mvme88k/bootxx: entry point 0x9f0000
proto bootblock size 4608
room for 64 filesystem blocks at 0x9f10b8
Will load 7 blocks of size 4096 each.
0: 24112
1: 24120
2: 24128
3: 24136
4: 24144
5: 24152
6: 24160

(3b) Detach image

[Make sure CWD is not /Volumes/untitled, of course.]

% hdiutil detach /dev/disk2
"disk2" unmounted.
"disk2" ejected.


(4) Burn CD using Disk Utility

(Images > Burn...)

(5) Boot from CD using Bug

[Note: I'm using minicom on Darwin via a DYNEX USB/RS-232 cable. This cable came with no Mac drivers, but it uses the same "Prolific Technology PL-2303" USB serial controller as used by I/O Gear & others, so a driver can be found on the web & the Info.plist hacked to match the Dynex Device/Vendor ID.]

In 88k console window:

197Bug> BO 0 60

-- OR --

197Bug> BO 0 60 3.7/mvme88k/bsd.rd

etc.

[Note: I'm using a Plextor 12Plex SCSI CD drive. BSD reports: "PLEXTOR, CD-ROM PX-12TS, 1.02". This drive has worked with most Unix workstations (Sun, SGI, NeXT), where every other one I've tried has generally had problems due to not supporting 512-byte block size. I don't know if that would be a problem with the MVME boards, because this is the only one I've tried.]

END


Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: