Annotation of htdocs/docs/bootcd.xml, revision 1.2
1.1 dsieger 1: <?xml version="1.0"?>
2: <!DOCTYPE webpage
3: PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
4: "http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd">
5:
6: <webpage id="docs-bootcd">
7: <config param="desc" value="NetBSD Bootable CD ROM HOWTO"/>
1.2 ! dsieger 8: <config param="cvstag" value="$NetBSD: bootcd.xml,v 1.1 2007/06/09 11:32:54 dsieger Exp $"/>
! 9: <config param="rcsdate" value="$Date: 2007/06/09 11:32:54 $"/>
1.1 dsieger 10: <head>
11: <!-- Copyright (c) 2000-2006
12: The NetBSD Foundation, Inc. ALL RIGHTS RESERVED. -->
13: <title>NetBSD Bootable CD ROM HOWTO</title>
14: </head>
15:
16: <sect1 id="top">
17: <para>
18: This document attempts to explain how to make bootable NetBSD
19: CD ROMs.
20: </para>
21: </sect1>
22:
23: <sect1 role="toc">
24:
25: <sect2 id="overview">
26: <title>Overview</title>
27:
28: <sect3 id="creating-the-image">
29: <title>Creating the CD image</title>
30: <para>
31: The first step in making a CD ROM is to create an image of the CD.
32: This image will initially be stored as a (rather large, up to 650 Mb)
33: file on your hard drive and then later written to the CD.
34: </para>
35: <para>
36: This section assumes you have access to the program
37: <code>mkisofs</code>. If you are making the CD image on a NetBSD
38: machine, you can install <code>mkisofs</code> from the
39: <filename role="pkg">sysutils/cdrtools</filename>
40: package.
41: </para>
42: <para>
43: It is assumed the directory <code>/cdsources</code> exists on your system
44: and contains all the files which you want to end up on the CD ROM.
45: One suggested layout for making an install CD is to follow the
46: directory structure on <ulink
47: url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/">ftp.NetBSD.org</ulink>. For example:
48: <programlisting>
49: /cdsources/i386/.....
50: /cdsources/sparc/.....</programlisting>
51: </para>
52: </sect3>
53: </sect2>
54:
55: <sect2 id="platforms">
56: <title>Platform specific instructions</title>
57:
58: <sect3 id="alphaimage">
59: <title>NetBSD/alpha</title>
60: <para>
61: There are 2 steps involved in making a NetBSD/alpha bootable CD ROM.
62: The first is to create an ISO 9660 image of whatever you want
63: to put on the CD. This image must have the secondary boot program and
64: kernel in its root directory. In addition, the primary boot program
65: will be needed for the second step. To put the boot programs and
66: kernel in the right places, do the following:
67: </para>
68:
69: <programlisting>
70: cd /cdsources/alpha/binary/sets
71: tar -zxvf base.tgz ./usr/mdec/boot ./usr/mdec/bootxx_cd9660
72: mv -f ./usr/mdec/boot /cdsources/boot
73: mkdir /tmp/mdec.alpha
74: mv -f ./usr/mdec/bootxx_cd9660 /tmp/mdec.alpha/bootxx_cd9660
75: rm -rf ./usr
76: cd /cdsources/alpha/installation/instkernel
77: cp -f netbsd.gz /cdsources/netbsd.gz</programlisting>
78:
79: <para>
80: Now create the ISO 9660 image.
81: </para>
82: <programlisting>mkisofs -o output.iso -l -J -R -allow-leading-dots /cdsources</programlisting>
83:
84: <para>
85: The second step is to install NetBSD/alpha disk and CD ROM bootstrap
86: software using &man.installboot.8;. This is done with the
87: following command:
88: </para>
89:
90: <programlisting>installboot -m alpha -v output.iso /tmp/mdec.alpha/bootxx_cd9660</programlisting>
91:
92: </sect3>
93:
94: <sect3 id="i386image">
95: <title>NetBSD/i386</title>
96: <para>
97: This section shows how to make a NetBSD/i386 bootable CD ROM. The
98: particular example is how to make a NetBSD-3.0/i386 install CD. It
99: is assumed that the directory <code>/cdsources/</code> exists on your system
100: and contains all the files and the directory structure from the
101: <ulink
102: url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/i386/">NetBSD-3.0/i386</ulink>
103: distribution.
104: The exact contents depend on what you want on your CD. The
105: important part is that
106: <code>/cdsources/i386/installation/floppy/boot-big.fs</code> exists as that will
107: be used as the bootable image.
108: </para>
109: <para>
110: To create the CD image use the following command:
111: </para>
112:
113: <programlisting>
114: mkisofs -o output.iso -b i386/installation/floppy/boot-big.fs \
115: -c boot.catalog -l -J -R -allow-leading-dots /cdsources</programlisting>
116:
117: <para>
118: This will create a file, <code>output.iso</code>, which is the CD image.
119: The options are:
120: <itemizedlist>
121: <listitem>
122: <para>
123: <code>-b i386/installation/floppy/boot-big.fs</code>
124: -- specifies the boot image to be used
125: </para>
126: </listitem>
127: <listitem>
128: <para>
129: <code>-c boot.catalog</code>
130: -- creates a boot catalog
131: </para>
132: </listitem>
133: <listitem>
134: <para>
135: <code>-l</code> -- Allow long (32 character) file names
136: </para>
137: </listitem>
138: <listitem>
139: <para><code>-J</code> -- Includes Joliet extensions</para>
140: </listitem>
141: <listitem>
142: <para><code>-R</code> -- Sets file permissions including setuid</para>
143: </listitem>
144: <listitem>
145: <para>
146: <code>-allow-leading-dots</code> -- Allows filenames to begin with
147: <quote>.</quote>, was <code>-L</code> in older versions
148: of mkisofs.
149: </para>
150: </listitem>
151: <listitem>
152: <para>
153: <code>/cdsources</code> -- Specifies that the directory
154: <code>/cdsources</code> is the root of the CD image
155: </para>
156: </listitem>
157: </itemizedlist>
158: </para>
159: </sect3>
160:
161: <sect3 id="macppcimage">
162: <title>NetBSD/macppc</title>
163: <para>
164: All supported macppc models can boot from the first session of a CD ROM.
165: The procedure for making a CD bootable depends on what version of Open
166: Firmware your model has. Refer to the <ulink
1.2 ! dsieger 167: url="../ports/macppc/models.html">NetBSD/macppc Model Support Page</ulink> to
1.1 dsieger 168: determine your system's Open Firmware version and its support status.
169: </para>
170:
171: <para>
172: It is assumed that the directory <code>/cdsources/</code> exists on your
173: system and contains all the files and the directory structure from the <ulink
174: url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/macppc/">NetBSD-3.0/macppc</ulink>
175: distribution. The exact contents depend on what you want on your CD.
176: </para>
177:
178: <para>
179: Make sure your <code>/cdsources/</code> has <code>ofwboot.xcf</code> (the macppc
180: bootloader) and a kernel (we suggest <code>netbsd.GENERIC_MD</code>, the
181: ramdisk-based install kernel that supports all models).
182: </para>
183:
184: <programlisting>
185: cd /cdsources
186: cp macppc/binary/kernel/netbsd-GENERIC_MD.gz netbsd.macppc
187: cp macppc/installation/ofwboot.xcf .</programlisting>
188:
189: <para>
190: The NetBSD/macppc official ISO image is bootable on all supported models
191: because it does some special magic. The CD is created as an HFS
192: hybrid CD with an Apple Disk Partition Table using the <code>-hfs -part</code>
193: options in mkisofs. The Partition Table is then modified to map (or point to)
194: a driver file which makes the CD bootable on the PPC Macintosh and the
195: driver file is appended to the end of the iso image.
196: </para>
197:
198: <para>
199: The CD won't be bootable via the
200: <quote><code>C</code></quote> snag key though. However
201: this can be added with the following, although it may not
202: work on all Macppc systems. (Adding the option will not
203: impair the use of booting via OpenFirmware commands.) To
204: do this, create a CHRP bootscript in a top-level
205: directory, tag the bootscript file with the proper Mac OS
206: Type and Creator, and "bless" the directory which contains
207: the file. Mkisofs will attach the proper Mac OS Type and
208: Creator codes while generating the ISO image file if the
209: following line is added to the file
210: <code>/usr/src/distrib/cdrom/hfsmap.lst</code>:
211: </para>
212:
213: <programlisting>.chrp - 'chrp' 'tbxi'</programlisting>
214:
215: <para>
216: Then place the following file named <code>bootscript</code> in the (top-level)
217: <code>macppc</code> directory:
218: </para>
219:
220: <programlisting>
221: <CHRP-BOOT>
222: <COMPATIBLE>MacRISC</COMPATIBLE>
223: <DESCRIPTION>
224: NetBSD/macppc bootable CD script
225: </DESCRIPTION>
226: <BOOT-SCRIPT>
227: boot cd:,ofwboot.xcf netbsd.macppc
228: </BOOT-SCRIPT>
229: </CHRP-BOOT></programlisting>
230:
231: <para>Create the macppc bootable CD image using the following commands:</para>
232:
233: <programlisting>
234: cdrom_util="/usr/src/distrib/cdrom"
235: snag_boot="-map ${cdrom_util}/hfsmap.lst -hfs-bless ./macppc"
236: ofw_boot="-boot-hfs-file ${cdrom_util}/macppc_installboot/macppcboot.raw"
237: mkisofs -o output.iso -hfs -part ${snag_boot} ${ofw_boot} -l -J -r -allow-leading-dots /cdsources
238: blknum=`ls -l output.iso | awk '{print $5}'`
239: blknum=`expr ${blknum} / 512`
240: ${cdrom_util}/macppc_installboot/macppc_installboot output.iso ${blknum} 756
241: dd if=/usr/mdec/ofwboot bs=64k count=1 conv=sync >> output.iso</programlisting>
242:
243: <para>
244: Once you have burnt the CD, make sure Open Firmware can find the
245: bootloader on your new CD ROM (see
1.2 ! dsieger 246: <ulink url="../ports/macppc/faq.html#ofw-dir-listing">How do I get a listing (in
1.1 dsieger 247: Open Firmware) of the files on my disk?</ulink> in the FAQ). This is
248: important, since Open Firmware treats the boot file name as case
249: sensitive. Most (if not all) Open Firmware 1.0.5, 1.1.22, and 2.0.x systems
250: will think the bootloader is <code>OFWBOOT.XCF</code> and Open Firmware 3 should
251: properly see it as <code>ofwboot.xcf</code>.
252: </para>
253: </sect3>
254:
255: <sect3 id="pmaximage">
256: <title>NetBSD/pmax</title>
257: <para>
258: NetBSD/pmax can boot from either a FFS or ISO 9660 CD ROM. This
259: section assumes you are making an ISO 9660 CD ROM. Please note that
260: the bootxx_cd9660 program was not added until <emphasis>after</emphasis> NetBSD-1.4.x.
261: If you're running NetBSD-1.4.x, you can obtain <code>boot.pmax</code>,
262: <code>installboot</code>, and <code>bootxx_cd9660</code> from a -current snapshot.
263: Make sure the sources are from <emphasis>after</emphasis> late November, 1999.
264: </para>
265: <para>
266: There are 2 steps involved in making a NetBSD/pmax bootable CD ROM.
267: The first is to create an ISO 9660 image of whatever you want
268: to put on the CD. This image must have the secondary boot program
269: and kernel in its root directory.
270: In addition, the primary boot program
271: will be needed for the second step. To put the boot programs and
272: kernel in the right places, do the following:
273: </para>
274:
275: <programlisting>
276: cd /cdsources/pmax/binary/sets
277: tar -zxvf base.tgz ./usr/mdec/boot.pmax ./usr/mdec/bootxx_cd9660
278: mv -f ./usr/mdec/boot.pmax /cdsources/boot.pmax
279: mkdir /tmp/mdec.pmax
280: mv -f ./usr/mdec/bootxx_cd9660 /tmp/mdec.pmax/bootxx_cd9660
281: rmdir ./usr/mdec
282:
283: cd /cdsources/pmax/binary/kernel
284: cp -f install.gz /cdsources/netbsd.pmax.gz
285: gunzip /cdsources/netbsd.pmax.gz</programlisting>
286:
287: <para>
288: Now create the ISO 9660 image.
289: </para>
290:
291: <programlisting>mkisofs -o output.iso -l -J -r -allow-leading-dots /cdsources</programlisting>
292:
293: <para>
294: The second step is to install NetBSD/pmax disk and CD ROM bootstrap
295: software using &man.installboot.8;. The
296: &man.installboot.8; command is used in the following way:
297: </para>
298:
299: <programlisting>installboot -m pmax -v output.iso /usr/mdec/bootxx_cd9660</programlisting>
300:
301: </sect3>
302:
303: <sect3 id="sgimips">
304: <title>NetBSD/sgimips</title>
305: <para>
306: Please see <ulink
307: url="http://mail-index.NetBSD.org/port-sgimips/2003/06/29/0000.html">this
1.2 ! dsieger 308: posting</ulink> to the <ulink url="../mailinglists/#port-sgimips">port-sgimips
1.1 dsieger 309: MailingList</ulink> for instructions on how to create a bootable CD ROM. Note
310: that these instructions have not been verified by the NetBSD developers (yet).
311: </para>
312: </sect3>
313:
314: <sect3 id="sparcimage">
315: <title>NetBSD/sparc</title>
316: <para>
317: There are three steps involved in making a NetBSD/sparc bootable CD ROM.
318: Step 1 is to create an "almost" full ISO 9660 image of whatever you want
319: to put on the CD. For example:
320: </para>
321:
322: <programlisting>mkisofs -o output.iso -l -J -r -allow-leading-dots /cdsources</programlisting>
323:
324: <para>
325: Now get a bootable floppy image. For NetBSD-3.0/sparc, this image
326: may be found at
327: <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sparc/installation/bootfs/boot.fs.gz"/>
328: </para>
329:
330: <para>
331: The final step is to rewrite the ISO image with (a) a sun disklabel at
332: the start, (b) the original image at the end, and (c) with the right
333: offset/size values in the disklabel for the bootloader. The program
334: <code>mksunbootcd</code> will perform this task. If <code>mksunbootcd</code>
335: is not installed on your system, it can be installed from the
336: <filename role="pkg">sysutils/mksunbootcd</filename>
337: package. If you're creating the image on a non-NetBSD system, you
338: can try compiling <code>mksunbootcd</code> on your system. The sources
339: are available at
340: <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/misc/mksunbootcd/"/>.
341: </para>
342:
343: <para>
344: To use <code>mksunbootcd</code> use the following:
345: </para>
346:
347: <programlisting>mksunbootcd output.iso boot.fs boot.fs boot.fs</programlisting>
348:
349: <para>
350: The bootable image is listed three times corresponding to what will get
351: booted by a sun4, sun4c and sun4m system respectively. If you have
352: different bootable images for the three machines, or if you also have
353: a bootable image for sun2, sun3, and sun3x systems, you can do something
354: like:
355: </para>
356:
357: <programlisting>mksunbootcd output.iso boot-sun4.fs boot-sun4c.fs boot-sun4m.fs boot-sun3.fs</programlisting>
358:
359: <para>
360: Note that <code>mksunbootcd</code> rewrites the <code>output.iso</code> file, so
361: don't run it multiple times.
362: </para>
363:
364: <para>
365: As a note, this step is fine to perform on a NFS mounted directory. Ie,
366: if your ISO image is on a remote machine, it can be mounted on a NetBSD
367: machine for running <code>mksunbootcd</code> without requiring extreme amounts
368: of data to be transferred over the network.
369: </para>
370: </sect3>
371:
372: <sect3 id="sparc64image">
373: <title>NetBSD/sparc64</title>
374: <para>
375: There are three steps involved in making a NetBSD/sparc64 bootable CD ROM.
376: Step 1 is to create an "almost" full ISO 9660 image of whatever you want to
377: put on the CD. For example:
378: </para>
379:
380: <programlisting>mkisofs -o output.iso -l -J -r -allow-leading-dots /cdsources</programlisting>
381:
382: <para>
383: Now get a bootable floppy image. For NetBSD-3.0/sparc64, this image
384: may be found at <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0/sparc64/installation/misc/boot.fs.gz"/>.
385: </para>
386:
387: <para>
388: The final step is to rewrite the ISO image with (a) a sun disklabel at
389: the start, (b) the original image at the end, and (c) with the right
390: offset/size values in the disklabel for the bootloader. The program
391: <code>sunbootcd.sh</code> will perform this task. If <code>sunbootcd.sh</code>
392: is not installed on your system, it can be obtained from <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/src/distrib/common/sunbootcd.sh"/>.
393: </para>
394:
395: <para>
396: To use <code>sunbootcd.sh</code> use the following:
397: </para>
398:
399: <programlisting>sunbootcd.sh output.iso - - - - boot.fs</programlisting>
400:
401: <para>
402: The arguments are for bootable images for sun4, sun4c, sun4m, sun4d, and
403: sun4u. Specifying a dash instead of a boot image means the CD will not be
404: bootable for that platform. In the above example the only platform given
405: a boot image is sun4u.
406: </para>
407:
408: <para>
409: Note that <code>sunbootcd.sh</code> rewrites the <code>output.iso</code> file, so
410: don't run it multiple times.
411: </para>
412:
413: <para>
414: As a note, this step is fine to perform on a NFS mounted directory. Ie,
415: if your ISO image is on a remote machine, it can be mounted on a NetBSD
416: machine for running <code>sunbootcd.sh</code> without requiring extreme amounts
417: of data to be transferred over the network.
418: </para>
419:
420: <para>
421: Be aware that <code>sunbootcd.sh</code> will produce a CD that is not
422: recognized by vold under Solaris 10. If you want to mount the NetBSD
423: install CD under Solaris, you will first need to stop vold.
424: </para>
425:
426: <programlisting>/etc/init.d/volmgt stop</programlisting>
427:
428: </sect3>
429:
430: <sect3 id="sun2image">
431: <title>NetBSD/sun2</title>
432: <para>
433: To make a NetBSD/sun2 bootable CD ROM, follow the procedure below for
434: making a NetBSD/sun3 bootable CD ROM. This procedure makes a single
435: CD ROM that will boot on both sun2 and sun3 systems.
436: </para>
437:
438: <para>
439: <emphasis>Optional:</emphasis> When following the procedure below, it is beneficial
440: to uncompress the sun2 miniroot
441: (<code>/cdsources/sun2/installation/miniroot.fs.gz</code>) and binary sets
442: (<code>/cdsources/sun2/binary/sets/*.tgz</code>)
443: before writing the ISO 9660 image. This is entirely optional, and consumes
444: a lot of space on the ISO 9660 image, but saves time during installation
445: because decompression is very slow on the sun2.
446: </para>
447: </sect3>
448:
449: <sect3 id="sun3image">
450: <title>NetBSD/sun3</title>
451: <para>
452: There are three steps involved in making a NetBSD/sun3 bootable CD ROM, and
453: this will result in a CD ROM that can also boot NetBSD/sun2.
454: </para>
455:
456: <para>
457: Step 1 is to create an "almost" full ISO 9660 image of whatever you want
458: to put on the CD. For example:
459: </para>
460:
461: <programlisting>mkisofs -o output.iso -l -J -r -allow-leading-dots /cdsources</programlisting>
462:
463: <para>
464: Now build a bootable ffs image. This image is currently not included in
465: the release, so you have to put it together yourself.
466: </para>
467:
468: <programlisting>
469: mkdir /tmp/boot-sun3
470: cd /tmp/boot-sun3
471: gzip -cd < /cdsources/sun2/binary/kernel/netbsd.RAMDISK.gz > netbsd.sun2
472: ln netbsd.sun2 vmunix
473: gzip -cd < /cdsources/sun3/binary/kernel/netbsd.RAMDISK.gz > netbsd.sun3
474: gzip -cd < /cdsources/sun3/binary/kernel/netbsd.RAMDISK3X.gz > netbsd.sun3x
475: tar xzvf /cdsources/sun3/binary/sets/base.tgz ./usr/mdec
476: mv usr/mdec/ufsboot .
477: mv usr/mdec/bootxx /tmp/bootxx.sun3
478: rm -rf /tmp/boot-sun3/usr
479:
480: echo /set type=file uname=root gname=wheel mode=0755 > /tmp/boot-sun3.spec
481: echo . type=dir >> /tmp/boot-sun3.spec
482: echo ufsboot mode=0644 >> /tmp/boot-sun3.spec
483: /bin/ls netbsd* vmunix >> /tmp/boot-sun3.spec
484:
485: makefs -t ffs -B be -F /tmp/boot-sun3.spec /tmp/boot-sun3.fs /tmp/boot-sun3
486:
487: installboot -m sun3 -v /tmp/boot-sun3.fs /tmp/bootxx.sun3 ufsboot</programlisting>
488:
489: <para>
490: The final step is to rewrite the ISO image with (a) a sun disklabel at
491: the start, (b) the original image at the end, and (c) with the right
492: offset/size values in the disklabel for the bootloader. The program
493: <code>mksunbootcd</code> will perform this task. If <code>mksunbootcd</code>
494: is not installed on your system, it can be installed from the
495: <filename role="pkg">sysutils/mksunbootcd</filename>
496: package. If you're creating the image on a non-NetBSD system, you
497: can try compiling <code>mksunbootcd</code> on your system. The sources
498: are available at
499: <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/misc/mksunbootcd/"/>.
500: </para>
501:
502: <para>
503: To use <code>mksunbootcd</code> use the following:
504: </para>
505:
506: <programlisting>mksunbootcd output.iso /tmp/boot-sun3.fs </programlisting>
507:
508: <para>
509: Note that <code>mksunbootcd</code> is also used to make a bootable CD ROM
510: for sparc systems. It is possible to make a bootable CD ROM that will
511: boot on sparc, sun2, sun3, and sun3x by doing something like:
512: </para>
513:
514: <programlisting>mksunbootcd output.iso boot-sun4.fs boot-sun4c.fs boot-sun4m.fs boot-sun3.fs</programlisting>
515:
516: <para>
517: You can rearrange the ordering of the bootable filesystems in any way
518: you want; this only changes the partition numbers that the different
519: filesystems end up with, thus changing the partition number you need
520: to give to the PROM <code>b</code> or <code>boot</code> command to boot the
521: right filesystem for a given architecture.
522: </para>
523:
524: <para>
525: Note that <code>mksunbootcd</code> rewrites the <code>output.iso</code> file, so
526: don't run it multiple times.
527: </para>
528:
529: <para>
530: As a note, this step is fine to perform on a NFS mounted directory. Ie,
531: if your ISO image is on a remote machine, it can be mounted on a NetBSD
532: machine for running <code>mksunbootcd</code> without requiring extreme amounts
533: of data to be transferred over the network.
534: </para>
535: </sect3>
536:
537: <sect3 id="vaximage">
538: <title>NetBSD/vax</title>
539: <para>
540: NetBSD/vax can boot from either a FFS or ISO 9660 CD ROM. This
541: section assumes you are making an ISO 9660 CD ROM. Please note that
542: this capability was not added until NetBSD-1.5
543: </para>
544:
545: <para>
546: There are 2 steps involved in making a NetBSD/vax bootable CD ROM.
547: The first is to create an ISO 9660 image of whatever you want
548: to put on the CD. This image must have the secondary boot program
549: and kernel in its root directory.
550: In addition, the primary boot program
551: will be needed for the second step. To put the boot programs and
552: kernel in the right places, do the following:
553: </para>
554:
555: <programlisting>
556: cd /cdsources/vax/binary/sets
557: tar -zxvf base.tgz ./usr/mdec/boot ./usr/mdec/xxboot
558: mv -f ./usr/mdec/boot /cdsources/boot.vax
559: mkdir /tmp/mdec.vax
560: mv -f ./usr/mdec/xxboot /tmp/mdec.vax/xxboot
561: rmdir ./usr/mdec
562:
563: cd /cdsources/vax/installation/netboot
564: cp -f install.ram.gz /cdsources/netbsd.vax.gz
565: gunzip -f /cdsources/netbsd.vax.gz</programlisting>
566:
567: <para>
568: Now create the ISO 9660 image.
569: </para>
570:
571: <programlisting>mkisofs -o output.iso -l -J -r -allow-leading-dots /cdsources</programlisting>
572:
573: <para>
574: The second step is to install NetBSD/vax disk and CD ROM bootstrap
575: software using &man.installboot.8;. The
576: &man.installboot.8; command is used in the following way:
577: </para>
578:
579: <programlisting>installboot -m vax -v output.iso /usr/mdec/xxboot</programlisting>
580:
581: </sect3>
582:
583: <sect3 id="multiimage">
584: <title>Multiple Machine</title>
585: <para>
586: NetBSD-current has infrastructure in
587: <code><ulink url="http://cvsweb.NetBSD.org/bsdweb.cgi/src/distrib/cdrom?rev=HEAD&content-type=text/x-cvsweb-markup">src/distrib/cdrom</ulink></code>
588: to build CDs which can boot multiple machines.
589: This has been used to build a four CD set containing thirty-nine platforms,
590: with eight platforms able to boot off the CDs.
591: This technique requires <code>mkisofs</code> version 1.15a34 or newer.
592: </para>
593:
594: <para>
595: Alternatively, multiple machine boot CDs can be created with the
596: following manual procedure.
597: This procedure
598: has been successfully used to create a single CD which is bootable on
599: alpha, i386, pmax, and sparc. It should be possible to also make the
600: CD bootable on macppc, vax and on sun2, sun3 and sun3x.
601: To create a CD which is bootable by multiple architectures, use the
602: following steps in this order. Please note that the order is critical.
603:
604: <itemizedlist>
605: <listitem>
606: <para>
607: Make sure you have all the required files including the various
608: kernels and boot programs listed in the individual machine
609: sections.
610: </para>
611: </listitem>
612:
613: <listitem>
614: <para>
615: Include a directory somewhere in the <code>cdsources</code>
616: directory called <code>mdec.pmax</code>
617: and include the pmax <code>bootxx_cd9660</code> file there. For example,
618: <code>/cdsources/usr/mdec.pmax/bootxx_cd9660</code>.
619: </para>
620: </listitem>
621: <listitem>
622: <para>
623: Include a directory somewhere in the <code>cdsources</code>
624: directory called <code>mdec.vax</code>
625: and include the vax <code>xxboot</code> file there. For example,
626: <code>/cdsources/usr/mdec.vax/xxboot</code>.
627: </para>
628: </listitem>
629: <listitem>
630: <para>
631: Include the macppc <code>ofwboot.xcf</code> bootloader in <code>/cdsources</code>.
632: </para>
633: </listitem>
634: <listitem>
635: <para>
636: Create an i386 bootable image.
637:
638: <programlisting>
639: sh
640: mkisofs -v -v -o output.iso -b i386/installation/floppy/boot-big.fs \
641: -c boot.catalog -l -J -r -allow-leading-dots /cdsources 2>&1 | tee /tmp/mkisofs.log
642: exit</programlisting>
643:
644: Note that the appearance of the <code>-v</code> flag twice is required. If you are
645: making a bootable CD for an Open Firmware 3 macppc model, make sure to include
646: <code>-hfs -part</code> in the parameters for <code>mkisofs</code>.
647: </para>
648: </listitem>
649: <listitem>
650: <para>
651: Run <code>mksunbootcd</code> on a NetBSD/sparc machine to install sparc
652: and sun2/sun3 bootblocks. Alternatively, install the
653: <filename role="pkg">sysutils/mksunbootcd</filename>
654: package on your favorite NetBSD machine.
655:
656: <programlisting>mksunbootcd output.iso boot-sun4.fs boot-sun4c.fs boot-sun4m.fs boot-sun3.fs</programlisting>
657: </para>
658: </listitem>
659: <listitem>
660: <para>
661: Run the &man.installboot.8; program targeted for
662: NetBSD/pmax to install the pmax bootblocks.
663: Note that in order to coexist with other NetBSD boot blocks, the pmax
664: boot block is appended to the end of the ISO file system.
665:
666: <programlisting>installboot -m pmax -v -o append,sunsum output.iso /tmp/mdec.pmax/bootxx_cd9660</programlisting>
667:
668: The <code>-o append,sunsum</code> option appends the first stage boot block to
669: the end of the ISO file system, and restores the checksum used when booting
670: on a sun.
671: </para>
672: </listitem>
673: <listitem>
674: <para>
675: Run the &man.installboot.8; program targeted for
676: NetBSD/vax to install the vax bootblocks.
677: Note that in order to coexist with other NetBSD boot blocks, the vax
678: boot block is appended to the end of the ISO file system.
679:
680: <programlisting>installboot -m vax -v -o append,sunsum output.iso /tmp/mdec.vax/xxboot</programlisting>
681:
682: (See the pmax entry above for an explanation of the flags).
683: </para>
684: </listitem>
685: <listitem>
686: <para>
687: Run the &man.installboot.8; program targeted for
688: NetBSD/alpha to install the alpha bootblocks.
689:
690: <programlisting>installboot -m alpha -v -o append,sunsum output.iso /tmp/mdec.alpha/bootxx_cd9660</programlisting>
691:
692: Note that the alpha installboot must occur after the others, because
693: currently it's the only machine dependent back-end for
694: <code>installboot(8)</code> that can calculate the alpha checksum.
695: (See the pmax entry above for an explanation of the flags).
696: </para>
697: </listitem>
698: </itemizedlist>
699: </para>
700: </sect3>
701: </sect2>
702:
703: <sect2 id="examining-the-image">
704: <title>Examining the CD image</title>
705: <para>
706: It is possible to mount the cd image to examine the filesystem you
707: just created.
708: </para>
709:
710: <sect3 id="netbsd_mountimage">
711: <title>Under NetBSD</title>
712: <para>
713: Mount the CD image using the following:
714: </para>
715:
716: <programlisting>
717: vnconfig -c vnd0 output.iso
718: mount -t cd9660 /dev/vnd0c /mnt</programlisting>
719:
720: <para>
721: Please note that on i386 systems, you should use <code>/dev/vnd0d</code> instead
722: of <code>/dev/vnd0c</code>.
723: Now you can cd to /mnt and explore your newly created CD image.
724: To unmount the image, do the following:
725: </para>
726:
727: <programlisting>
728: umount /mnt
729: vnconfig -u vnd0</programlisting>
730:
731: </sect3>
732:
733: <sect3 id="linux_mountimage">
734: <title>Under Linux</title>
735: <para>
736: Linux has a similar capability. To mount the CD image:
737: </para>
738:
739: <programlisting>mount -t iso9660 -o ro,loop=/dev/loop0 output.iso /mnt</programlisting>
740:
741: <para>
742: and to unmount the CD image:
743: </para>
744:
745: <programlisting>umount /mnt</programlisting>
746:
747: </sect3>
748:
749: <sect3 id="solaris_mountimage">
750: <title>Under Solaris</title>
751: <para>
752: Solaris-8 and newer is reported to be able to also mount
753: the CD image. See the <code>lofiadm</code> manpage on solaris
754: for more details on how to do this.
755: </para>
756:
757: <para>
758: For older versions of Solaris, you might want to try the
759: <code>fbk</code> driver written by Joerg Schilling. The <code>fbk</code> driver
760: is available from
761: <ulink url="ftp://ftp.berlios.de/pub/schily/kernel/fbk/"/>.
762: Please refer to the <code>fbk</code> documentation for installation instructions.
763: Once the <code>fbk</code> driver is installed on your system, you can mount the ISO 9660 image
764: with the following command:
765: </para>
766:
767: <programlisting>mount -F fbk -o ro,type=hsfs /dev/fbk0:output.iso /mnt</programlisting>
768:
769: <para>
770: and to unmount the CD image:
771: </para>
772:
773: <programlisting>umount /mnt</programlisting>
774:
775: </sect3>
776: </sect2>
777:
778: <sect2 id="burning-the-cd">
779: <title>Burning the CD</title>
780:
781: <sect3 id="cdrecord">
782: <title>Using cdrecord (U*nix)</title>
783: <para>
784: The program <code>cdrecord</code> may be used to burn the CD image to the
785: CD. <code>cdrecord</code> is included in the
786: <filename role="pkg">sysutils/cdrtools</filename>
787: package.
788: </para>
789:
790: <para>
791: An example of the use of <code>cdrecord</code> is the following:
792: </para>
793:
794: <programlisting>cdrecord -v speed=4 dev=/dev/cd1c output.iso</programlisting>
795:
796: <para>
797: You will need to substitute the correct speed for your CD writer and
798: the correct device for your system (for i386 it would be
799: <code>/dev/cd1d</code>).
800: </para>
801: </sect3>
802:
803: <sect3 id="winrecord">
804: <title>Under Windows</title>
805: <para>
806: There are several programs available for Windows which will write an
807: ISO 9660 image to a CD. This section is not an endorsement for any of
808: these programs in particular, but is intended to at least mention some
809: of the alternatives.
810:
811: <itemizedlist>
812: <listitem>
813: <para>
814: <ulink url="http://www.goldenhawk.com/cdrwin.htm">CDRWIN</ulink>.
815: Commercial software that can create bootable (by i386) ISO 9660 images
816: and write them to CD.
817: </para>
818: </listitem>
819: <listitem>
820: <para>
821: <ulink url="http://www.goldenhawk.com/freeware.htm">FILE2CD</ulink>.
822: Freeware program which can write an ISO 9660 image to CD.
823: </para>
824: </listitem>
825: <listitem>
826: <para>
827: <ulink url="http://www.roxio.com/en/products/ecdc/index.jhtml">
828: Roxio Easy CD Creator</ulink>. Commercial software.
829: </para>
830: </listitem>
831: <listitem>
832: <para>
833: <ulink url="http://www.ahead.de/en/index.html">Ahead Nero
834: Burning ROM</ulink>. Commercial software.
835: </para>
836: </listitem>
837: <listitem>
838: <para>
839: <ulink url="ftp://ftp.berlios.de/pub/cdrecord/alpha/win32/">CDRECORD</ulink>.
840: Free software that can create bootable ISO 9660 images and write them to CD.
841: This does not include a graphical interface, it is command line only.
842: This depends on an ASPI driver, which is available
843: <ulink url="http://www.adaptec.com/worldwide/support/driverdetail.jsp?cat=%2fProduct%2fASPI-4.70&filekey=aspi_v470.exe">here</ulink>.
844: For IDE drives you will need to modify your registry:
845: </para>
846:
847: <programlisting>
848: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASPI32]
849: "ErrorControl"=dword:00000001
850: "Start"=dword:00000001
851: "Type"=dword:00000001
852: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASPI32\Parameters]
853: "ExcludeMiniports"=""</programlisting>
854:
855: </listitem>
856: </itemizedlist>
857: </para>
858: </sect3>
859:
860: <sect3 id="macrecord">
861: <title>Under Mac OS</title>
862: <para>
863: On Mac OS X, the program <command>hdiutil</command> may be used to burn the
864: ISO image to the CD.
865: </para>
866:
867: <para>
868: An example of the use of <command>hdiutil</command> is the following:
869: </para>
870:
871: <screen>hdiutil burn output.iso -verbose -noverifyburn</screen>
872:
873: <para>
874: You may need to use additional options which are documented in the
875: hdiutil <ulink
876: url="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html">documentation</ulink>.
877: </para>
878:
879: <para>
880: There are also several other programs available for Mac OS which will write an
881: ISO 9660 image to a CD. This section is not an endorsement for any of
882: these programs in particular, but is intended to at least mention some
883: of the alternatives.
884: </para>
885:
886: <itemizedlist>
887: <listitem>
888: <para>
889: <ulink url="http://www.roxio.com/en/products/toast/index.jhtml">Roxio
890: Toast</ulink>. Commercial software.
891: </para>
892: </listitem>
893: </itemizedlist>
894: </sect3>
895: </sect2>
896: </sect1>
897: </webpage>
CVSweb <webmaster@jp.NetBSD.org>