Subject: Re: CD booting info wanted
To: Tsubai Masanari , Todd Vierling <tv@wasabisystems.com>
From: Michael Wolfson <mw@costello.cnf.cornell.edu>
List: port-macppc
Date: 10/16/2000 14:50:16
Hmmm.

I just tried some more experimentation with making bootable CDs for macppc.
I made a hybrid HFS/ISO CD with Toast for MacOS, and it works fine on OF 3,
but not OF 1.  The behavior is consistent with my previous failures to boot
as well.

CD contains ofwboot.elf, ofwboot.xcf, netbsd, and netbsd-GENERIC on both
HFS and ISO partitions.

The HFS partition was not marked as "bootable".

To summarize, OF 1 boots ofwboot.xcf and NetBSD from a pure ISO filesystem,
but not hybrid or pure HFS.  OF 3 boots NetBSD if ofwboot.elf is on a HFS
or hybrid CD, and the kernel is on an ISO or hybrid CD.

OF 1
boot scsi-int/sd@3:0,OFWBOOT.XCF	# which works with pure ISO CD
   bad partition number, using 0no bootable HFS partition
boot scsi-int/sd@3:1,OFWBOOT.XCF
   bad partition number, using 0no bootable HFS partition
boot scsi-int/sd@3:2,OFWBOOT.XCF
   bad partition number, using 0no bootable HFS partition
boot scsi-int/sd@3:,OFWBOOT.XCF
   bad partition number, using 0no bootable HFS partition
boot fd:0 scsi-int/sd@3:0,NETBSD
   bad partition number, using 0open scsi-int/sd@3:0,NETBSD: Input/output error
   open scsi-int/sd@3:0,NETBSD/netbsd: Input/output error
boot fd:0 scsi-int/sd@3:0,NETBSD	# works only if CD is pure ISO
boot scsi-int/sd@3:0,OFWBOOT.XCF -a
# replace CD with a hybrid CD with kernel on ISO filesystem
# boots NetBSD

OF 3
boot cd:ofwboot.elf				# works
boot cd:netbsd					# works
boot cd:ofwboot.elf cd:netbsd-GENERIC		# works
boot hd:ofwboot.elf cd:netbsd
   open cd:netbsd: No such file or directory
   open cd:netbsd-GENERIC: No such file or directory
boot cd:ofwboot.elf -a
# replace CD with one that has netbsd on pure ISO filesystem (non-hybrid)
# boots from kernel on pure ISO filesystem


So, this looks like it's not possible to come up with one CD that will boot
OF 3 *and* OF 1, since OF 1 will not ignore the HFS partition even though
it can't load files from HFS.

Here's are the three schemes that work (minimizing size):

Scheme 1
CD 1, HFS side:  ofwboot.elf, netbsd.ram, System Disk pointer
CD 1, ISO side:	 netbsd.ram, distribution files
CD 2, ISO only:  ofwboot.xcf

OF 1 users boot from CD 2 with -a, then load kernel from CD 1
OF 3 users boot from CD 1


Scheme 2
CD 1, ISO only:  ofwboot.xcf, netbsd.ram, distribution files
CD 2, HFS only:  ofwboot.elf, System Disk pointer

OF 1 users boot from CD 1
OF 3 users boot from CD 2 with -a then load kernel from CD 1


Scheme 3
CD, HFS side:    ofwboot.elf, suntar, boot.fs, System Disk pointer
CD, ISO side:    netbsd.ramdisk, distribution files

OF 1 users make boot floppy, boot from floppy and use CD for dist files
OF 3 users boot from CD


Personally, I think the best bet would be scheme 1 including suntar and
boot.fs on the HFS partition allowing the OF 1 users to decide whether to
burn a second CD-R or to boot from floppy (as in scheme 3).

And, for future reference, OF 1 and OF 3 only recognize files on the first
session of a multi-session CD.

And on a semi-related note, ofwboot.xcf on OF 1 does not recognize long
filenames.  Since Toast wrote the ISO level 1 name in 8.3, "netbsd-GENERIC"
was only recognized as "NETBSD-G.ENE".  I know cdrecord can write ISO level
1 names as 32.32, but don't know if OF 1 can recognize those.  ofwboot.elf
on OF 3 somehow picked up the full filenames either from ISO level 2 or 3,
or from the "Apple Extensions" that Toast wrote.

  -- MW